From a3bd33e709f429fdd6f3273bd9897d03e5a38b39 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Apr 2020 22:06:08 -0400 Subject: [PATCH 01/14] forbidden circlet (bruh) --- CalPlayer/CalamityPlayer.cs | 119 ++++++++++-- CalPlayer/CalamityPlayerMiscEffects.cs | 23 +++ Items/Armor/ForbiddenCirclet.cs | 80 ++++++++ Items/Armor/ForbiddenCirclet.png | Bin 0 -> 446 bytes Items/Armor/ForbiddenCirclet_Head.png | Bin 0 -> 1219 bytes Items/CalamityGlobalItem.cs | 19 +- Projectiles/CalamityGlobalProjectile.cs | 14 ++ Projectiles/Rogue/CircletMark.cs | 160 ++++++++++++++++ Projectiles/Rogue/CircletMark.png | Bin 0 -> 226 bytes Projectiles/Rogue/CircletTornado.cs | 182 ++++++++++++++++++ Projectiles/Rogue/CircletTornado.png | Bin 0 -> 813 bytes Projectiles/Summon/ForbiddenCircletEater.cs | 188 +++++++++++++++++++ Projectiles/Summon/ForbiddenCircletEater.png | Bin 0 -> 1179 bytes 13 files changed, 764 insertions(+), 21 deletions(-) create mode 100644 Items/Armor/ForbiddenCirclet.cs create mode 100644 Items/Armor/ForbiddenCirclet.png create mode 100644 Items/Armor/ForbiddenCirclet_Head.png create mode 100644 Projectiles/Rogue/CircletMark.cs create mode 100644 Projectiles/Rogue/CircletMark.png create mode 100644 Projectiles/Rogue/CircletTornado.cs create mode 100644 Projectiles/Rogue/CircletTornado.png create mode 100644 Projectiles/Summon/ForbiddenCircletEater.cs create mode 100644 Projectiles/Summon/ForbiddenCircletEater.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c5182c66e8..d5de4e8c89 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -516,6 +516,8 @@ namespace CalamityMod.CalPlayer #region Armor Set public bool snowRuffianSet = false; + public bool forbiddenCirclet = false; + public int forbiddenCooldown = 0; public bool eskimoSet = false; //vanilla armor public bool meteorSet = false; //vanilla armor, for space gun nerf public bool victideSet = false; @@ -1511,6 +1513,8 @@ namespace CalamityMod.CalPlayer snowRuffianSet = false; + forbiddenCirclet = false; + eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf @@ -1854,6 +1858,7 @@ namespace CalamityMod.CalPlayer hallowedRuneCooldown = 0; doubledHorror = false; sulphurBubbleCooldown = 0; + forbiddenCooldown = 0; alcoholPoisoning = false; shadowflame = false; @@ -2082,6 +2087,7 @@ namespace CalamityMod.CalPlayer ataxiaBlaze = false; hydrothermalSmoke = false; snowRuffianSet = false; + forbiddenCirclet = false; eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf victideSet = false; @@ -2555,11 +2561,10 @@ namespace CalamityMod.CalPlayer double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2; double deltaAngle = spread / 8f; double offsetAngle; - int i; int damage = (int)(800 * player.RangedDamage()); if (player.whoAmI == Main.myPlayer) { - for (i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { float ai1 = Main.rand.NextFloat() + 0.5f; float randomSpeed = (float)Main.rand.Next(1, 7); @@ -2625,6 +2630,34 @@ namespace CalamityMod.CalPlayer } if (plagueReaper && plagueReaperCooldown <= 0) plagueReaperCooldown = 1800; + if (forbiddenCirclet) + { + int stormMana = (int)(ForbiddenCirclet.manaCost * player.manaCost); + if (player.statMana < stormMana) + { + if (player.manaFlower) + { + player.QuickMana(); + } + } + if (player.statMana >= stormMana) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= stormMana; + float dmgMult = player.RogueDamage() + player.minionDamage - 1f; + int damage = (int)(ForbiddenCirclet.tornadoBaseDmg * dmgMult); + if (player.HasBuff(BuffID.ManaSickness)) + { + int sickPenalty = (int)(damage * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60))); + damage -= sickPenalty; + } + float kBack = ForbiddenCirclet.tornadoBaseKB + player.minionKB; + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType(), damage, kBack, player.whoAmI, 0f, 0f); + } + } + } } if (CalamityMod.AstralArcanumUIHotkey.JustPressed && astralArcanum) { @@ -5125,20 +5158,22 @@ namespace CalamityMod.CalPlayer #endregion #region MultiplicativeReductions - // Forbidden and Fearmonger armor makes you immune to the summoner cross-class nerf + // Fearmonger armor makes you immune to the summoner cross-class nerf + // Forbidden armor makes you immune when holding the respective helmet's preferred weapon type // Profaned Soul Crystal encourages use of other weapons, nerfing the damage would not make sense. bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor; - if (isSummon && !fearmongerSet && !forbidden && !profanedCrystalBuffs) + if (isSummon && !fearmongerSet && !profanedCrystalBuffs && + (!forbidden || !heldItem.magic) && (!forbiddenCirclet || !heldItem.Calamity().rogue)) { - if (heldItem.type > 0) - { - if (!heldItem.summon && - (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && - heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) - { - damage = (int)(damage * 0.75); - } - } + if (heldItem.type > 0) + { + if (!heldItem.summon && + (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && + heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) + { + damage = (int)(damage * 0.75); + } + } } if (proj.ranged) { @@ -8361,6 +8396,59 @@ namespace CalamityMod.CalPlayer } }); + public static readonly PlayerLayer ForbiddenCircletSign = new PlayerLayer("CalamityMod", "ForbiddenSigil", PlayerLayer.BackAcc, delegate (PlayerDrawInfo drawInfo) + { + DrawData drawData = new DrawData(); + Player drawPlayer = drawInfo.drawPlayer; + CalamityPlayer modPlayer = drawPlayer.Calamity(); + if (drawInfo.shadow != 0f || drawPlayer.dead || !modPlayer.forbiddenCirclet) + { + return; + } + SpriteEffects spriteEffects = SpriteEffects.FlipHorizontally; + if (drawPlayer.gravDir == 1f) + { + if (drawPlayer.direction == 1) + { + spriteEffects = SpriteEffects.None; + } + else + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + } + else + { + if (drawPlayer.direction == 1) + { + spriteEffects = SpriteEffects.FlipVertically; + } + else + { + spriteEffects = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; + } + } + int dyeShader = 0; + if (drawPlayer.dye[1] != null) + dyeShader = (int)drawPlayer.dye[1].dye; + Microsoft.Xna.Framework.Color color12 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)drawInfo.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawInfo.position.Y + (double)drawPlayer.height * 0.5) / 16, Microsoft.Xna.Framework.Color.White), drawInfo.shadow); + Microsoft.Xna.Framework.Color color19 = Microsoft.Xna.Framework.Color.Lerp(color12, Microsoft.Xna.Framework.Color.White, 0.7f); + Texture2D texture = Main.extraTexture[ExtrasID.ForbiddenSign]; + Texture2D glowmask = Main.glowMaskTexture[GlowMaskID.ForbiddenSign]; + int num24 = (int)(((float)((double)drawPlayer.miscCounter / 300 * MathHelper.TwoPi)).ToRotationVector2().Y * 6f); + float num25 = ((float)((double) drawPlayer.miscCounter / 75.0 * MathHelper.TwoPi)).ToRotationVector2().X * 4f; + Microsoft.Xna.Framework.Color color20 = new Microsoft.Xna.Framework.Color(80, 70, 40, 0) * (float) ((double) num25 / 8.0 + 0.5) * 0.8f; + Vector2 position = new Vector2((float)((double)drawInfo.position.X - (double)Main.screenPosition.X - (double)(drawPlayer.bodyFrame.Width / 2) + (double)(drawPlayer.width / 2)), (float)((double)drawInfo.position.Y - (double)Main.screenPosition.Y + (double)drawPlayer.height - (double)drawPlayer.bodyFrame.Height + 4.0)) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)) + new Vector2((float)(-drawPlayer.direction * 10), (float)(num24 - 20)); + drawData = new DrawData(texture, position, new Microsoft.Xna.Framework.Rectangle?(), color19, drawPlayer.bodyRotation, texture.Size() / 2f, 1f, spriteEffects, 0); + drawData.shader = dyeShader; + Main.playerDrawData.Add(drawData); + for (float num26 = 0.0f; num26 < 4f; ++num26) + { + drawData = new DrawData(glowmask, position + (num26 * MathHelper.PiOver2).ToRotationVector2() * num25, new Microsoft.Xna.Framework.Rectangle?(), color20, drawPlayer.bodyRotation, texture.Size() / 2f, 1f, spriteEffects, 0); + Main.playerDrawData.Add(drawData); + } + }); + public static readonly PlayerLayer Skin = new PlayerLayer("CalamityMod", "Skin", PlayerLayer.Skin, delegate (PlayerDrawInfo drawInfo) { Player drawPlayer = drawInfo.drawPlayer; @@ -8461,6 +8549,11 @@ namespace CalamityMod.CalPlayer int legsIndex = list.IndexOf(PlayerLayer.Skin); list.Insert(legsIndex - 1, Tail); } + if (forbiddenCirclet) + { + int drawTheStupidSign = list.IndexOf(PlayerLayer.Skin); + list.Insert(drawTheStupidSign, ForbiddenCircletSign); + } list.Add(ColdDivinityOverlay); list.Add(StratusSphereDrawing); } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ffb05745ac..4311cad2ad 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -912,6 +912,8 @@ namespace CalamityMod.CalPlayer modPlayer.hallowedRuneCooldown--; if (modPlayer.sulphurBubbleCooldown > 0) modPlayer.sulphurBubbleCooldown--; + if (modPlayer.forbiddenCooldown > 0) + modPlayer.forbiddenCooldown--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) @@ -1193,6 +1195,12 @@ namespace CalamityMod.CalPlayer light[2] += 0.9f; } } + if (modPlayer.forbiddenCirclet) + { + light[0] += 0.8f; + light[1] += 0.7f; + light[2] += 0.2f; + } Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), light[0], light[1], light[2]); // Blazing Core bonus @@ -3438,6 +3446,21 @@ namespace CalamityMod.CalPlayer #region Limits private static void Limits(Player player, CalamityPlayer modPlayer) { + //not sure where else this should go + if (modPlayer.forbiddenCirclet) + { + float rogueDmg = player.thrownDamage + modPlayer.throwingDamage - 1f; + float minionDmg = player.minionDamage; + if (minionDmg < rogueDmg) + { + player.minionDamage = rogueDmg; + } + if (rogueDmg < minionDmg) + { + modPlayer.throwingDamage = minionDmg - player.thrownDamage + 1f; + } + } + if (player.meleeSpeed < 0.5f) player.meleeSpeed = 0.5f; diff --git a/Items/Armor/ForbiddenCirclet.cs b/Items/Armor/ForbiddenCirclet.cs new file mode 100644 index 0000000000..f26db05c40 --- /dev/null +++ b/Items/Armor/ForbiddenCirclet.cs @@ -0,0 +1,80 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Head)] + public class ForbiddenCirclet : ModItem + { + public const int manaCost = 50; + public const int tornadoBaseDmg = 100; + public const float tornadoBaseKB = 1f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Forbidden Circlet"); + Tooltip.SetDefault("10% increased summon damage and 15% increased rogue velocity"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.defense = 1; //21 + //same rarity and sell price as Forbidden Mask + item.value = Item.buyPrice(0, 25, 0, 0); + item.rare = 5; + //I lied, it's patron dark red + item.Calamity().customRarity = CalamityRarity.Dedicated; + } + + public override bool IsArmorSet(Item head, Item body, Item legs) + { + return body.type == ItemID.AncientBattleArmorShirt && legs.type == ItemID.AncientBattleArmorPants; + } + + public override void ArmorSetShadows(Player player) + { + player.armorEffectDrawShadowLokis = true; + player.armorEffectDrawOutlinesForbidden = true; + } + + public override void UpdateArmorSet(Player player) + { + int stormMana = (int)(manaCost * player.manaCost); + string hotkey = CalamityMod.TarraHotKey.TooltipHotkeyString(); + player.setBonus = "Press " + hotkey + " to call an ancient storm to the cursor location\n" + + "The ancient storm costs " + stormMana + " mana and benefits from both summon and rogue bonuses\n" + + "Rogue stealth strikes spawn homing eaters on enemy hits\n" + + "Minions deal full damage while wielding rogue weapons\n" + + "Rogue and summon attacks will scale off of the stat with a higher boost\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.forbiddenCirclet = true; + modPlayer.rogueStealthMax += 1f; + modPlayer.wearingRogueArmor = true; + } + + public override void UpdateEquip(Player player) + { + player.minionDamage += 0.1f; + player.Calamity().throwingVelocity += 0.15f; + } + + public override void AddRecipes() + { + //Same recipe as Forbidden Mask + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.AncientBattleArmorMaterial); + recipe.AddRecipeGroup("AnyAdamantiteBar", 10); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/ForbiddenCirclet.png b/Items/Armor/ForbiddenCirclet.png new file mode 100644 index 0000000000000000000000000000000000000000..b1d5651effed15c664dfa115331a1d8595d1a3b5 GIT binary patch literal 446 zcmeAS@N?(olHy`uVBq!ia0vp^VnEEt!3HF?4d0vvQY`6?zK#qG8~eHcB(ehejKx9j zP7LeL$-D$|6p}rHd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!tD z$=lt9;Xep2*t>i(&?FvD7sn8b(|fP%^>TI;VR`W0D@lY^SYXW&HAck+OD;rY20dlX z35tliq47hZ$$#RZc7ZiLVvddiNy=eOt*uQT-$$uv$8|=GaH*#=9rV2WY1` zmKw6(O5gkA_QZ@0YTvv!&*X4h(sJSJo<^ByS6;OXk;vd$@?2>^jyvLqiJ#!!Mvv!wUw6QUeBtR|yOZRx=nF#0%!^3bX-A zuqAoByDX#WRlm0js*|09!0#7d!(~}_szdgCY-FC_wLO* z9^?CejIEE(W|*D(`v0!Q-}UY5m))){eZM}r{{Njl)pPFc{KmKJ>AHP8=c?@dd-va~ z6Z3u6U%GX^TyJi4_1AydCzsb944!{5`P?ln&%C;CS(Ba|TW+uJsrP=)eXmK?)%9y8 zJ((=6uj*;H|L5&n$v1AW&i}#VcY1Hp!v~gsKRtMV_2JiR4@)Pd{N5@)NhSW@hq6ge zZoQiuI%!Y!(+55KK40s07q__|pF;A%GOO58m&BX8MKkQ%UphNV!=5H)AEC6pK^@0vLcq=pf! zVwxA+0-ze>+f5hG_JAw^ssW`v28IZV9gz^c(k^OM|Fl<&m;TCFX_pplu&Uqis=N2s zi$S$uD;T`NE(Ti)blA+?gD=vKL4C#yR-rQ$>MO9Cv~8@5XG>m&1Pc$ui1fuaS(^P( zrxs89v|_2vtlWbd{l})b>pl(iu4Ez3hz%jofB^^a%$s68d1*e-zyX_ZAP5>TkN^hy zW7kYWXy`)}EDNgL5+bh)^&2p>L*$d89*4M+^3Y~D=T>E{<5P7;;`4?rT=9MItWaj5F7`8;bc@OfGr>mdKI;Vst E0AaByI{*Lx literal 0 HcmV?d00001 diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 56125cbd3d..e49276c2b2 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1527,14 +1527,17 @@ namespace CalamityMod.Items } if (item.type == ItemID.AncientBattleArmorHat || item.type == ItemID.AncientBattleArmorShirt || item.type == ItemID.AncientBattleArmorPants) { - foreach (TooltipLine line2 in tooltips) - { - if (line2.mod == "Terraria" && line2.Name == "SetBonus") - { - line2.text = "Set Bonus: Double tap " + (Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN") + " to call an ancient storm to the cursor location\n" + - "Minions deal full damage while wielding weaponry"; - } - } + if (!Main.player[Main.myPlayer].Calamity().forbiddenCirclet) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: Double tap " + (Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN") + " to call an ancient storm to the cursor location\n" + + "Minions deal full damage while wielding magic weapons"; + } + } + } } if (item.type == ItemID.GladiatorHelmet) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 9c6ff190a5..cf0580ce95 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1449,6 +1449,20 @@ namespace CalamityMod.Projectiles } } + if (modPlayer.nanotech && stealthStrike && modPlayer.forbiddenCooldown <= 0) + { + for (int index2 = 0; index2 < 6; index2++) + { + float xVector = (float)Main.rand.Next(-35, 36) * 0.02f; + float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; + xVector *= 10f; + yVector *= 10f; + int dmg = (int)(75 + (projectile.damage * 0.05f)); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), dmg, projectile.knockBack, projectile.owner, 0f, 0f); + modPlayer.forbiddenCooldown = 15; + } + } + if (modPlayer.corrosiveSpine && projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType()) { for (int i = 0; i < 3; i++) diff --git a/Projectiles/Rogue/CircletMark.cs b/Projectiles/Rogue/CircletMark.cs new file mode 100644 index 0000000000..487b64d914 --- /dev/null +++ b/Projectiles/Rogue/CircletMark.cs @@ -0,0 +1,160 @@ +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class CircletMark : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mark"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.timeLeft = 900; + projectile.ignoreWater = true; + projectile.alpha = 255; + projectile.Calamity().rogue = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + Color newColor3 = new Color(255, 255, 255); + if (projectile.soundDelay == 0) + { + projectile.soundDelay = -1; + Main.PlaySound(2, projectile.Center, 60); + } + if (projectile.localAI[1] < 30f) + { + for (int num1134 = 0; num1134 < 1; num1134++) + { + float value79 = -0.5f; + float value80 = 0.9f; + float amount4 = Main.rand.NextFloat(); + Vector2 value81 = new Vector2(MathHelper.Lerp(0.1f, 1f, Main.rand.NextFloat()), MathHelper.Lerp(value79, value80, amount4)); + value81.X *= MathHelper.Lerp(2.2f, 0.6f, amount4); + value81.X *= -1f; + Vector2 value82 = new Vector2(2f, 10f); + Vector2 position4 = projectile.Center + new Vector2(60f, 200f) * value81 * 0.5f + value82; + Dust dust34 = Main.dust[Dust.NewDust(position4, 0, 0, 269, 0f, 0f, 0, default, 0.5f)]; + dust34.position = position4; + dust34.customData = projectile.Center + value82; + dust34.fadeIn = 1f; + dust34.scale = 0.3f; + if (value81.X > -1.2f) + { + dust34.velocity.X = 1f + Main.rand.NextFloat(); + } + dust34.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f; + } + } + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = 0.8f; + projectile.direction = 1; + Point point9 = projectile.Center.ToTileCoordinates(); + projectile.Center = new Vector2((float)(point9.X * 16 + 8), (float)(point9.Y * 16 + 8)); + } + projectile.rotation = projectile.localAI[1] / 40f * 6.28318548f * (float)projectile.direction; + if (projectile.localAI[1] < 33f) + { + if (projectile.alpha > 0) + { + projectile.alpha -= 8; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + } + if (projectile.localAI[1] > 103f) + { + if (projectile.alpha < 255) + { + projectile.alpha += 16; + } + if (projectile.alpha > 255) + { + projectile.alpha = 255; + } + } + if (projectile.alpha == 0) + { + Lighting.AddLight(projectile.Center, newColor3.ToVector3() * 0.5f); + } + for (int num1135 = 0; num1135 < 2; num1135++) + { + if (Main.rand.NextBool(10)) + { + Vector2 value83 = Vector2.UnitY.RotatedBy((double)((float)num1135 * 3.14159274f), default).RotatedBy((double)projectile.rotation, default); + Dust dust35 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 269, 0f, 0f, 225, newColor3, 1f)]; + dust35.noGravity = true; + dust35.noLight = true; + dust35.scale = projectile.Opacity * projectile.localAI[0]; + dust35.position = projectile.Center; + dust35.velocity = value83 * 2.5f; + } + } + for (int num1136 = 0; num1136 < 2; num1136++) + { + if (Main.rand.NextBool(10)) + { + Vector2 value84 = Vector2.UnitY.RotatedBy((double)((float)num1136 * 3.14159274f), default); + Dust dust36 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 269, 0f, 0f, 225, newColor3, 1.5f)]; + dust36.noGravity = true; + dust36.noLight = true; + dust36.scale = projectile.Opacity * projectile.localAI[0]; + dust36.position = projectile.Center; + dust36.velocity = value84 * 2.5f; + } + } + if (projectile.localAI[1] < 33f || projectile.localAI[1] > 87f) + { + projectile.scale = projectile.Opacity / 2f * projectile.localAI[0]; + } + projectile.velocity = Vector2.Zero; + projectile.localAI[1] += 1f; + if (projectile.localAI[1] == 60f && projectile.owner == Main.myPlayer) + { + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0f, 0f); + } + if (projectile.localAI[1] >= 120f) + { + projectile.Kill(); + return; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Color color25 = Lighting.GetColor((int)((double)projectile.position.X + (double)projectile.width * 0.5) / 16, (int)(((double)projectile.position.Y + (double)projectile.height * 0.5) / 16.0)); + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 vector38 = projectile.position + new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture2D27 = Main.projectileTexture[projectile.type]; + Rectangle rectangle11 = texture2D27.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame); + Color alpha5 = projectile.GetAlpha(color25); + Vector2 origin7 = rectangle11.Size() / 2f; + Color color47 = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); + Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), color47, 0f, origin7, new Vector2(1f, 5f) * projectile.scale * 2f, spriteEffects, 0f); + Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, projectile.rotation, origin7, projectile.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture2D27, vector38, new Microsoft.Xna.Framework.Rectangle?(rectangle11), alpha5, 0f, origin7, new Vector2(1f, 8f) * projectile.scale, spriteEffects, 0f); + return false; + } + } +} diff --git a/Projectiles/Rogue/CircletMark.png b/Projectiles/Rogue/CircletMark.png new file mode 100644 index 0000000000000000000000000000000000000000..2bbbfb60bb77e0c2f694cf5ef86967bfc677008b GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!Y)RhkE)4%caKYZ?lYt_f1s;*b z3=DinK$vl=HlH+5kiEpy*OmPNHy4YQx@-92nLwd@PZ!6Kid%0l7&0<2a4;)ut$#lA zzVCMY;Iv2Z#;C?ORN5Kjms45fg4MW`a77O+~NtN=`rV-u= 10f) + { + projectile.localAI[1] = 0f; + int projCount = 0; + int oldestTornado = 0; + float tornadoAge = 0f; + int projType = projectile.type; + for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) + { + Projectile proj = Main.projectile[projIndex]; + if (proj.active && proj.owner == projectile.owner && proj.type == projType && proj.ai[0] < 900f) + { + projCount++; + if (proj.ai[0] > tornadoAge) + { + oldestTornado = projIndex; + tornadoAge = proj.ai[0]; + } + } + } + if (projCount > 1) + { + Main.projectile[oldestTornado].netUpdate = true; + Main.projectile[oldestTornado].ai[0] = 36000f; + return; + } + } + + float lifeSpan = 900f; + if (projectile.soundDelay == 0) + { + projectile.soundDelay = -1; + Main.PlaySound(2, projectile.Center, 122); + } + projectile.ai[0] += 1f; + if (projectile.ai[0] >= lifeSpan) + { + projectile.Kill(); + } + if (projectile.localAI[0] >= 30f) + { + projectile.damage = 0; + if (projectile.ai[0] < lifeSpan - 120f) + { + float num1126 = projectile.ai[0] % 60f; + projectile.ai[0] = lifeSpan - 120f + num1126; + projectile.netUpdate = true; + } + } + float num1127 = 15f; + float num1128 = 15f; + Point point8 = projectile.Center.ToTileCoordinates(); + int num1129; + int num1130; + Collision.ExpandVertically(point8.X, point8.Y, out num1129, out num1130, (int)num1127, (int)num1128); + num1129++; + num1130--; + Vector2 value72 = new Vector2((float)point8.X, (float)num1129) * 16f + new Vector2(8f); + Vector2 value73 = new Vector2((float)point8.X, (float)num1130) * 16f + new Vector2(8f); + Vector2 vector146 = Vector2.Lerp(value72, value73, 0.5f); + Vector2 value74 = new Vector2(0f, value73.Y - value72.Y); + value74.X = value74.Y * 0.2f; + projectile.width = (int)(value74.X * 0.65f); + projectile.height = (int)value74.Y; + projectile.Center = vector146; + if (projectile.owner == Main.myPlayer) + { + bool flag74 = false; + Vector2 center16 = Main.player[projectile.owner].Center; + Vector2 top = Main.player[projectile.owner].Top; + for (float num1131 = 0f; num1131 < 1f; num1131 += 0.05f) + { + Vector2 position2 = Vector2.Lerp(value72, value73, num1131); + if (Collision.CanHitLine(position2, 0, 0, center16, 0, 0) || Collision.CanHitLine(position2, 0, 0, top, 0, 0)) + { + flag74 = true; + break; + } + } + if (!flag74 && projectile.ai[0] < lifeSpan - 120f) + { + float num1132 = projectile.ai[0] % 60f; + projectile.ai[0] = lifeSpan - 120f + num1132; + projectile.netUpdate = true; + } + } + if (projectile.ai[0] < lifeSpan - 120f) + { + return; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + float num226 = 600f; + float num227 = 15f; + float num228 = 15f; + float num229 = projectile.ai[0]; + float scale5 = MathHelper.Clamp(num229 / 30f, 0f, 1f); + if (num229 > num226 - 60f) + { + scale5 = MathHelper.Lerp(1f, 0f, (num229 - (num226 - 60f)) / 60f); + } + Point point5 = projectile.Center.ToTileCoordinates(); + int num230; + int num231; + Collision.ExpandVertically(point5.X, point5.Y, out num230, out num231, (int)num227, (int)num228); + num230++; + num231--; + float num232 = 0.2f; + Vector2 value32 = new Vector2((float)point5.X, (float)num230) * 16f + new Vector2(8f); + Vector2 value33 = new Vector2((float)point5.X, (float)num231) * 16f + new Vector2(8f); + Vector2.Lerp(value32, value33, 0.5f); + Vector2 vector33 = new Vector2(0f, value33.Y - value32.Y); + vector33.X = vector33.Y * num232; + new Vector2(value32.X - vector33.X / 2f, value32.Y); + Texture2D texture2D23 = Main.projectileTexture[projectile.type]; + Rectangle rectangle9 = texture2D23.Frame(1, 1, 0, 0); + Vector2 origin3 = rectangle9.Size() / 2f; + float num233 = -0.06283186f * num229; + Vector2 spinningpoint2 = Vector2.UnitY.RotatedBy((double)(num229 * 0.1f), default); + float num234 = 0f; + float num235 = 5.1f; + Color value34 = new Color(225, 225, 100); + for (float num236 = (float)(int)value33.Y; num236 > (float)(int)value32.Y; num236 -= num235) + { + num234 += num235; + float num237 = num234 / vector33.Y; + float num238 = num234 * 6.28318548f / -20f; + float num239 = num237 - 0.15f; + Vector2 vector34 = spinningpoint2.RotatedBy((double)num238, default); + Vector2 value35 = new Vector2(0f, num237 + 1f); + value35.X = value35.Y * num232; + Color color39 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, value34, num237 * 2f); + if (num237 > 0.5f) + { + color39 = Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, value34, 2f - num237 * 2f); + } + color39.A = (byte)((float)color39.A * 0.5f); + color39 *= scale5; + vector34 *= value35 * 100f; + vector34.Y = 0f; + vector34.X = 0f; + vector34 += new Vector2(value33.X, num236) - Main.screenPosition; + Main.spriteBatch.Draw(texture2D23, vector34, new Microsoft.Xna.Framework.Rectangle?(rectangle9), color39, num233 + num238, origin3, 1f + num239, SpriteEffects.None, 0f); + } + return false; + } + } +} diff --git a/Projectiles/Rogue/CircletTornado.png b/Projectiles/Rogue/CircletTornado.png new file mode 100644 index 0000000000000000000000000000000000000000..c97d6cde912c9b34d9b708553dacf2f283eed563 GIT binary patch literal 813 zcmV+|1JeA7P)Px#1ZP1_K>z@;j|==^1poj54^T{0MF0Q*1qB5kA0IY0HeX*~kFwtb0008KNklNfBYQ*%T&In}uvRHJYpNXtR(Fhrn1>18UeayWj6$ zE$()^zZSFML_`|~&xD$#&khEI;&aSGHhd?d4Ns@j9~Kvj#V?B(@yvo}7(CNDF4vXN z%*cjA^!xo6i!OrWqIXcNs@#Scv)=#!S^aq$ao9?Qe@P9*>LM_Q1@1 zKL2TPHk%a@(`r`7i!}@NH4Ldt-%4t;P+!Bt;qbe~&~8P|dVQ80jfLEXRBP^R7%&ao zN$rP0Xf*oT>2!+EjKkq@v}k5er_(<(dpsUr&DiB~ zDXx8lU9%VC|L?mWQ9HvA|A#Gi?PX@k+Zb#nT${f}uF|(c71gJapr?osV=IPiI2JXl rRPD3(CL6vMUHOD~mRYEo;YQ;P5I1hG)gtV_00000NkvXXu0mjf#}Rm> literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs new file mode 100644 index 0000000000..636e4a175d --- /dev/null +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -0,0 +1,188 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class ForbiddenCircletEater : ModProjectile + { + private int bounce = 3; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Circlet Eater"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 16; + projectile.height = 16; + projectile.friendly = true; + projectile.alpha = 255; + projectile.penetrate = 1; + projectile.timeLeft = 300; + projectile.minion = true; + projectile.extraUpdates = 3; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + if (projectile.alpha > 0) + { + projectile.alpha -= 50; + } + else + { + projectile.extraUpdates = 0; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + projectile.frameCounter++; + if (projectile.frameCounter >= 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= 4) + { + projectile.frame = 0; + } + for (int num369 = 0; num369 < 1; num369++) + { + int dustType = 159; + float num370 = projectile.velocity.X / 3f * (float)num369; + float num371 = projectile.velocity.Y / 3f * (float)num369; + int num372 = Dust.NewDust(projectile.position, projectile.width, projectile.height, dustType, 0f, 0f, 0, default, 1f); + Dust dust = Main.dust[num372]; + dust.position.X = projectile.Center.X - num370; + dust.position.Y = projectile.Center.Y - num371; + dust.velocity *= 0f; + dust.scale = 0.5f; + } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.PiOver2; + float num373 = projectile.position.X; + float num374 = projectile.position.Y; + float num375 = 100000f; + bool flag10 = false; + projectile.ai[0] += 1f; + if (projectile.ai[0] > 30f) + { + projectile.ai[0] = 30f; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num377 = npc.position.X + (float)(npc.width / 2); + float num378 = npc.position.Y + (float)(npc.height / 2); + float num379 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num377) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num378); + if (num379 < 640f && num379 < num375 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + { + num375 = num379; + num373 = num377; + num374 = num378; + flag10 = true; + } + } + } + else + { + for (int num376 = 0; num376 < Main.maxNPCs; num376++) + { + NPC npc = Main.npc[num376]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num377 = npc.position.X + (float)(npc.width / 2); + float num378 = npc.position.Y + (float)(npc.height / 2); + float num379 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num377) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num378); + if (num379 < 640f && num379 < num375 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + { + num375 = num379; + num373 = num377; + num374 = num378; + flag10 = true; + } + } + } + } + } + if (!flag10) + { + num373 = projectile.position.X + (float)(projectile.width / 2) + projectile.velocity.X * 100f; + num374 = projectile.position.Y + (float)(projectile.height / 2) + projectile.velocity.Y * 100f; + } + float num380 = 10f; + float num381 = 0.16f; + Vector2 vector30 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num382 = num373 - vector30.X; + float num383 = num374 - vector30.Y; + float num384 = (float)Math.Sqrt((double)(num382 * num382 + num383 * num383)); + num384 = num380 / num384; + num382 *= num384; + num383 *= num384; + if (projectile.velocity.X < num382) + { + projectile.velocity.X = projectile.velocity.X + num381; + if (projectile.velocity.X < 0f && num382 > 0f) + { + projectile.velocity.X = projectile.velocity.X + num381 * 2f; + } + } + else if (projectile.velocity.X > num382) + { + projectile.velocity.X = projectile.velocity.X - num381; + if (projectile.velocity.X > 0f && num382 < 0f) + { + projectile.velocity.X = projectile.velocity.X - num381 * 2f; + } + } + if (projectile.velocity.Y < num383) + { + projectile.velocity.Y = projectile.velocity.Y + num381; + if (projectile.velocity.Y < 0f && num383 > 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num381 * 2f; + } + } + else if (projectile.velocity.Y > num383) + { + projectile.velocity.Y = projectile.velocity.Y - num381; + if (projectile.velocity.Y > 0f && num383 < 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num381 * 2f; + } + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + bounce--; + if (bounce <= 0) + { + projectile.Kill(); + } + else + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + } + return false; + } + + public override bool CanDamage() + { + return projectile.ai[0] >= 30f; + } + } +} diff --git a/Projectiles/Summon/ForbiddenCircletEater.png b/Projectiles/Summon/ForbiddenCircletEater.png new file mode 100644 index 0000000000000000000000000000000000000000..03acf72b763f15fbe41d0f94fe4776c802e9758a GIT binary patch literal 1179 zcmV;M1Z4Y(P)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00ZesL_t(&-tC${Xj4HP$3M@eEzv>} zMN_CorLBV&6h(2YgA|-x9J09!7Q{{6bQ3|ry;}ztCqW!^l!}6&B5KjrKQxLam9(L0 zEUO*lZTa#qdDqe;M$}heZIkxFSwPychoK z?7b5MFn%i!z|&`Q0Nft00x(+a0pR5EZ2%N6l_KMv5eJeDeY-jU`1<`%2=Msz2>?zV znurXv+xvEP1UlXmF*+OUHIy|zd-Wgy_piT+Y?ph0&JKUXVv`H~08HFfB)w-Y12FU8 zCIBZcsG0S5Pp%l#De-b1&&;O-fKn|T0`%?Psn<~D>DiHc#+qib`vG|Qr3^qmT?+tu zx7KjG#&VI%<>fL2IC^XZfKurr0FQ2{*V9)NX+E!BUp#+kj8!g|+!Dv`6+-&;%R5ba z!0?mIKXDRSQoC2;!16Vn#hQo>GSO~vI@up_ z@5o*N3Ijg@xN|;QZHjiA{;)$wwu)GYAaAT89p|*K)Fxwgf79F(XLH>FH1aZ&9RiZo z=I!xGBfe5za7(TBkNsDfLWTT3QUXA80?4v~|QbxovTz z&WYRBwv`sd>0w*%##vmv)BV`kcMFBB0l<-kC8J}uyAD8Q!F*B_3TjKAo}M?xasLDn zm07%03IV37+W|Pd<5wj4%b%(}JN?U!_e3lzbNrU_MNN(t6``#*FOKDO|4t)bRHuhZ z;ln9|R4hqtO8<$wQ%0P7Vo{Nx2r}8V)i$M8)QERX91IV18s8Yn&-JQJJKx>^mY$hU zD?(jAwykgX>T1(l{WvB2ZZ5Zdc@|cmRqJkIrJ9=Y+i$_#jf94>u+)T z!(Ubi>EIsK^#1cw2r$&23IJYBDt~ZK%9yRUN?~js3#naSi>S9n-X~|oi36WJzOC`3 zj_@};@J4NUjU&#dfri2vEzTLfC?4rQtl#zjZw09v%iR}+Bqn}RcC>Ckjyp+DGWW#t z+d>rk#WD5Flaq8?Z8lEQt42Kd%8H7vn@v>}$$C%HGhKB((wrw^yV56W^4fj$+J4mj zkkKw$u630{vCVgq9&rx6u6BRKQVFb9%d1vnrN(Jj4xJOXtFi8hH=q3l?_kN_?(gS( t0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1liWC6fRE literal 0 HcmV?d00001 From 94f230162a3a2ecd6c4c98a23c023dbba5ebe22b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Apr 2020 22:09:27 -0400 Subject: [PATCH 02/14] forbidden circlet mod call --- ModSupport/ModCalls.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index a35ea25f6a..193812415c 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -586,6 +586,10 @@ namespace CalamityMod if (setBonus == "mollusk") return mp.molluskSet; + // Forbidden Circlet + if (setBonus == "forbidden_circlet" || setBonus == "forbidden circlet") + return mp.forbiddenCirclet; + // Daedalus switch (setBonus) { @@ -890,6 +894,13 @@ namespace CalamityMod return true; } + // Forbidden Circlet + if (setBonus == "forbidden_circlet" || setBonus == "forbidden circlet") + { + mp.forbiddenCirclet = enabled; + return true; + } + // Daedalus switch (setBonus) { From 3309c85130c84954fba95a813990c5149f21bd16 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Apr 2020 23:13:12 -0400 Subject: [PATCH 03/14] bloodworm now shows up on lifeform analyzer --- NPCs/AcidRain/BloodwormNormal.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index be417a321c..ce4cdfc89b 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -33,6 +33,7 @@ namespace CalamityMod.NPCs.AcidRain npc.DeathSound = SoundID.NPCDeath1; npc.catchItem = (short)ModContent.ItemType(); npc.dontTakeDamageFromHostiles = true; + npc.rarity = 4; } public override void AI() From b0e1aded9565090eb20888f3d10e60582417dac1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 20 Apr 2020 23:52:56 -0400 Subject: [PATCH 04/14] lad pet and summon acc cooldown --- Buffs/Pets/LadBuff.cs | 28 ++++++++ Buffs/Pets/LadBuff.png | Bin 0 -> 418 bytes CalPlayer/CalamityPlayer.cs | 9 ++- CalPlayer/CalamityPlayerMiscEffects.cs | 2 + Items/Pets/JoyfulHeart.cs | 40 +++++++++++ Items/Pets/JoyfulHeart.png | Bin 0 -> 343 bytes NPCs/CalamityGlobalNPC.cs | 16 +++++ NPCs/CalamityGlobalNPCLoot.cs | 1 + Projectiles/CalamityGlobalProjectile.cs | 61 ++++++++-------- Projectiles/Pets/FoxPet.cs | 3 +- Projectiles/Pets/LadShark.cs | 88 ++++++++++++++++++++++++ Projectiles/Pets/LadShark.png | Bin 0 -> 394 bytes 12 files changed, 217 insertions(+), 31 deletions(-) create mode 100644 Buffs/Pets/LadBuff.cs create mode 100644 Buffs/Pets/LadBuff.png create mode 100644 Items/Pets/JoyfulHeart.cs create mode 100644 Items/Pets/JoyfulHeart.png create mode 100644 Projectiles/Pets/LadShark.cs create mode 100644 Projectiles/Pets/LadShark.png diff --git a/Buffs/Pets/LadBuff.cs b/Buffs/Pets/LadBuff.cs new file mode 100644 index 0000000000..655bc61f3c --- /dev/null +++ b/Buffs/Pets/LadBuff.cs @@ -0,0 +1,28 @@ +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Pets +{ + public class LadBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("The Father"); + Description.SetDefault("A father of many floats around you"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.Calamity().ladShark = true; + bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; + if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); + } + } + } +} diff --git a/Buffs/Pets/LadBuff.png b/Buffs/Pets/LadBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..a36aea5070b76c6385cc18ecd65065202e973801 GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$qWpPmYyz- zArXg@Qyd!p^L%0L;Q<1ll5HZZwf`9#7#PIVaC0_v=PL^Ro&E0N)rc3%TMns*?cHa< zJS8nfLPYTZQ}TftKISO46?P@lou{_{WC`zhQ`2(Ssid0CpX0zIfoGqMoZslVeYf0Y z;bW_FB;ir)bHy)PxmRSSerRE^YWT@Ay}yvLN%efbX2oIP|LtvY@Vy+Jx2g!@J-`YB@1%r8f17mxv6|R z@kW-JL4r9WM)ykAVqmZemAFO#k*AxLe^F*?UP)p}W_})nVN1lD_dr<&Pgg&ebxsLQ E0IWu&*#H0l literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 702b9d16d4..bb4b6c4bbc 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -11,6 +11,7 @@ using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Pets; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; @@ -242,6 +243,8 @@ namespace CalamityMod.CalPlayer public bool leviPet = false; public bool plaguebringerBab = false; public bool rotomPet = false; + public bool ladShark = false; + public int ladHearts = 0; public bool sparks = false; public bool sirenPet = false; public bool fox = false; @@ -1255,6 +1258,7 @@ namespace CalamityMod.CalPlayer leviPet = false; plaguebringerBab = false; rotomPet = false; + ladShark = false; sparks = false; sirenPet = false; fox = false; @@ -1861,6 +1865,7 @@ namespace CalamityMod.CalPlayer doubledHorror = false; sulphurBubbleCooldown = 0; forbiddenCooldown = 0; + ladHearts = 0; alcoholPoisoning = false; shadowflame = false; @@ -2353,6 +2358,8 @@ namespace CalamityMod.CalPlayer if (!mediumcoreDeath) { + if (player.name == "Aleksh" || player.name == "Shark Lad") + items.Add(createItem(ModContent.ItemType())); items.Add(createItem(ModContent.ItemType())); items.Add(createItem(ModContent.ItemType())); items.Add(createItem(ModContent.ItemType())); @@ -9080,7 +9087,7 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (cadence && !player.loveStruck) + if ((cadence || ladHearts > 0) && !player.loveStruck) { if (Main.rand.NextBool(5) && drawInfo.shadow == 0f) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4311cad2ad..073cad069e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -914,6 +914,8 @@ namespace CalamityMod.CalPlayer modPlayer.sulphurBubbleCooldown--; if (modPlayer.forbiddenCooldown > 0) modPlayer.forbiddenCooldown--; + if (modPlayer.ladHearts > 0) + modPlayer.ladHearts--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) diff --git a/Items/Pets/JoyfulHeart.cs b/Items/Pets/JoyfulHeart.cs new file mode 100644 index 0000000000..72c7b785b3 --- /dev/null +++ b/Items/Pets/JoyfulHeart.cs @@ -0,0 +1,40 @@ +using CalamityMod.Buffs.Pets; +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Pets +{ + public class JoyfulHeart : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Joyful Heart"); + Tooltip.SetDefault("It's oddly warm. Attracts the forbidden one."); + } + public override void SetDefaults() + { + item.damage = 0; + item.useStyle = 1; + item.useAnimation = 20; + item.useTime = 20; + item.noMelee = true; + item.width = 30; + item.height = 30; + item.value = Item.sellPrice(0, 1, 0, 0); + item.shoot = ModContent.ProjectileType(); + item.buffType = ModContent.BuffType(); + item.rare = 5; + item.UseSound = SoundID.Item2; + } + + public override void UseStyle(Player player) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(item.buffType, 15, true); + } + } + } +} diff --git a/Items/Pets/JoyfulHeart.png b/Items/Pets/JoyfulHeart.png new file mode 100644 index 0000000000000000000000000000000000000000..9bee4400e0b9d28b46feeb30f9da09463185b441 GIT binary patch literal 343 zcmeAS@N?(olHy`uVBq!ia0vp^azHG_!3HE3EPS&CNU)oT-bN>X0$XK5~cK`@3tUmEU ze)j3Ym&!}(57eCTIC1oaLdAVGkvhYA4Q3!{p8C;$&#wn||98wvbf`Vkq^A%*x8+d% z6)XPL{D}FRZ-jXt~f@Q_scX^9)YZ>d~x!Nf6Is~JUQ(6IGJH 0) sulphurPoison--; + if (ladHearts > 0) + ladHearts--; // Bosses and any specific other NPCs are completely immune to having their movement impaired. if (npc.boss || CalamityMod.movementImpairImmuneList.Contains(npc.type)) @@ -4374,6 +4377,19 @@ namespace CalamityMod.NPCs } } } + if (ladHearts > 0 && !npc.loveStruck) + { + if (Main.rand.NextBool(5)) + { + Vector2 vector2_2 = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); + vector2_2.Normalize(); + vector2_2.X *= 0.66f; + int heart = Gore.NewGore(npc.position + new Vector2((float)Main.rand.Next(npc.width + 1), (float)Main.rand.Next(npc.height + 1)), vector2_2 * (float)Main.rand.Next(3, 6) * 0.33f, 331, (float)Main.rand.Next(40, 121) * 0.01f); + Main.gore[heart].sticky = false; + Main.gore[heart].velocity *= 0.4f; + Main.gore[heart].velocity.Y -= 0.6f; + } + } if (gState > 0 || eFreeze > 0) { diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index f610cd952d..9515cfb220 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1482,6 +1482,7 @@ namespace CalamityMod.NPCs case NPCID.Shark: DropHelper.DropItemChance(npc, ItemID.SharkToothNecklace, Main.expertMode ? 20 : 30); + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 20 : 30); break; case NPCID.PresentMimic: diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index cf0580ce95..8d2084ebaf 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1553,48 +1553,51 @@ namespace CalamityMod.Projectiles }; if (summonExceptionList.TrueForAll(x => projectile.type != x)) { - if (modPlayer.nucleogenesis) + if (modPlayer.jellyDmg <= 0) { - if (Main.rand.NextBool(4)) + if (modPlayer.nucleogenesis) { - int newDamage = (int)(projectile.damage * 0.25); - if (newDamage > 100) + if (Main.rand.NextBool(4)) { - newDamage = (int)((projectile.damage * 0.25 - 100) * 0.1) + 100; + int newDamage = (int)(projectile.damage * 0.25); + if (newDamage > 100) + { + newDamage = (int)((projectile.damage * 0.25 - 100) * 0.1) + 100; + } + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), newDamage, projectile.knockBack * 0.25f, projectile.owner); + modPlayer.jellyDmg = 20f; } - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), newDamage, projectile.knockBack * 0.25f, projectile.owner); } - } - else if (modPlayer.starbusterCore) - { - if (Main.rand.NextBool(3)) + else if (modPlayer.starbusterCore) { - int cap = modPlayer.starTaintedGenerator ? 75 : 60; - int newDamage = (int)(projectile.damage * 0.5); - if (newDamage > cap) + if (Main.rand.NextBool(3)) { - newDamage = (int)((projectile.damage * 0.5 - cap) * 0.1) + cap; + int cap = modPlayer.starTaintedGenerator ? 75 : 60; + int newDamage = (int)(projectile.damage * 0.5); + if (newDamage > cap) + { + newDamage = (int)((projectile.damage * 0.5 - cap) * 0.1) + cap; + } + int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), + newDamage, 3f, projectile.owner); + modPlayer.jellyDmg = 20f; } - int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), - newDamage, 3f, projectile.owner); } - } - else if (modPlayer.nuclearRod) - { - if (Main.rand.NextBool(3)) + else if (modPlayer.nuclearRod) { - int newDamage = (int)(projectile.damage * 0.25); - if (newDamage > 40) + if (Main.rand.NextBool(3)) { - newDamage = (int)((projectile.damage * 0.25 - 40) * 0.1) + 40; + int newDamage = (int)(projectile.damage * 0.25); + if (newDamage > 40) + { + newDamage = (int)((projectile.damage * 0.25 - 40) * 0.1) + 40; + } + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), + newDamage, 0f, projectile.owner); + modPlayer.jellyDmg = 20f; } - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), - newDamage, 0f, projectile.owner); } - } - else if (modPlayer.jellyChargedBattery) - { - if (modPlayer.jellyDmg <= 0) + else if (modPlayer.jellyChargedBattery) { SpawnOrb(projectile, 1.05f, ModContent.ProjectileType(), 800f, 15f); int num = (int)(projectile.damage * 0.5f); diff --git a/Projectiles/Pets/FoxPet.cs b/Projectiles/Pets/FoxPet.cs index 4c4ac5f04d..9d33d0c24c 100644 --- a/Projectiles/Pets/FoxPet.cs +++ b/Projectiles/Pets/FoxPet.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Pets { @@ -19,7 +20,7 @@ namespace CalamityMod.Projectiles.Pets projectile.height = 32; projectile.friendly = true; projectile.aiStyle = 26; - aiType = 334; + aiType = ProjectileID.Puppy; projectile.penetrate = -1; projectile.timeLeft *= 5; } diff --git a/Projectiles/Pets/LadShark.cs b/Projectiles/Pets/LadShark.cs new file mode 100644 index 0000000000..eb19c38d65 --- /dev/null +++ b/Projectiles/Pets/LadShark.cs @@ -0,0 +1,88 @@ +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Pets +{ + public class LadShark : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lad Shark"); + Main.projPet[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + projectile.aiStyle = 26; + aiType = ProjectileID.BabySkeletronHead; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (!player.active) + { + projectile.active = false; + return; + } + if (player.dead) + { + modPlayer.ladShark = false; + } + if (modPlayer.ladShark) + { + projectile.timeLeft = 2; + } + + //occasionally burst in hearts + if (Main.rand.NextBool(10000)) + { + if (projectile.owner == Main.myPlayer) + { + int heartCount = Main.rand.Next(20, 31); + for (int i = 0; i < heartCount; i++) + { + Vector2 velocity = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); + velocity.Normalize(); + velocity.X *= 0.66f; + int heart = Gore.NewGore(projectile.Center, velocity * Main.rand.NextFloat(3f, 5f) * 0.33f, 331, Main.rand.NextFloat(40f, 120f) * 0.01f); + Main.gore[heart].sticky = false; + Main.gore[heart].velocity *= 5f; + } + + Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 15); //mouse squeak sound + + float radius = 240f; // 15 blocks + for (int j = 0; j < Main.maxNPCs; j++) + { + NPC npc = Main.npc[j]; + if (npc.active && !npc.dontTakeDamage && Vector2.Distance(projectile.Center, npc.Center) <= radius) + { + if (npc.Calamity().ladHearts <= 0) + npc.Calamity().ladHearts = CalamityUtils.SecondsToFrames(9f); + } + } + for (int k = 0; k < Main.maxPlayers; k++) + { + Player players = Main.player[k]; + if (!players.dead && Vector2.Distance(projectile.Center, players.Center) <= radius) + { + if (players.Calamity().ladHearts <= 0) + players.Calamity().ladHearts = CalamityUtils.SecondsToFrames(9f); + } + } + } + } + } + } +} diff --git a/Projectiles/Pets/LadShark.png b/Projectiles/Pets/LadShark.png new file mode 100644 index 0000000000000000000000000000000000000000..742270c547c1018221c24b916a079a2f9f351452 GIT binary patch literal 394 zcmV;50d@X~P)_9T5?2H|vjuO;ryX z;`VVgRUNcWzd^|y*dGr`e(-d@My=Ox5Er3mXDqF?L?mY~P;c;W4_M@7A5uHj8_dRs zhy&FC+1y$?Xi>dEgL9Co&bgpt#Ky-y{RVNtndA(_-j8K52E8nHrwsJy*!!taZ_w+9 zQ)e~DTU{igSFcuY(3_~|hBF7$8#L}j4e&-&pG8ywZa!3R(5r)UnF~d|L9Z7B&Y+uh zp@ha;ToymiAfBA7htit@t}1X-j`TID-XQyJDs`6B|8_054n6=;5Q~qQDDQIs000tn oMObu2SV=}YPjYExZggREX>V=-F@#v`?*IS*07*qoM6N<$f Date: Tue, 21 Apr 2020 10:28:04 -0400 Subject: [PATCH 05/14] fixed draconic elixir tooltip --- Items/Potions/DraconicElixir.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 3c53032ac0..a7a01cd9a3 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Potions { DisplayName.SetDefault("Draconic Elixir"); Tooltip.SetDefault("Greatly increases wing flight time and speed and increases defense by 16\n" + - "God slayer revival heals you to full HP instead of 150 HP when triggered\n" + - "Silva invincibility heals you to full HP when triggered\n" + - "If you trigger the above heals you cannot drink this potion again for 30 seconds"); + "God slayer revival heals you to half HP instead of 150 HP when triggered\n" + + "Silva invincibility heals you to half HP when triggered\n" + + "If you trigger the above heals you cannot drink this potion again for 60 seconds"); } public override void SetDefaults() From dfc0a59d9337cd14ab7a89a2155254d98782c3b8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:28:25 -0400 Subject: [PATCH 06/14] buffed revivify duration and crafting --- Items/Potions/RevivifyPotion.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index 166c63059b..3d378d36b7 100644 --- a/Items/Potions/RevivifyPotion.cs +++ b/Items/Potions/RevivifyPotion.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Potions item.UseSound = SoundID.Item3; item.consumable = true; item.buffType = ModContent.BuffType(); - item.buffTime = 1800; + item.buffTime = 3600; item.value = Item.buyPrice(0, 2, 0, 0); } @@ -41,13 +41,13 @@ namespace CalamityMod.Items.Potions recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.AlchemyTable); - recipe.SetResult(this); + recipe.SetResult(this, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.HolyWater, 5); recipe.AddIngredient(ModContent.ItemType(), 50); recipe.AddTile(TileID.AlchemyTable); - recipe.SetResult(this); + recipe.SetResult(this, 5); recipe.AddRecipe(); } } From 26a2fd322c8f8a5765272a653d0b0d106312460a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:33:53 -0400 Subject: [PATCH 07/14] true melee system overhaul --- CalPlayer/CalamityPlayer.cs | 85 +++++++++++-------- CalPlayer/CalamityPlayerMiscEffects.cs | 9 ++ Items/Accessories/CounterScarf.cs | 2 +- Items/Accessories/FungalSymbiote.cs | 4 +- Items/CalamityGlobalItem.cs | 25 ------ Items/LoreItems/KnowledgeDevourerofGods.cs | 2 +- Items/Potions/SoaringPotion.cs | 2 +- Items/Potions/TitanScalePotion.cs | 2 +- Items/Tools/InfernaCutter.cs | 4 - Items/Weapons/Melee/Brimlance.cs | 1 - Items/Weapons/Melee/DevilsSunrise.cs | 1 - Items/Weapons/Melee/DiseasedPike.cs | 1 - Items/Weapons/Melee/ExsanguinationLance.cs | 1 - Items/Weapons/Melee/FulgurationHalberd.cs | 1 - Items/Weapons/Melee/GildedProboscis.cs | 1 - Items/Weapons/Melee/HeartRapier.cs | 1 - Items/Weapons/Melee/MarniteSpear.cs | 1 - Items/Weapons/Melee/Murasama.cs | 1 - Items/Weapons/Melee/SausageMaker.cs | 1 - Items/Weapons/Melee/UltimusCleaver.cs | 36 ++++---- Items/Weapons/Melee/YateveoBloom.cs | 2 - Projectiles/CalamityGlobalProjectile.cs | 41 ++++++++- Projectiles/Melee/MarniteObliteratorProj.cs | 1 + .../Melee/Spears/AmidiasTridentProj.cs | 1 + Projectiles/Melee/Spears/BansheeHookProj.cs | 1 + Projectiles/Melee/Spears/EarthenPikeSpear.cs | 1 + .../Melee/Spears/GoldplumeSpearProjectile.cs | 1 + .../Spears/HellionFlowerSpearProjectile.cs | 1 + .../Melee/Spears/InsidiousImpalerProj.cs | 1 + Projectiles/Melee/Spears/NadirSpear.cs | 1 + .../Melee/Spears/SpatialLanceProjectile.cs | 1 + .../Melee/Spears/StarnightLanceProjectile.cs | 1 + Projectiles/Melee/Spears/StreamGougeProj.cs | 1 + .../Melee/Spears/TerraLanceProjectile.cs | 1 + .../Melee/Spears/UrchinSpearProjectile.cs | 1 + 35 files changed, 130 insertions(+), 107 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index bb4b6c4bbc..05ffc251c0 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -689,6 +689,7 @@ namespace CalamityMod.CalPlayer public bool yPower = false; public bool aWeapon = false; public bool tScale = false; + public int titanBoost = 0; public bool fabsolVodka = false; public bool mushy = false; public bool molten = false; @@ -1988,6 +1989,7 @@ namespace CalamityMod.CalPlayer yPower = false; aWeapon = false; tScale = false; + titanBoost = 0; fabsolVodka = false; invincible = false; shine = false; @@ -3820,22 +3822,6 @@ namespace CalamityMod.CalPlayer #region Get Weapon Damage And KB public override void ModifyWeaponDamage(Item item, ref float add, ref float mult, ref float flat) { - bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee); - if (isTrueMelee) - { - if (tScale) - { - player.statDefense += 25; - player.endurance += 0.1f; - } - - float damageAdd = (dodgeScarf ? 0.2f : 0f) + - ((aBulwarkRare && aBulwarkRareMeleeBoostTimer > 0) ? 2f : 0f) + - (DoGLore ? 0.5f : 0f) + - (fungalSymbiote ? 0.25f : 0f); - - add += damageAdd; - } if (item.type == ModContent.ItemType()) { add += GaelsGreatsword.BaseDamage / (float)GaelsGreatsword.BaseDamage - 1f; @@ -3947,8 +3933,7 @@ namespace CalamityMod.CalPlayer } } } - bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee); - if (isTrueMelee) + if (item.melee) { if (fungalSymbiote && player.whoAmI == Main.myPlayer) { @@ -4076,6 +4061,9 @@ namespace CalamityMod.CalPlayer if (!item.melee && (int) player.meleeEnchant == 7) Projectile.NewProjectile(target.Center.X, target.Center.Y, target.velocity.X, target.velocity.Y, ProjectileID.ConfettiMelee, 0, 0f, player.whoAmI, 0f, 0f); + if (item.melee) + titanBoost = 600; + if (omegaBlueChestplate) target.AddBuff(ModContent.BuffType(), 240); if (sulfurSet) @@ -4247,6 +4235,9 @@ namespace CalamityMod.CalPlayer if (!proj.npcProj && !proj.trap) { + if (proj.Calamity().trueMelee) + titanBoost = 600; + if (sulfurSet && proj.friendly && !target.friendly) target.AddBuff(BuffID.Poisoned, 120); if (omegaBlueChestplate && proj.friendly && !target.friendly) @@ -4404,6 +4395,9 @@ namespace CalamityMod.CalPlayer if (!item.melee && (int) player.meleeEnchant == 7) Projectile.NewProjectile(target.Center.X, target.Center.Y, target.velocity.X, target.velocity.Y, ProjectileID.ConfettiMelee, 0, 0f, player.whoAmI, 0f, 0f); + if (item.melee) + titanBoost = 600; + if (omegaBlueChestplate) target.AddBuff(ModContent.BuffType(), 240); if (sulfurSet) @@ -4562,6 +4556,9 @@ namespace CalamityMod.CalPlayer if (!proj.npcProj && !proj.trap) { + if (proj.Calamity().trueMelee) + titanBoost = 600; + if (sulfurSet && proj.friendly) target.AddBuff(BuffID.Poisoned, 120); if (omegaBlueChestplate && proj.friendly) @@ -4717,14 +4714,21 @@ namespace CalamityMod.CalPlayer #region Modify Hit NPC public override void ModifyHitNPC(Item item, NPC target, ref int damage, ref float knockback, ref bool crit) { - bool isTrueMelee = item.melee && item.shoot == 0; - #region MultiplierBoosts double damageMult = 1.0; if (silvaMelee && Main.rand.NextBool(4) && item.melee) { damageMult += 4.0; } + if (item.melee) + { + double damageAdd = (dodgeScarf ? 0.2 : 0) + + ((aBulwarkRare && aBulwarkRareMeleeBoostTimer > 0) ? 2 : 0) + + (DoGLore ? 0.5 : 0) + + (fungalSymbiote ? 0.25 : 0); + + damageMult += damageAdd; + } if (enraged && !CalamityMod.CalamityConfig.BossRushXerocCurse) { damageMult += 1.25; @@ -4793,7 +4797,7 @@ namespace CalamityMod.CalPlayer if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue) { - if (isTrueMelee && soaring) + if (item.melee && soaring) { double useTimeMultiplier = 0.85 + (item.useTime * item.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost double wingTimeFraction = player.wingTimeMax / 20D; @@ -4814,21 +4818,21 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(damage * 0.15), 2f, player.whoAmI, 0f, 0f); } } - if (unstablePrism && crit) - { - for (int num252 = 0; num252 < 3; num252++) - { - Vector2 value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - while (value15.X == 0f && value15.Y == 0f) - { - value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - } - value15.Normalize(); - value15 *= (float)Main.rand.Next(30, 61) * 0.1f; - Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(damage * 0.15), 0f, player.whoAmI, 0f, 0f); - } - } - } + } + if (unstablePrism && crit) + { + for (int num252 = 0; num252 < 3; num252++) + { + Vector2 value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); + while (value15.X == 0f && value15.Y == 0f) + { + value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); + } + value15.Normalize(); + value15 *= (float)Main.rand.Next(30, 61) * 0.1f; + Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(damage * 0.15), 0f, player.whoAmI, 0f, 0f); + } + } if (astralStarRain && crit && astralStarRainCooldown <= 0) { astralStarRainCooldown = 60; @@ -4966,6 +4970,15 @@ namespace CalamityMod.CalPlayer } } } + if (isTrueMelee) + { + double damageAdd = (dodgeScarf ? 0.2 : 0) + + ((aBulwarkRare && aBulwarkRareMeleeBoostTimer > 0) ? 2 : 0) + + (DoGLore ? 0.5 : 0) + + (fungalSymbiote ? 0.25 : 0); + + damageMult += damageAdd; + } if (screwdriver) { if (proj.penetrate > 1 || proj.penetrate == -1) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 073cad069e..2bc798757e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -916,6 +916,8 @@ namespace CalamityMod.CalPlayer modPlayer.forbiddenCooldown--; if (modPlayer.ladHearts > 0) modPlayer.ladHearts--; + if (modPlayer.titanBoost > 0) + modPlayer.titanBoost--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) @@ -2365,7 +2367,14 @@ namespace CalamityMod.CalPlayer player.endurance += 0.05f; player.statDefense += 5; player.kbBuff = true; + if (modPlayer.titanBoost > 0) + { + player.statDefense += 25; + player.endurance += 0.1f; + } } + else + modPlayer.titanBoost = 0; if (modPlayer.darkSunRing) { diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 2bfd0a9662..d948773066 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Counter Scarf"); - Tooltip.SetDefault("Melee weapons that don't fire projectiles are granted 20% more damage\n" + + Tooltip.SetDefault("True melee strikes deal 20% more damage\n" + "Grants the ability to dash; dashing into an attack will cause you to dodge it\n" + "After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" + "After a successful dodge you must wait 15 seconds before you can dodge again\n" + diff --git a/Items/Accessories/FungalSymbiote.cs b/Items/Accessories/FungalSymbiote.cs index cb11230656..84e7985c9d 100644 --- a/Items/Accessories/FungalSymbiote.cs +++ b/Items/Accessories/FungalSymbiote.cs @@ -9,8 +9,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Fungal Symbiote"); - Tooltip.SetDefault("True melee weapons emit mushrooms when swung\n" + - "Boosts true melee damage by 25%"); + Tooltip.SetDefault("Various melee weapons emit mushrooms in true melee range\n" + + "True melee strikes deal 25% more damage"); } public override void SetDefaults() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index e53ad82734..0eb2153b01 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -55,7 +55,6 @@ namespace CalamityMod.Items #endregion public bool rogue = false; - public bool trueMelee = false; public int timesUsed = 0; @@ -184,30 +183,6 @@ namespace CalamityMod.Items } if (item.type == ItemID.StarCannon) item.UseSound = null; - - switch (item.type) - { - case ItemID.Spear: - case ItemID.TheRottedFork: - case ItemID.Swordfish: - case ItemID.Arkhalis: - case ItemID.DarkLance: - case ItemID.CobaltNaginata: - case ItemID.PalladiumPike: - case ItemID.MythrilHalberd: - case ItemID.OrichalcumHalberd: - case ItemID.AdamantiteGlaive: - case ItemID.TitaniumTrident: - case ItemID.Gungnir: - case ItemID.ObsidianSwordfish: - case ItemID.MonkStaffT3: - case ItemID.MonkStaffT2: - case ItemID.MonkStaffT1: - trueMelee = true; - break; - default: - break; - } } #endregion diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index 52beb54dd2..ed5c55bec6 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Devourer of Gods"); Tooltip.SetDefault("This serpent’s power to assimilate the abilities and energy of those it consumed is unique in almost all the known cosmos, save for its lesser brethren.\n" + "I would have soon had to eliminate it as a threat had it been given more time and creatures to feast upon.\n" + - "Place in your inventory to boost your true melee damage by 50%.\n" + + "Place in your inventory to boost the power of your true melee strikes by 50%.\n" + "However, due to your reckless nature you will take increased damage."); } diff --git a/Items/Potions/SoaringPotion.cs b/Items/Potions/SoaringPotion.cs index 36810c05b2..be7bbb0000 100644 --- a/Items/Potions/SoaringPotion.cs +++ b/Items/Potions/SoaringPotion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Potions { DisplayName.SetDefault("Soaring Potion"); Tooltip.SetDefault("Increases flight time and horizontal flight speed by 10%\n" + - "Restores a fraction of your wing flight time whenever you strike an enemy with a true melee weapon\n" + + "Restores a fraction of your wing flight time after a true melee strike\n" + "The amount of flight time restored scales with your melee stats and weapon swing speed"); } diff --git a/Items/Potions/TitanScalePotion.cs b/Items/Potions/TitanScalePotion.cs index edc0b080ea..cc8c6cf303 100644 --- a/Items/Potions/TitanScalePotion.cs +++ b/Items/Potions/TitanScalePotion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Potions { DisplayName.SetDefault("Titan Scale Potion"); Tooltip.SetDefault("Increases knockback, defense by 5, and damage reduction by 5%\n" + - "Increases defense by 25 and damage reduction by 10% while holding a true melee weapon"); + "Increases defense by 25 and damage reduction by 10% for a few seconds after a true melee strike"); } public override void SetDefaults() diff --git a/Items/Tools/InfernaCutter.cs b/Items/Tools/InfernaCutter.cs index d0eb7c4ff8..d06ea28a57 100644 --- a/Items/Tools/InfernaCutter.cs +++ b/Items/Tools/InfernaCutter.cs @@ -34,10 +34,6 @@ namespace CalamityMod.Items.Tools item.rare = 5; item.UseSound = SoundID.Item1; item.autoReuse = true; - - // This item is not true melee. Its sparks go a very long distnce. - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 0f; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Brimlance.cs b/Items/Weapons/Melee/Brimlance.cs index 737a48b1ca..0eb0b15909 100644 --- a/Items/Weapons/Melee/Brimlance.cs +++ b/Items/Weapons/Melee/Brimlance.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().trueMelee = true; } } } diff --git a/Items/Weapons/Melee/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index a7a9b0c133..e0efd6d5f8 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -38,7 +38,6 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().trueMelee = true; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/DiseasedPike.cs b/Items/Weapons/Melee/DiseasedPike.cs index 3f6d1ecbba..fbcf8cb69d 100644 --- a/Items/Weapons/Melee/DiseasedPike.cs +++ b/Items/Weapons/Melee/DiseasedPike.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; - item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/ExsanguinationLance.cs b/Items/Weapons/Melee/ExsanguinationLance.cs index 0dd40697fe..838bf0e9f9 100644 --- a/Items/Weapons/Melee/ExsanguinationLance.cs +++ b/Items/Weapons/Melee/ExsanguinationLance.cs @@ -33,7 +33,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; - item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/FulgurationHalberd.cs b/Items/Weapons/Melee/FulgurationHalberd.cs index e033e89a45..3dcb5c06b6 100644 --- a/Items/Weapons/Melee/FulgurationHalberd.cs +++ b/Items/Weapons/Melee/FulgurationHalberd.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.shootSpeed = 6f; - item.Calamity().trueMelee = true; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index d50a4f8fa7..1f80a37c3c 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; item.Calamity().customRarity = CalamityRarity.Turquoise; - item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/HeartRapier.cs b/Items/Weapons/Melee/HeartRapier.cs index eb2b398344..a87a3c2330 100644 --- a/Items/Weapons/Melee/HeartRapier.cs +++ b/Items/Weapons/Melee/HeartRapier.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; - item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/MarniteSpear.cs b/Items/Weapons/Melee/MarniteSpear.cs index 367ac7d2aa..4cbf780e06 100644 --- a/Items/Weapons/Melee/MarniteSpear.cs +++ b/Items/Weapons/Melee/MarniteSpear.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 2; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; - item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index 0e79619fa7..afb2d14bee 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; item.Calamity().customRarity = CalamityRarity.Violet; - item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index 0c0b6a3054..97f9d5e6b0 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -33,7 +33,6 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 3; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index a578306b65..b7b1700ff7 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -30,69 +30,65 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 80, 0, 0); item.autoReuse = true; item.UseSound = SoundID.Item1; - - // This item is not true melee. - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 0f; } public override void MeleeEffects(Player player, Rectangle hitbox) { if (player.whoAmI == Main.myPlayer) { - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1) || - player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3) || - player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5) || - player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7) || - player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1) || + player.itemAnimation == (int)(player.itemAnimationMax * 0.3) || + player.itemAnimation == (int)(player.itemAnimationMax * 0.5) || + player.itemAnimation == (int)(player.itemAnimationMax * 0.7) || + player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { float num339 = 0f; float num340 = 0f; float num341 = 0f; float num342 = 0f; - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { num339 = -7f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { num339 = -6f; num340 = 2f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5)) { num339 = -4f; num340 = 4f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { num339 = -2f; num340 = 6f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { num340 = 7f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { num342 = 26f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { num342 -= 4f; num341 -= 20f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { num341 += 6f; } if (player.direction == -1) { - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { num342 -= 8f; } - if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { num342 -= 6f; } @@ -102,7 +98,7 @@ namespace CalamityMod.Items.Weapons.Melee num342 *= (float)player.direction; num341 *= player.gravDir; Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341, - (float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.1f), 0f, player.whoAmI, 0f, 0f); + (float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.1f), 0f, player.whoAmI, 0f, 0f); } } } diff --git a/Items/Weapons/Melee/YateveoBloom.cs b/Items/Weapons/Melee/YateveoBloom.cs index 427455d81a..4851938639 100644 --- a/Items/Weapons/Melee/YateveoBloom.cs +++ b/Items/Weapons/Melee/YateveoBloom.cs @@ -60,7 +60,6 @@ namespace CalamityMod.Items.Weapons.Melee item.useAnimation = 33; item.useTime = 33; item.shootSpeed = 4.5f; - item.Calamity().trueMelee = true; } else { @@ -69,7 +68,6 @@ namespace CalamityMod.Items.Weapons.Melee item.useAnimation = 22; item.useTime = 22; item.shootSpeed = ShootSpeed; - item.Calamity().trueMelee = false; } return base.CanUseItem(player); } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 8d2084ebaf..9e114c52f7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -74,6 +74,7 @@ namespace CalamityMod.Projectiles switch (projectile.type) { case ProjectileID.Spear: + case ProjectileID.Trident: case ProjectileID.TheRottedFork: case ProjectileID.Swordfish: case ProjectileID.Arkhalis: @@ -84,11 +85,42 @@ namespace CalamityMod.Projectiles case ProjectileID.OrichalcumHalberd: case ProjectileID.AdamantiteGlaive: case ProjectileID.TitaniumTrident: + case ProjectileID.MushroomSpear: case ProjectileID.Gungnir: case ProjectileID.ObsidianSwordfish: - case ProjectileID.MonkStaffT3: - case ProjectileID.MonkStaffT2: + case ProjectileID.ChlorophytePartisan: case ProjectileID.MonkStaffT1: + case ProjectileID.MonkStaffT2: + case ProjectileID.MonkStaffT3: + case ProjectileID.NorthPoleWeapon: + + //tools + case ProjectileID.CobaltDrill: + case ProjectileID.MythrilDrill: + case ProjectileID.AdamantiteDrill: + case ProjectileID.PalladiumDrill: + case ProjectileID.OrichalcumDrill: + case ProjectileID.TitaniumDrill: + case ProjectileID.ChlorophyteDrill: + case ProjectileID.CobaltChainsaw: + case ProjectileID.MythrilChainsaw: + case ProjectileID.AdamantiteChainsaw: + case ProjectileID.PalladiumChainsaw: + case ProjectileID.OrichalcumChainsaw: + case ProjectileID.TitaniumChainsaw: + case ProjectileID.ChlorophyteChainsaw: + case ProjectileID.VortexDrill: + case ProjectileID.VortexChainsaw: + case ProjectileID.NebulaDrill: + case ProjectileID.NebulaChainsaw: + case ProjectileID.SolarFlareDrill: + case ProjectileID.SolarFlareChainsaw: + case ProjectileID.StardustDrill: + case ProjectileID.StardustChainsaw: + case ProjectileID.Hamdrax: + case ProjectileID.ChlorophyteJackhammer: + case ProjectileID.SawtoothShark: + case ProjectileID.ButchersChainsaw: trueMelee = true; break; case ProjectileID.StarWrath: @@ -659,8 +691,9 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileID.Mushroom] < 30) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || - projectile.type == ModContent.ProjectileType() || projectile.type == ProjectileID.SolarWhipSword) + //Note: these don't count as true melee anymore but its useful code to keep around + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || projectile.type == ProjectileID.SolarWhipSword) { Vector2 vector24 = Main.OffsetsPlayerOnhand[Main.player[projectile.owner].bodyFrame.Y / 56] * 2f; if (Main.player[projectile.owner].direction != 1) diff --git a/Projectiles/Melee/MarniteObliteratorProj.cs b/Projectiles/Melee/MarniteObliteratorProj.cs index 55e0671e03..f685f7f62a 100644 --- a/Projectiles/Melee/MarniteObliteratorProj.cs +++ b/Projectiles/Melee/MarniteObliteratorProj.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Melee projectile.hide = true; projectile.ownerHitCheck = true; projectile.melee = true; + projectile.Calamity().trueMelee = true; } } } diff --git a/Projectiles/Melee/Spears/AmidiasTridentProj.cs b/Projectiles/Melee/Spears/AmidiasTridentProj.cs index 71931bbf47..a6407aeeaf 100644 --- a/Projectiles/Melee/Spears/AmidiasTridentProj.cs +++ b/Projectiles/Melee/Spears/AmidiasTridentProj.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; public override float ReelbackSpeed => 1f; diff --git a/Projectiles/Melee/Spears/BansheeHookProj.cs b/Projectiles/Melee/Spears/BansheeHookProj.cs index 5c174ba02a..18cc713f11 100644 --- a/Projectiles/Melee/Spears/BansheeHookProj.cs +++ b/Projectiles/Melee/Spears/BansheeHookProj.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 2; projectile.alpha = 255; + projectile.Calamity().trueMelee = true; } public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; public override float TravelSpeed => 22f; diff --git a/Projectiles/Melee/Spears/EarthenPikeSpear.cs b/Projectiles/Melee/Spears/EarthenPikeSpear.cs index 553644aa78..bf04bce34b 100644 --- a/Projectiles/Melee/Spears/EarthenPikeSpear.cs +++ b/Projectiles/Melee/Spears/EarthenPikeSpear.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; public override float ReelbackSpeed => 2.4f; diff --git a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs index c1de9dc1c4..894f005510 100644 --- a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs +++ b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; public override float ReelbackSpeed => 1.1f; diff --git a/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs b/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs index c99db27c4a..beaa11dc61 100644 --- a/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs +++ b/Projectiles/Melee/Spears/HellionFlowerSpearProjectile.cs @@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs index f817f70b8d..57e63628bd 100644 --- a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs +++ b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ownerHitCheck = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 8; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/NadirSpear.cs b/Projectiles/Melee/Spears/NadirSpear.cs index df844590f9..1d16adb747 100644 --- a/Projectiles/Melee/Spears/NadirSpear.cs +++ b/Projectiles/Melee/Spears/NadirSpear.cs @@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 2; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 5.5f; public override float ReelbackSpeed => 2.1f; diff --git a/Projectiles/Melee/Spears/SpatialLanceProjectile.cs b/Projectiles/Melee/Spears/SpatialLanceProjectile.cs index c47264fe36..ac9ea4cbc6 100644 --- a/Projectiles/Melee/Spears/SpatialLanceProjectile.cs +++ b/Projectiles/Melee/Spears/SpatialLanceProjectile.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ownerHitCheck = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 3; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/StarnightLanceProjectile.cs b/Projectiles/Melee/Spears/StarnightLanceProjectile.cs index 35a387b61f..0cbfda6383 100644 --- a/Projectiles/Melee/Spears/StarnightLanceProjectile.cs +++ b/Projectiles/Melee/Spears/StarnightLanceProjectile.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; public override float ReelbackSpeed => 2.4f; diff --git a/Projectiles/Melee/Spears/StreamGougeProj.cs b/Projectiles/Melee/Spears/StreamGougeProj.cs index b60d143f19..4b8cc0e647 100644 --- a/Projectiles/Melee/Spears/StreamGougeProj.cs +++ b/Projectiles/Melee/Spears/StreamGougeProj.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.hide = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 1; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; diff --git a/Projectiles/Melee/Spears/TerraLanceProjectile.cs b/Projectiles/Melee/Spears/TerraLanceProjectile.cs index eef3a2b5ce..24eeafa5d9 100644 --- a/Projectiles/Melee/Spears/TerraLanceProjectile.cs +++ b/Projectiles/Melee/Spears/TerraLanceProjectile.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; public override float ReelbackSpeed => 2.4f; diff --git a/Projectiles/Melee/Spears/UrchinSpearProjectile.cs b/Projectiles/Melee/Spears/UrchinSpearProjectile.cs index 90c32a9666..795804be1f 100644 --- a/Projectiles/Melee/Spears/UrchinSpearProjectile.cs +++ b/Projectiles/Melee/Spears/UrchinSpearProjectile.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.ignoreWater = true; projectile.penetrate = -1; projectile.ownerHitCheck = true; + projectile.Calamity().trueMelee = true; } public override float InitialSpeed => 3f; From 312242ceca26ffa51d8a6b5eaa84cff2e6ee8456 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:36:59 -0400 Subject: [PATCH 08/14] clone is now immediately available in hm --- Items/SummonItems/BlightedEyeball.cs | 1 - NPCs/BrimstoneElemental/BrimstoneElemental.cs | 10 --------- NPCs/CalamityGlobalNPCLoot.cs | 21 +++++-------------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/Items/SummonItems/BlightedEyeball.cs b/Items/SummonItems/BlightedEyeball.cs index a058a12f75..4b792423d8 100644 --- a/Items/SummonItems/BlightedEyeball.cs +++ b/Items/SummonItems/BlightedEyeball.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.SummonItems ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.HellstoneBar, 10); recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ItemID.SoulofFright, 5); recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index b982606bfd..5b25421f28 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -205,16 +205,6 @@ namespace CalamityMod.NPCs.BrimstoneElemental DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); } - // if prime hasn't been killed and this is the first time killing brimmy, do the message - string key = "Mods.CalamityMod.SteelSkullBossText"; - Color messageColor = Color.Crimson; - if (!NPC.downedMechBoss3 && !CalamityWorld.downedBrimstoneElemental) - { - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Language.GetTextValue(key), messageColor); - else if (Main.netMode == NetmodeID.Server) - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } //if brimmy hasn't been killed, you can mine charred ore string key2 = "Mods.CalamityMod.BrimmyBossText"; Color messageColor2 = Color.Crimson; diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 9515cfb220..caa1c0ad32 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -177,15 +177,19 @@ namespace CalamityMod.NPCs // First kill text (this is not a loot function) if (!Main.hardMode) { - string key2 = "Mods.CalamityMod.UglyBossText"; + string key2 = "Mods.CalamityMod.UglyBossText"; //Sunken Sea buff + string key = "Mods.CalamityMod.SteelSkullBossText"; //clone can now be fought Color messageColor2 = Color.Aquamarine; + Color messageColor = Color.Crimson; if (Main.netMode == NetmodeID.SinglePlayer) { Main.NewText(Language.GetTextValue(key2), messageColor2); + Main.NewText(Language.GetTextValue(key), messageColor); } else if (Main.netMode == NetmodeID.Server) { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } } @@ -216,21 +220,6 @@ namespace CalamityMod.NPCs npc.Calamity().SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType() }, NPC.downedMechBossAny); npc.Calamity().SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3); npc.Calamity().SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss3 || !CalamityMod.CalamityConfig.SellBossSummons); - - // If neither Prime nor Brimmy have been killed, show this text (not a loot function) - string key = "Mods.CalamityMod.SteelSkullBossText"; - Color messageColor = Color.Crimson; - if (!NPC.downedMechBoss3 && !CalamityWorld.downedBrimstoneElemental) - { - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } } else if (npc.type == NPCID.Plantera) { From 38cc083875aea0b2cfbce29ee4b14ad497a10f02 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:39:04 -0400 Subject: [PATCH 09/14] glad lock failsafe --- Projectiles/Typeless/GladiatorSword.cs | 2 ++ Projectiles/Typeless/GladiatorSword2.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Projectiles/Typeless/GladiatorSword.cs b/Projectiles/Typeless/GladiatorSword.cs index 637f68d012..499371303c 100644 --- a/Projectiles/Typeless/GladiatorSword.cs +++ b/Projectiles/Typeless/GladiatorSword.cs @@ -37,6 +37,8 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { + projectile.friendly = true; + projectile.hostile = false; bool flag64 = projectile.type == ModContent.ProjectileType(); Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); diff --git a/Projectiles/Typeless/GladiatorSword2.cs b/Projectiles/Typeless/GladiatorSword2.cs index 20bd343449..2202f4aa67 100644 --- a/Projectiles/Typeless/GladiatorSword2.cs +++ b/Projectiles/Typeless/GladiatorSword2.cs @@ -37,6 +37,8 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { + projectile.friendly = true; + projectile.hostile = false; bool flag64 = projectile.type == ModContent.ProjectileType(); Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); From 7ae6ca2c79614355ed7ca1ac10f46fc6fc06371b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:46:40 -0400 Subject: [PATCH 10/14] corvid and alpha ray nerf --- Items/Weapons/Magic/AlphaRay.cs | 6 +++--- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/AlphaRay.cs b/Items/Weapons/Magic/AlphaRay.cs index b8199f1f52..41e4162445 100644 --- a/Items/Weapons/Magic/AlphaRay.cs +++ b/Items/Weapons/Magic/AlphaRay.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Magic { if (player.altFunctionUse == 2) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)((double)damage * 2.1), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 1.8), knockBack, player.whoAmI, 0.0f, 0.0f); } else { @@ -72,8 +72,8 @@ namespace CalamityMod.Items.Weapons.Magic { value9 -= vector7; } - Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)((double)damage * 0.8), knockBack, player.whoAmI, 0.0f, 0.0f); - int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, ProjectileID.LaserMachinegunLaser, (int)((double)damage * 0.4), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0.0f, 0.0f); + int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.4), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[laser].timeLeft = 120; Main.projectile[laser].tileCollide = false; } diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index ca484621f3..9087783edd 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 301; + item.damage = 275; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 10; From 7dc1cbea08ee40d720ba19e60c9d6e5d2f8e3787 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 10:52:08 -0400 Subject: [PATCH 11/14] minor refactoring --- Projectiles/CalamityGlobalProjectile.cs | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 9e114c52f7..d05808f4a6 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -290,8 +290,8 @@ namespace CalamityMod.Projectiles projectile.position.X += (float)(projectile.width / 2); projectile.position.Y += (float)(projectile.height / 2); projectile.scale = ((float)(num606 + num607) - projectile.ai[1]) * num608 / (float)(num607 + num606); - projectile.width = (int)((float)num609 * projectile.scale); - projectile.height = (int)((float)num610 * projectile.scale); + projectile.width = (int)(num609 * projectile.scale); + projectile.height = (int)(num610 * projectile.scale); projectile.position.X -= (float)(projectile.width / 2); projectile.position.Y -= (float)(projectile.height / 2); projectile.netUpdate = true; @@ -300,8 +300,8 @@ namespace CalamityMod.Projectiles if (projectile.ai[1] != -1f) { projectile.scale = ((float)(num606 + num607) - projectile.ai[1]) * num608 / (float)(num607 + num606); - projectile.width = (int)((float)num609 * projectile.scale); - projectile.height = (int)((float)num610 * projectile.scale); + projectile.width = (int)(num609 * projectile.scale); + projectile.height = (int)(num610 * projectile.scale); } if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) @@ -792,9 +792,9 @@ namespace CalamityMod.Projectiles } } - if (!projectile.melee && (int) player.meleeEnchant > 0 && !projectile.noEnchantments) + if (!projectile.melee && (int)player.meleeEnchant > 0 && !projectile.noEnchantments) { - if ((int) player.meleeEnchant == 7) //flask of party affects all types of weapons + if ((int)player.meleeEnchant == 7) //flask of party affects all types of weapons { Vector2 velocity = projectile.velocity; if ((double) velocity.Length() > 4.0) @@ -821,18 +821,18 @@ namespace CalamityMod.Projectiles } } - if (rogue && (int) player.meleeEnchant > 0 && !projectile.noEnchantments) + if (rogue && (int)player.meleeEnchant > 0 && !projectile.noEnchantments) { - if ((int) player.meleeEnchant == 1 && Main.rand.Next(3) == 0) + if ((int)player.meleeEnchant == 1 && Main.rand.NextBool(3)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 171, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].noGravity = true; Main.dust[index].fadeIn = 1.5f; Main.dust[index].velocity *= 0.25f; } - if ((int) player.meleeEnchant == 1) + if ((int)player.meleeEnchant == 1) { - if (Main.rand.Next(3) == 0) + if (Main.rand.NextBool(3)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 171, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].noGravity = true; @@ -840,9 +840,9 @@ namespace CalamityMod.Projectiles Main.dust[index].velocity *= 0.25f; } } - else if ((int) player.meleeEnchant == 2) + else if ((int)player.meleeEnchant == 2) { - if (Main.rand.Next(2) == 0) + if (Main.rand.NextBool(2)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 75, projectile.velocity.X * 0.2f + (float) (projectile.direction * 3), projectile.velocity.Y * 0.2f, 100, new Color(), 2.5f); Main.dust[index].noGravity = true; @@ -850,9 +850,9 @@ namespace CalamityMod.Projectiles Main.dust[index].velocity.Y -= 0.5f; } } - else if ((int) player.meleeEnchant == 3) + else if ((int)player.meleeEnchant == 3) { - if (Main.rand.Next(2) == 0) + if (Main.rand.NextBool(2)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 6, projectile.velocity.X * 0.2f + (float) (projectile.direction * 3), projectile.velocity.Y * 0.2f, 100, new Color(), 2.5f); Main.dust[index].noGravity = true; @@ -860,9 +860,9 @@ namespace CalamityMod.Projectiles Main.dust[index].velocity.Y -= 0.5f; } } - else if ((int) player.meleeEnchant == 4) + else if ((int)player.meleeEnchant == 4) { - if (Main.rand.Next(2) == 0) + if (Main.rand.NextBool(2)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 57, projectile.velocity.X * 0.2f + (float) (projectile.direction * 3), projectile.velocity.Y * 0.2f, 100, new Color(), 1.1f); Main.dust[index].noGravity = true; @@ -870,9 +870,9 @@ namespace CalamityMod.Projectiles Main.dust[index].velocity.Y /= 2f; } } - else if ((int) player.meleeEnchant == 5) + else if ((int)player.meleeEnchant == 5) { - if (Main.rand.Next(2) == 0) + if (Main.rand.NextBool(2)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 169, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].velocity.X += (float) projectile.direction; @@ -880,9 +880,9 @@ namespace CalamityMod.Projectiles Main.dust[index].noGravity = true; } } - else if ((int) player.meleeEnchant == 6) + else if ((int)player.meleeEnchant == 6) { - if (Main.rand.Next(2) == 0) + if (Main.rand.NextBool(2)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].velocity.X += (float) projectile.direction; @@ -890,7 +890,7 @@ namespace CalamityMod.Projectiles Main.dust[index].noGravity = true; } } - else if ((int) player.meleeEnchant == 8 && Main.rand.Next(4) == 0) + else if ((int)player.meleeEnchant == 8 && Main.rand.NextBool(4)) { int index = Dust.NewDust(projectile.position, projectile.width, projectile.height, 46, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].noGravity = true; @@ -1110,7 +1110,7 @@ namespace CalamityMod.Projectiles newDamage = (int)((projectile.damage * 0.25 - 30) * 0.1) + 30; } int plague = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), newDamage, 0f, projectile.owner, 0f, 0f); - Main.projectile[plague].melee = false; + Main.projectile[plague].Calamity().forceTypeless = false; } if (modPlayer.reaverBlast && projectile.melee) From 1cf1f1be0e2e7a7c38e0f41c72c6129bdc645ebe Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 11:25:37 -0400 Subject: [PATCH 12/14] Finchi the arms dealer --- NPCs/CalamityGlobalNPC.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 12a7fa80d5..0ce5cc3c72 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2449,12 +2449,16 @@ namespace CalamityMod.NPCs break; case NPCID.ArmsDealer: - switch (Main.rand.Next(25)) // 24 arms dealer names + switch (Main.rand.Next(26)) // 24 arms dealer names { case 0: npc.GivenName = "Drifter"; break; + case 1: + npc.GivenName = "Finchi"; + break; + default: break; } From d5389801792290280d6c982cd2dd3d0d26ad5f06 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 12:00:22 -0400 Subject: [PATCH 13/14] fixed circlet eaters using the nanotech bool --- Projectiles/CalamityGlobalProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index d05808f4a6..2179561dc5 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1482,7 +1482,7 @@ namespace CalamityMod.Projectiles } } - if (modPlayer.nanotech && stealthStrike && modPlayer.forbiddenCooldown <= 0) + if (modPlayer.forbiddenCirclet && stealthStrike && modPlayer.forbiddenCooldown <= 0) { for (int index2 = 0; index2 < 6; index2++) { From 8d5480529bc50f7b0834777bc974a0289b7dbb07 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 21 Apr 2020 14:29:50 -0400 Subject: [PATCH 14/14] made lad shark rotate more --- Projectiles/Pets/LadShark.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projectiles/Pets/LadShark.cs b/Projectiles/Pets/LadShark.cs index eb19c38d65..882b628a22 100644 --- a/Projectiles/Pets/LadShark.cs +++ b/Projectiles/Pets/LadShark.cs @@ -43,6 +43,7 @@ namespace CalamityMod.Projectiles.Pets { projectile.timeLeft = 2; } + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; //occasionally burst in hearts if (Main.rand.NextBool(10000))