From 9ed15ed0281fde3941e7059492e761dbfda02a2a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 6 Oct 2019 22:43:45 -0400 Subject: [PATCH 1/6] Added Twinkler critter --- NPCs/AstralBiomeNPCs/Twinkler.cs | 113 ++++++++++++++++++++++++++ NPCs/AstralBiomeNPCs/Twinkler.png | Bin 0 -> 3196 bytes NPCs/AstralBiomeNPCs/TwinklerItem.png | Bin 0 -> 650 bytes 3 files changed, 113 insertions(+) create mode 100644 NPCs/AstralBiomeNPCs/Twinkler.cs create mode 100644 NPCs/AstralBiomeNPCs/Twinkler.png create mode 100644 NPCs/AstralBiomeNPCs/TwinklerItem.png diff --git a/NPCs/AstralBiomeNPCs/Twinkler.cs b/NPCs/AstralBiomeNPCs/Twinkler.cs new file mode 100644 index 0000000000..aeca5a5c77 --- /dev/null +++ b/NPCs/AstralBiomeNPCs/Twinkler.cs @@ -0,0 +1,113 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.World; +using CalamityMod.CalPlayer; +using MonoMod.Cil; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.NPCs.AstralBiomeNPCs +{ + public class Twinkler : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Twinkler"); + Main.npcFrameCount[npc.type] = 8; + Main.npcCatchable[npc.type] = true; + } + + public override void SetDefaults() + { + npc.CloneDefaults(NPCID.LightningBug); //ID is 358 + npc.width = 7; + npc.height = 5; + aiType = NPCID.LightningBug; + animationType = NPCID.LightningBug; + npc.catchItem = (short)mod.ItemType("TwinklerItem"); + npc.friendly = true; // We have to add this and CanBeHitByItem/CanBeHitByProjectile because of reasons. + //banner = npc.type; + //bannerItem = mod.ItemType("TwinklerBanner"); + } + + + public override bool? CanBeHitByItem(Player player, Item item) { + return true; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) { + return true; + } + + public override void HitEffect(int hitDirection, double damage) { + if (npc.life <= 0) { + for (int i = 0; i < 6; i++) { + int dust = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), 2 * hitDirection, -2f); + if (Main.rand.NextBool(2)) { + Main.dust[dust].noGravity = true; + Main.dust[dust].scale = 1.2f * npc.scale; + } + else { + Main.dust[dust].scale = 0.7f * npc.scale; + } + } + } + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.player.GetModPlayer().ZoneAstral && !spawnInfo.player.ZoneRockLayerHeight) + { + return SpawnCondition.TownCritter.Chance; + } + return 0f; + } + + public virtual void OnCatchNPC(Player player, Item item) + { + try + { + var npcCenter = npc.Center.ToTileCoordinates(); + if (!WorldGen.SolidTile(npcCenter.X, npcCenter.Y) && Main.tile[npcCenter.X, npcCenter.Y].liquid == 0) + { + Main.tile[npcCenter.X, npcCenter.Y].liquid = (byte)Main.rand.Next(50, 150); + Main.tile[npcCenter.X, npcCenter.Y].lava(true); + Main.tile[npcCenter.X, npcCenter.Y].honey(false); + WorldGen.SquareTileFrame(npcCenter.X, npcCenter.Y, true); + } + } + catch + { + return; + } + } + } + + internal class TwinklerItem : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Twinkler"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.autoReuse = true; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.maxStack = 999; + item.consumable = true; + item.noUseGraphic = true; + //item.CloneDefaults(2004); //Lightning Bug item + item.width = 26; + item.height = 24; + item.bait = 40; + item.makeNPC = (short)mod.NPCType("Twinkler"); + } + } +} diff --git a/NPCs/AstralBiomeNPCs/Twinkler.png b/NPCs/AstralBiomeNPCs/Twinkler.png new file mode 100644 index 0000000000000000000000000000000000000000..dfb376ea93d93e0297bfcfd1bcdcadbc79911d7e GIT binary patch literal 3196 zcmV-?41@EDP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~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7994226eed998131de4bfc59e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 6 Oct 2019 23:13:45 -0400 Subject: [PATCH 2/6] twinkler sell price --- NPCs/AstralBiomeNPCs/Twinkler.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/AstralBiomeNPCs/Twinkler.cs b/NPCs/AstralBiomeNPCs/Twinkler.cs index aeca5a5c77..0f9722eb02 100644 --- a/NPCs/AstralBiomeNPCs/Twinkler.cs +++ b/NPCs/AstralBiomeNPCs/Twinkler.cs @@ -103,6 +103,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs item.maxStack = 999; item.consumable = true; item.noUseGraphic = true; + item.value = Item.buyPrice(0, 0, 40, 0); //item.CloneDefaults(2004); //Lightning Bug item item.width = 26; item.height = 24; From 18a514eff119eaace9980181a273692564fb5624 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Mon, 7 Oct 2019 09:31:29 -0500 Subject: [PATCH 3/6] Bandit bone glove logic changes --- NPCs/TownNPCs/Bandit.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/NPCs/TownNPCs/Bandit.cs b/NPCs/TownNPCs/Bandit.cs index f038e94fd3..64c65b1951 100644 --- a/NPCs/TownNPCs/Bandit.cs +++ b/NPCs/TownNPCs/Bandit.cs @@ -116,12 +116,9 @@ namespace CalamityMod.NPCs.TownNPCs PossibleDialogs.Add("Maybe I'm bitter. It's been a long time, so whatever. Just do a good job out there."); PossibleDialogs.Add("It's not stealing! I'm just borrowing it until I die!"); - for (int j = 0; j < Main.LocalPlayer.inventory.Length; j++) + if (InventoryHas(Main.LocalPlayer, ItemID.BoneGlove)) { - if (Main.LocalPlayer.inventory[j].type == ItemID.BoneGlove) - { - PossibleDialogs.Add("Wouldn't be the first time I used my friends' remains as weapons."); - } + PossibleDialogs.Add("Wouldn't be the first time I used my friends' remains as weapons."); } if (Main.hardMode) { @@ -135,7 +132,7 @@ namespace CalamityMod.NPCs.TownNPCs PossibleDialogs.Add("Providence HATES it when you take her stuff. I learned that the hard way."); PossibleDialogs.Add("You think I can get away with looting from ghosts? It ain't like they can pick things up."); } - if (InventoryHas(Main.LocalPlayer,mod.ItemType("Valediction")) || + if (InventoryHas(Main.LocalPlayer, mod.ItemType("Valediction")) || InventoryHas(Main.LocalPlayer, mod.ItemType("TheReaper"))) { PossibleDialogs.Add("Oh man, did you rip that off a shark!? Now that's a weapon!"); From 438e3aaacf74118516d629e99a0d6ad3f9b33fc5 Mon Sep 17 00:00:00 2001 From: AlterraKira Date: Mon, 7 Oct 2019 17:31:02 +0000 Subject: [PATCH 4/6] Eclipse Mirror crafting tree and adjustment to abyss enemy detection --- Buffs/StatDebuffs/AbyssalMirrorCooldown.cs | 25 ++ Buffs/StatDebuffs/AbyssalMirrorCooldown.png | Bin 0 -> 3429 bytes Buffs/StatDebuffs/EclipseMirrorCooldown.cs | 25 ++ Buffs/StatDebuffs/EclipseMirrorCooldown.png | Bin 0 -> 3158 bytes Buffs/StatDebuffs/InkBombCooldown.cs | 25 ++ Buffs/StatDebuffs/InkBombCooldown.png | Bin 0 -> 517 bytes CalPlayer/CalamityPlayer.cs | 246 +++++++++++++++--- Items/Accessories/AbyssalMirror.cs | 52 ++++ Items/Accessories/AbyssalMirror.png | Bin 0 -> 869 bytes Items/Accessories/DarkGodsSheath.cs | 52 ++++ Items/Accessories/DarkGodsSheath.png | Bin 0 -> 1415 bytes Items/Accessories/EclipseMirror.cs | 60 +++++ Items/Accessories/EclipseMirror.png | Bin 0 -> 786 bytes Items/Accessories/InkBomb.cs | 36 +++ Items/Accessories/InkBomb.png | Bin 0 -> 765 bytes Items/Accessories/MirageMirror.cs | 53 ++++ Items/Accessories/MirageMirror.png | Bin 0 -> 574 bytes Items/Accessories/RuinMedallion.cs | 45 ++++ Items/Accessories/RuinMedallion.png | Bin 0 -> 431 bytes Items/Accessories/SilencingSheath.cs | 52 ++++ Items/Accessories/SilencingSheath.png | Bin 0 -> 495 bytes NPCs/AbyssNPCs/BobbitWormHead.cs | 9 +- NPCs/AbyssNPCs/ColossalSquid.cs | 9 +- NPCs/AbyssNPCs/Cuttlefish.cs | 7 +- NPCs/AbyssNPCs/GiantSquid.cs | 9 +- NPCs/AbyssNPCs/GulperEelHead.cs | 7 +- NPCs/AbyssNPCs/Laserfish.cs | 9 +- NPCs/AbyssNPCs/MorayEel.cs | 9 +- NPCs/AbyssNPCs/OarfishHead.cs | 16 +- NPCs/AbyssNPCs/Reaper.cs | 14 +- NPCs/AbyssNPCs/Viperfish.cs | 11 +- Projectiles/Rogue/AbyssalMirrorProjectile1.cs | 43 +++ .../Rogue/AbyssalMirrorProjectile1.png | Bin 0 -> 176 bytes Projectiles/Rogue/AbyssalMirrorProjectile2.cs | 43 +++ .../Rogue/AbyssalMirrorProjectile2.png | Bin 0 -> 234 bytes Projectiles/Rogue/AbyssalMirrorProjectile3.cs | 43 +++ .../Rogue/AbyssalMirrorProjectile3.png | Bin 0 -> 265 bytes Projectiles/Rogue/EclipseMirrorBurst.cs | 76 ++++++ Projectiles/Rogue/EclipseMirrorBurst.png | Bin 0 -> 2273 bytes Projectiles/Rogue/EclipseMirrorFlash.png | Bin 0 -> 40172 bytes Projectiles/Rogue/InkBombProjectile.cs | 74 ++++++ Projectiles/Rogue/InkBombProjectile.png | Bin 0 -> 432 bytes Projectiles/Rogue/InkCloud.cs | 46 ++++ Projectiles/Rogue/InkCloud.png | Bin 0 -> 464 bytes Projectiles/Rogue/InkCloud2.cs | 46 ++++ Projectiles/Rogue/InkCloud2.png | Bin 0 -> 453 bytes Projectiles/Rogue/InkCloud3.cs | 46 ++++ Projectiles/Rogue/InkCloud3.png | Bin 0 -> 371 bytes 48 files changed, 1113 insertions(+), 75 deletions(-) create mode 100644 Buffs/StatDebuffs/AbyssalMirrorCooldown.cs create mode 100644 Buffs/StatDebuffs/AbyssalMirrorCooldown.png create mode 100644 Buffs/StatDebuffs/EclipseMirrorCooldown.cs create mode 100644 Buffs/StatDebuffs/EclipseMirrorCooldown.png create mode 100644 Buffs/StatDebuffs/InkBombCooldown.cs create mode 100644 Buffs/StatDebuffs/InkBombCooldown.png create mode 100644 Items/Accessories/AbyssalMirror.cs create mode 100644 Items/Accessories/AbyssalMirror.png create mode 100644 Items/Accessories/DarkGodsSheath.cs create mode 100644 Items/Accessories/DarkGodsSheath.png create mode 100644 Items/Accessories/EclipseMirror.cs create mode 100644 Items/Accessories/EclipseMirror.png create mode 100644 Items/Accessories/InkBomb.cs create mode 100644 Items/Accessories/InkBomb.png create mode 100644 Items/Accessories/MirageMirror.cs create mode 100644 Items/Accessories/MirageMirror.png create mode 100644 Items/Accessories/RuinMedallion.cs create mode 100644 Items/Accessories/RuinMedallion.png create mode 100644 Items/Accessories/SilencingSheath.cs create mode 100644 Items/Accessories/SilencingSheath.png create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile1.cs create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile1.png create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile2.cs create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile2.png create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile3.cs create mode 100644 Projectiles/Rogue/AbyssalMirrorProjectile3.png create mode 100644 Projectiles/Rogue/EclipseMirrorBurst.cs create mode 100644 Projectiles/Rogue/EclipseMirrorBurst.png create mode 100644 Projectiles/Rogue/EclipseMirrorFlash.png create mode 100644 Projectiles/Rogue/InkBombProjectile.cs create mode 100644 Projectiles/Rogue/InkBombProjectile.png create mode 100644 Projectiles/Rogue/InkCloud.cs create mode 100644 Projectiles/Rogue/InkCloud.png create mode 100644 Projectiles/Rogue/InkCloud2.cs create mode 100644 Projectiles/Rogue/InkCloud2.png create mode 100644 Projectiles/Rogue/InkCloud3.cs create mode 100644 Projectiles/Rogue/InkCloud3.png diff --git a/Buffs/StatDebuffs/AbyssalMirrorCooldown.cs b/Buffs/StatDebuffs/AbyssalMirrorCooldown.cs new file mode 100644 index 0000000000..21e0147c3c --- /dev/null +++ b/Buffs/StatDebuffs/AbyssalMirrorCooldown.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Buffs.StatDebuffs +{ + public class AbyssalMirrorCooldown : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Abyssal Evade Cooldown"); + Description.SetDefault("Your Abyssal Mirror's dodge is recharging"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetModPlayer(mod).abyssalMirrorCooldown = true; + } + } +} diff --git a/Buffs/StatDebuffs/AbyssalMirrorCooldown.png b/Buffs/StatDebuffs/AbyssalMirrorCooldown.png new file mode 100644 index 0000000000000000000000000000000000000000..b3f98fa867cd445a724aa51e1c21f0e202f45b88 GIT binary patch literal 3429 zcmV-r4Vvf6Xi@@54ZTQ_E-Enz z5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUFWUU$Bym{}eS9UO(Z2>7`&z9wUX zbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|>%+C|c55>;RS}qbK zr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3 zZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l90Z_aBhs|Iw0E)7{ zbq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%L zdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL1(`yIK=_}U_z%PW zq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{wo%_#%{(V=tO#a9g zB!7-$M?^BX5>d|Vn*3S!?g~$*U zQipUPL&zMmg;!4Do9IA%up=Rh?=qPj=x&R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vB&)PcMWDs(9HjO1?Udd=T?_&q!A5T(S_{c_BQgc6VTIPCML^(x|2qB$q&*+D@(@N{00000NkvXX Hu0mjf0g9%+ literal 0 HcmV?d00001 diff --git a/Buffs/StatDebuffs/EclipseMirrorCooldown.cs b/Buffs/StatDebuffs/EclipseMirrorCooldown.cs new file mode 100644 index 0000000000..1a77ae9f8f --- /dev/null +++ b/Buffs/StatDebuffs/EclipseMirrorCooldown.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Buffs.StatDebuffs +{ + public class EclipseMirrorCooldown : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Eclipse Evade Cooldown"); + Description.SetDefault("Your Eclipse Mirror's dodge is recharging"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetModPlayer(mod).eclipseMirrorCooldown = true; + } + } +} diff --git a/Buffs/StatDebuffs/EclipseMirrorCooldown.png b/Buffs/StatDebuffs/EclipseMirrorCooldown.png new file mode 100644 index 0000000000000000000000000000000000000000..cfeebdb1bcbaa54796053ed91e822bc7984aebc1 GIT binary patch literal 3158 zcmV-c45{;pP)f6Xi@@54ZTQ_E-Enz z5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUFWUU$Bym{}eS9UO(Z2>7`&z9wUX zbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|>%+C|c55>;RS}qbK zr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3 zZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l90Z_aBhs|Iw0E)7{ zbq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%L zdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd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od).inkBombCooldown = true; + } + } +} diff --git a/Buffs/StatDebuffs/InkBombCooldown.png b/Buffs/StatDebuffs/InkBombCooldown.png new file mode 100644 index 0000000000000000000000000000000000000000..8565069431ae04a073a6edffbea36c09cd24b8bb GIT binary patch literal 517 zcmV+g0{Z=lP)s zX2sZ82*JW47CU#s%~RGuk8f-&l_)-faLLC{WOEin*Y;FlqLz?U-%FME9>-BR8+o zXSC+YT>%{f@5-Q=pB%+cYsEJ6QsXjp;BIxDkDLPkt+YN(%e>?sKv>c-V+Utsc00000NkvXX Hu0mjfX6NGx literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 04b6b3c658..7c0b93e8e1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -85,7 +85,8 @@ namespace CalamityMod.CalPlayer public float stealthGenStandstill = 1f; public float stealthGenMoving = 0f; public float stealthGenMultiplier = 1f; - private bool stealthStrikeThisFrame = false; + private float stealthGenAcceleration = 1f; + private bool stealthStrikeThisFrame = false; public bool stealthStrikeHalfCost = false; public bool stealthStrikeAlwaysCrits = false; @@ -295,9 +296,16 @@ namespace CalamityMod.CalPlayer public bool brimstoneWaifu = false; public bool sirenWaifu = false; public bool fungalClump = false; + public bool darkGodSheath = false; + public bool inkBomb = false; + public bool inkBombCooldown = false; + public bool abyssalMirror = false; + public bool abyssalMirrorCooldown = false; + public bool eclipseMirror = false; + public bool eclipseMirrorCooldown = false; - // Armor Set - public bool victideSet = false; + // Armor Set + public bool victideSet = false; public bool aeroSet = false; public bool statigelSet = false; public bool tarraSet = false; @@ -993,7 +1001,15 @@ namespace CalamityMod.CalPlayer weakPetrification = false; - shadowflame = false; + inkBomb = false; + inkBombCooldown = false; + darkGodSheath = false; + abyssalMirror = false; + abyssalMirrorCooldown = false; + eclipseMirror = false; + eclipseMirrorCooldown = false; + + shadowflame = false; wDeath = false; lethalLavaBurn = false; aCrunch = false; @@ -1213,11 +1229,14 @@ namespace CalamityMod.CalPlayer abyssalDivingSuitCooldown = false; abyssalDivingSuitPlateHits = 0; sirenIceCooldown = false; - #endregion + inkBombCooldown = false; + abyssalMirrorCooldown = false; + eclipseMirrorCooldown = false; + #endregion - #region Rogue + #region Rogue // Stealth - rogueStealth = 0f; + rogueStealth = 0f; rogueStealthMax = 0f; throwingDamage = 1f; @@ -4625,10 +4644,48 @@ namespace CalamityMod.CalPlayer if (player.wingTimeMax < 50000) player.wingTimeMax = 50000; } - #endregion - } + #endregion - public override void PostUpdateRunSpeeds() + #region Rogue Mirrors + Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); + for (int i = 0; i < 200; i++) + { + if ((Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && !Main.npc[i].townNPC && Main.npc[i].immune[player.whoAmI] <= 0 && Main.npc[i].damage > 0)) + { + NPC nPC = Main.npc[i]; + Rectangle rect = nPC.getRect(); + if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + { + if (Main.rand.Next(0, 10) == 0) + { + AbyssMirrorEvade(); + EclipseMirrorEvade(); + } + break; + } + } + } + for (int i = 0; i < 1000; i++) + { + if ((Main.projectile[i].active && !Main.projectile[i].friendly && Main.projectile[i].hostile && Main.projectile[i].damage > 0)) + { + Projectile proj = Main.projectile[i]; + Rectangle rect = proj.getRect(); + if (rectangle.Intersects(rect)) + { + if (Main.rand.Next(0, 10) == 0) + { + AbyssMirrorEvade(); + EclipseMirrorEvade(); + } + break; + } + } + } + #endregion + } + + public override void PostUpdateRunSpeeds() { #region SpeedBoosts float runAccMult = 1f + @@ -4706,12 +4763,75 @@ namespace CalamityMod.CalPlayer player.accRunSpeed = player.maxRunSpeed; } } - #endregion - } - #endregion + #endregion + } - #region Pre Kill - public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) + #region Rogue Mirrors + private void AbyssMirrorEvade() + { + if (player.whoAmI == Main.myPlayer && abyssalMirror && !abyssalMirrorCooldown) + { + player.AddBuff(mod.BuffType("AbyssalMirrorCooldown"), 1200); + player.immune = true; + player.immuneTime = player.longInvince ? 100 : 60; + player.noKnockback = true; + rogueStealth += 0.5f; + + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y); + + for (int i = 0; i < 50; i++) + { + //Get which projectile to use + int projType = Main.rand.Next(0, 3); + int lumenylType; + switch (projType) + { + case 0: + lumenylType = mod.ProjectileType("AbyssalMirrorProjectile1"); + break; + case 1: + lumenylType = mod.ProjectileType("AbyssalMirrorProjectile2"); + break; + default: + lumenylType = mod.ProjectileType("AbyssalMirrorProjectile3"); + break; + } + int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), lumenylType, 55, 0, player.whoAmI); + Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360); + } + } + } + + private void EclipseMirrorEvade() + { + if (player.whoAmI == Main.myPlayer && eclipseMirror && !eclipseMirrorCooldown) + { + player.AddBuff(mod.BuffType("EclipseMirrorCooldown"), 1200); + player.immune = true; + player.immuneTime = player.longInvince ? 100 : 60; + player.noKnockback = true; + rogueStealth = rogueStealthMax; + + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + + Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 68); + int eclipseBurst = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, mod.ProjectileType("EclipseMirrorBurst"), 8000, 0, player.whoAmI); + } + } + #endregion + + #endregion + + #region Pre Kill + public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) { if (invincible && player.inventory[player.selectedItem].type != mod.ItemType("ColdheartIcicle")) { @@ -7307,8 +7427,21 @@ namespace CalamityMod.CalPlayer } } } - } - if (ataxiaBlaze && Main.rand.NextBool(5)) + } + if (inkBomb) + { + if (player.whoAmI == Main.myPlayer && !inkBombCooldown) + { + player.AddBuff(mod.BuffType("InkBombCooldown"), 1200); + rogueStealth += 0.5f; + for (int i = 0; i < 5; i++) + { + Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 61); + int inkBomb = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-0f, -4f), mod.ProjectileType("InkBombProjectile"), 0, 0, player.whoAmI); + } + } + } + if (ataxiaBlaze && Main.rand.NextBool(5)) { if (damage > 0) { @@ -9275,22 +9408,45 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.2f; else stealthGenMoving += 0.1f; - } + } - // - // Other code which affects stealth generation goes here. - // Increase stealthGenStandstill (default 1.0) to increase basic "stand still" stealth generation. - // Incrase stealthGenMoving (default 0.0) to increase stealth generation while moving. - // Increase stealthGenMultiplier (default 1.0) to provide a global % boost to all stealth generation. - // + bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active; - // You get 100% stealth regen while standing still and not on a mount. Otherwise, you get your stealth regeneration while moving. - bool standstill = Math.Abs(player.velocity.X) < 0.1f && Math.Abs(player.velocity.Y) < 0.1f && !player.mount.Active; - if (standstill) - return stealthGenStandstill * stealthGenMultiplier; - else - return stealthGenMoving * stealthGenMultiplier; - } + // Stealth gen acceleration + float stealthScaleCap = eclipseMirror ? 40f : 25f; + + if (standstill && (eclipseMirror || darkGodSheath)) + { + if (eclipseMirror) + stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration * 1.2f : stealthScaleCap; + if (darkGodSheath) + stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration + 0.15f : stealthScaleCap; + } + else + { + stealthGenAcceleration = 1f; + } + + // + // Other code which affects stealth generation goes here. + // Increase stealthGenStandstill (default 1.0) to increase basic "stand still" stealth generation. + // Incrase stealthGenMoving (default 0.0) to increase stealth generation while moving. + // Increase stealthGenMultiplier (default 1.0) to provide a global % boost to all stealth generation. + // + + // You get 100% stealth regen while standing still and not on a mount. Otherwise, you get your stealth regeneration while moving. + if (standstill) + { + if (eclipseMirror || darkGodSheath) + return stealthGenStandstill * stealthGenMultiplier * stealthGenAcceleration; + else + return stealthGenStandstill * stealthGenMultiplier; + } + else + { + return stealthGenMoving * stealthGenMultiplier; + } + } public bool StealthStrikeAvailable() { @@ -10441,6 +10597,30 @@ namespace CalamityMod.CalPlayer } return meleeSpeedBonus; } - #endregion - } + #endregion + + #region Misc Stuff + + /// + /// Returns the range at which an abyss enemy can detect the player + /// + /// The default detection range + /// The detection range set by the player having anechoic plating/coating + /// + public float GetAbyssAggro(float defaultRange, float anechoicRange) + { + /* ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 600f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) * + (Main.player[npc.target].GetCalamityPlayer().abyssalMirror ? 0.7f : 1f) * + (Main.player[npc.target].GetCalamityPlayer().eclipseMirror ? 0.3f : 1f) */ + float range = anechoicPlating || anechoicCoating ? anechoicRange : defaultRange; + range *= fishAlert ? 3f : 1f; + range *= abyssalMirror ? 0.65f : 1f; + range *= eclipseMirror ? 0.3f : 1f; + return range; + } + + #endregion + } } diff --git a/Items/Accessories/AbyssalMirror.cs b/Items/Accessories/AbyssalMirror.cs new file mode 100644 index 0000000000..dab49f627f --- /dev/null +++ b/Items/Accessories/AbyssalMirror.cs @@ -0,0 +1,52 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Items.Accessories +{ + public class AbyssalMirror : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Abyssal Mirror"); + Tooltip.SetDefault("Light does not reach the depths of the ocean\n" + + "Significantly reduces enemy aggression, even in the abyss\n" + + "15% increased stealth regeneration while moving\n" + + "Grants a slight chance to evade attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies\n" + + "Evading an attack grants a lot of stealth\n" + + "This evade has a 20s cooldown before it can occur again"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 8; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.stealthGenMoving += 0.15f; + modPlayer.abyssalMirror = true; + player.aggro -= 450; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.GetItem("MirageMirror")); + recipe.AddIngredient(mod.GetItem("InkBomb")); + recipe.AddIngredient(ItemID.SpectreBar, 8); + recipe.AddIngredient(ItemID.BlackBelt); + recipe.AddIngredient(mod.GetItem("DepthCells"), 5); + recipe.AddIngredient(mod.GetItem("Lumenite"), 5); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/AbyssalMirror.png b/Items/Accessories/AbyssalMirror.png new file mode 100644 index 0000000000000000000000000000000000000000..e0dc36f515a6b4cf29e6fd6ed2c3ca77eae7d570 GIT binary patch literal 869 zcmV-r1DgDaP)Px&A4x<(R9J=0m`zAjQ51l`$$p$sC!Ntzaene=DncX*N&=&HwQ*5KB($!b1X-=4 zAZpRpMFl}jEy^g0B;1G)q67sMm6GVp_%k_Ujya=2ycTy((|t3e2*LAgX3o9$o%gpAT~Ow<|CiA@vYnJntrwGyrxT38~nC7kA>9btpgwti5dWBE_Z1QU*5Tw*MPIa zt?A3Dl%|(e1psKwyj-W#X)$rNI|#r^YS92V*l`kohDI*{gHN6TS(0BXX#i47KQ%)& z-hiej=i>mpesLGb&3Eha*zc+YAm&iJi;xcWz0npHI~+ik*eo-V2_Q=@QEtxnNXTm9 zfV;{72$&`ozfWkoyV?UlNm(fXON+|K;!E+l=t4XYRuxT1cQkpejq1O(T59qAk&k&7 z#%E(d*4HAE$3iGEV2%Z`-y7;Pz)IphdxN%rpM;?5Fyx7aNb*>sSHw|Ly6O!)K|dM$ z+PHPZpWclcklRtb%|xjXi*Fq(icq3he#>1|nqjHYA|uf#0G{Hl8zidD73M+zQy{lS zi->O}n&pkidhxC7-wSh!c-c_~SV=7VV!HE^uwNRZC-Yt?#|;twnA-jDWA?Jluw0J#QHoIDRcsmF0oKYA*6Nw8ntjz z5e|p@^V+j6sykZS4FIoC^;(6_wQ>TGm=LM-xNHD(v4nQr(mod); + modPlayer.stealthStrikeAlwaysCrits = true; + modPlayer.stealthStrikeHalfCost = true; + modPlayer.rogueStealthMax += 1; + modPlayer.darkGodSheath = true; + modPlayer.throwingCrit += 6; + modPlayer.throwingDamage += 0.06f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.ItemType("SilencingSheath")); + recipe.AddIngredient(mod.ItemType("RuinMedallion")); + recipe.AddIngredient(mod.ItemType("MeldiateBar"), 5); + recipe.AddIngredient(mod.ItemType("Stardust"), 25); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/DarkGodsSheath.png b/Items/Accessories/DarkGodsSheath.png new file mode 100644 index 0000000000000000000000000000000000000000..f2bd3b2b32aa0b78d0abba54570ec37718d74d4b GIT binary patch literal 1415 zcmV;21$g?2P)e>Z+Rw&SEEp&@C4cnAuMvT0RS73u;BBv>LL zKrCRziobyce*iny2v&#Q-OvRH1Vt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dateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.stealthGenMoving += 0.2f; + modPlayer.rogueStealthMax += 1; + modPlayer.eclipseMirror = true; + modPlayer.stealthStrikeAlwaysCrits = true; + modPlayer.stealthStrikeHalfCost = true; + modPlayer.throwingCrit += 8; + modPlayer.throwingDamage += 0.08f; + player.aggro -= 700; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.GetItem("AbyssalMirror")); + recipe.AddIngredient(mod.GetItem("DarkGodsSheath")); + recipe.AddIngredient(mod.GetItem("DarksunFragment"), 10); + recipe.AddIngredient(mod.GetItem("NightmareFuel"), 5); + recipe.AddIngredient(mod.GetItem("EndothermicEnergy"), 5); + recipe.AddTile(mod.GetTile("DraedonsForge")); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/EclipseMirror.png b/Items/Accessories/EclipseMirror.png new file mode 100644 index 0000000000000000000000000000000000000000..fcfde3314cd5aa7c88a1f9ee6a65dce837799d1b GIT binary patch literal 786 zcmV+t1MU2YP)Px%%t=H+R9J=8m`_MmK@^9-N%24VOca!iOpy?w3>RXUS7~9bB!XJBloH&zs9c3B zt3^9E;=YI|S0z;TN_w@3G>{;vh_VbdeG5|y<+hl6-g73enr2MD&3iL*=FGj{J#*&V ztJtDWmE{6ZTaypK^B3QI%S5egl;-aQpr|ArfY`{CVZURm7xcHK)-!0R^j7W9Se^wS zYk3-gG=I(qxY1V!!0FZ)0L8i43Se((7LX*;RIwX?v*-61_RbMXwL5GgRYlrlbYjVP z){7~507RBPm=4Mg1JG3Q5rDz5aUWp+ytWsDqTZ|8uI^xg0+$I18Lz$&fauVq4=_5h z1VDf5E&w7Y59tZ-o(40`JGPY|5|B$Mm_Il+4kUM-3Y7Xi5Z zSkoo#NbV!_GZIEAosnuu(E1v6EPWAZ-OiB&KfO*Lg=Wwd5(0bA(hw zrRPI3&xrCmZg0w=|L7P1otN}6DX|sp(S*YCk^5(v?1IiSu}wLW*insUev&*V#Jamo zBBI)wd^gXsL=4F@R*mj@Pb#WnH_)4m0ulW63st?ds{(aR6ui^zj_*;kUrbNC8>K~~(mod); + modPlayer.inkBomb = true; + } + + public override void AddRecipes() + { + } + } +} diff --git a/Items/Accessories/InkBomb.png b/Items/Accessories/InkBomb.png new file mode 100644 index 0000000000000000000000000000000000000000..6576bb5b6ae958f47098a34aef17a43668124403 GIT binary patch literal 765 zcmVRFYaYB95kmjLzivoE*9>-aC!=H5R4s>Djz{-+lM+ zIp=-Pxz}KscJIm=87li}0IXZCQ=)K*1~laN)R~^Cv@kM0lnO zAr#vf+zh~cVM+nK|1=H2&h7O8>}|Jl+?#3!;NypvnoswLg)~qb1z;{Wrd3kQt`ikE z-tWGt&9^qj41kI85xgPB{;NWG@mxgv@OsxI07C=)0Bmb(Un&B3bL?vjTYq;vQvl#- z$7g#fQgOrOla}-!+9f6tIL$rc@k~JhTsqsKEsP{z0FZn;Y(=s=uB|`q=>edrHSYB3 z?g{c+uaHyr?u{-05;m!jOQrpCP#geYN9TT^T!G#ZOKua6oXWg6Wp%mJhpnxz`im7E zyQ*UY;M%P|O&yX`A-#IXB0bPLsyUFZ2Ucza!5WXc8@B$W&pPe)<5I=nH=ZqF`x$9gP_87YEFqR2 zk)4{fPL8iB0LHRukBG&N96BXK1z?)927uomQh)OC=vlY+(z{-fpVsy0tJ>gW`Z@rfzkc8?@lQpl$F*58 vKoI}{01|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjf`HEfc literal 0 HcmV?d00001 diff --git a/Items/Accessories/MirageMirror.cs b/Items/Accessories/MirageMirror.cs new file mode 100644 index 0000000000..3839a333aa --- /dev/null +++ b/Items/Accessories/MirageMirror.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Items.Accessories +{ + public class MirageMirror : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mirage Mirror"); + Tooltip.SetDefault("Bend light around you\n" + + "Reduces enemy aggression outside of the abyss\n" + + "10% increased stealth regeneration while moving"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.stealthGenMoving += 0.1f; + player.aggro -= 200; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.MagicMirror); + recipe.AddIngredient(ItemID.BlackLens); + recipe.AddIngredient(ItemID.Bone, 50); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(this); + recipe.AddRecipe(); + + recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.IceMirror); + recipe.AddIngredient(ItemID.BlackLens); + recipe.AddIngredient(ItemID.Bone, 50); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/MirageMirror.png b/Items/Accessories/MirageMirror.png new file mode 100644 index 0000000000000000000000000000000000000000..d6040ee4ae0b3507d3ab1577253726f3f525eb8b GIT binary patch literal 574 zcmV-E0>S->P)GC8VOg z<4;=u?%P)Y>TBBo3@-IdWtqyPKjKB+j>jo5-@T$ZsQ_?tcmTj@s|CRGQ-4OR;!JP- z6HCM8?Mkg;ow$AU8Gy6z7aD0&+p)$AX}5RfnYa+e0F3esm{+LY)9s8z1?Dfh_t}^8 zcNcbfEAmG?%CjlJdZTF#FiB;1kB9oWYrg5Ne`0CKIV#>1N;;vCnHex8HN6eLv-=-b?)QL*>R$`a8!(9CiY42vah=Xdfsof$?0`nXenH6r(e^e=q;sEA# zA?-aZ7jc2vO;ajZx6`&}VDRhbKP|Y3)I0H?d-a=_18*}Rl}+UGHVjowmh*i1iA|Xq zFkcp~wHA?jCw>JHF2LiR$IHb4000tnMObu2SV=}YPjYExZggREX>V=-F@#v`?*IS* M07*qoM6N<$f*bb-dH?_b literal 0 HcmV?d00001 diff --git a/Items/Accessories/RuinMedallion.cs b/Items/Accessories/RuinMedallion.cs new file mode 100644 index 0000000000..edee64d1fc --- /dev/null +++ b/Items/Accessories/RuinMedallion.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Items.Accessories +{ + public class RuinMedallion : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ruin Medallion"); + Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" + + "6% increased rogue damage, and 6% increased rogue crit chance"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 13, 0, 0); + item.rare = 6; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.stealthStrikeHalfCost = true; + modPlayer.throwingCrit += 6; + modPlayer.throwingDamage += 0.06f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.ItemType("CoinofDeceit")); + recipe.AddIngredient(mod.ItemType("UnholyCore"), 4); + recipe.AddIngredient(mod.ItemType("EssenceofChaos"), 2); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/RuinMedallion.png b/Items/Accessories/RuinMedallion.png new file mode 100644 index 0000000000000000000000000000000000000000..108f9632310236de22bb23d4d5731950071c489d GIT binary patch literal 431 zcmV;g0Z{&lP)NCu6+uM=yV95NA>8^JK9KL>MpO`8 zMd(5cf<+e=?60ZBMKZQ`5Zf$nzSX@$GMs!flW{1h!}_rt)9H9r^&NnPq6ufoDM}Uw z9sq-3k^&s;Z2-`Gdcz8#JBL^Ql4;o^)I^@U2tYFaPIEG*$vPhc02+;kWezQ zd!sZb17N+jY`mb!?0cxm#G}pn?pz5juWs@$tk{_pcNW?9R@Q&FcTHeYO|5RPpV}eR zfjEwpN1w)Bs{Y=|;^ob<^p{8o&VuZIdb9(;$#u&h(<<+8BidifNG={)MqIk#wf$T& zp?D|NJby9!PJ1WbuS9{RN%1|`$;pf@rb)HLJ9(}WELrk!l#Jyp8}Lt3QEfE@CX*2c zo&(Sye%T@X-OGBXXz8t|b3C^1?GXL|q}6@LNG-aw0000IbVXQnMOaBjI!|(GWo~p~ ZbZKvH05ODE?C$^o002ovPDHLkV1m)$y(Itu literal 0 HcmV?d00001 diff --git a/Items/Accessories/SilencingSheath.cs b/Items/Accessories/SilencingSheath.cs new file mode 100644 index 0000000000..36f837060d --- /dev/null +++ b/Items/Accessories/SilencingSheath.cs @@ -0,0 +1,52 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Items.Accessories +{ + public class SilencingSheath : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Silencing Sheath"); + Tooltip.SetDefault("+50 maximum stealth\n" + + "10% increased stealth regeneration while standing still"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.rogueStealthMax += 0.5f; + modPlayer.stealthGenStandstill += 0.1f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.DemoniteBar, 8); + recipe.AddIngredient(ItemID.Silk, 10); + recipe.AddIngredient(ItemID.ShadowScale, 3); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(this); + recipe.AddRecipe(); + + recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.CrimtaneBar, 8); + recipe.AddIngredient(ItemID.Silk, 10); + recipe.AddIngredient(ItemID.TissueSample, 3); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/SilencingSheath.png b/Items/Accessories/SilencingSheath.png new file mode 100644 index 0000000000000000000000000000000000000000..b9876f85859a6ac57629b4247456a41bddaf6962 GIT binary patch literal 495 zcmVHq_rp2oUc-XpIt~EE%_0EZ*RCJ6ZewlT z0K9#?1F*E{51BRQuO*HS4nyl++HC+Dt!7BZ8j;+hB+BJ&06gzGBq0Kltx_rUyU}X; z|3gG1b}M@TJT&iofa8->0PgE`z4NL6mtB!KiSvug@y>5+krL7!QWNe@CF3GV65i7z zFxe%N(P#v~s#NA;WrFIO`7uw% zwK5#qB{ESXNfT4Lqu1%AdV$DPYd2HZ*(Z{=J7jXk%?n){QWJ%I-T?IaeY-_W+U`h_ z(9vg%+)brRtQE=09aAKvJM<|Um$;fpD`B08aUCb}ww*TfN?0cn%n{j{zGWu~NM@C= zS48hvM+?Zk;&V7)9*MI;#V(PcYm%Y`0;yjLXo-Dy*)EYUdpp|ER$QzZ0000IbVXQn lMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1imd+EoAm literal 0 HcmV?d00001 diff --git a/NPCs/AbyssNPCs/BobbitWormHead.cs b/NPCs/AbyssNPCs/BobbitWormHead.cs index 1a674081b3..c027db7832 100644 --- a/NPCs/AbyssNPCs/BobbitWormHead.cs +++ b/NPCs/AbyssNPCs/BobbitWormHead.cs @@ -62,10 +62,11 @@ namespace CalamityMod.NPCs.AbyssNPCs if (npc.ai[1] >= 60f) { npc.TargetClosest(true); - if (npc.Center.Y + ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 50f : 100f) > Main.player[npc.target].Center.Y && - Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { + //if (npc.Center.Y + ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + // Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 50f : 100f) > Main.player[npc.target].Center.Y && + if (npc.Center.Y + Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(100f, 50f) > Main.player[npc.target].Center.Y && + Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + { npc.ai[1] = 0f; npc.ai[0] = 1f; return; diff --git a/NPCs/AbyssNPCs/ColossalSquid.cs b/NPCs/AbyssNPCs/ColossalSquid.cs index 33fc6f64e5..750b6e7f0d 100644 --- a/NPCs/AbyssNPCs/ColossalSquid.cs +++ b/NPCs/AbyssNPCs/ColossalSquid.cs @@ -321,10 +321,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 300f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || - npc.justHit) + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 300f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(300f, 150f)) || + npc.justHit) { hasBeenHit = true; } diff --git a/NPCs/AbyssNPCs/Cuttlefish.cs b/NPCs/AbyssNPCs/Cuttlefish.cs index cfd843c593..10fe14910f 100644 --- a/NPCs/AbyssNPCs/Cuttlefish.cs +++ b/NPCs/AbyssNPCs/Cuttlefish.cs @@ -6,6 +6,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.AbyssNPCs { @@ -319,8 +320,10 @@ namespace CalamityMod.NPCs.AbyssNPCs if (Main.rand.NextBool(2)) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CloakingGland")); - } - } + } + int inkBombDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateInt : Main.expertMode ? 50 : 100; + DropHelper.DropItemChance(npc, mod.ItemType("InkBomb"), inkBombDropRate, 1, 1); + } public override void HitEffect(int hitDirection, double damage) { diff --git a/NPCs/AbyssNPCs/GiantSquid.cs b/NPCs/AbyssNPCs/GiantSquid.cs index 04725e3fa2..23a7350900 100644 --- a/NPCs/AbyssNPCs/GiantSquid.cs +++ b/NPCs/AbyssNPCs/GiantSquid.cs @@ -97,10 +97,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || - npc.justHit) + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(500f, 300f)) || + npc.justHit) { hasBeenHit = true; } diff --git a/NPCs/AbyssNPCs/GulperEelHead.cs b/NPCs/AbyssNPCs/GulperEelHead.cs index e44445ced3..4bc9234f25 100644 --- a/NPCs/AbyssNPCs/GulperEelHead.cs +++ b/NPCs/AbyssNPCs/GulperEelHead.cs @@ -63,9 +63,10 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void AI() { - if ((Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 100f : 600f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) || + //if ((Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + // Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 100f : 600f) * + // (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) || + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(600f, 100f) || npc.justHit) { detectsPlayer = true; diff --git a/NPCs/AbyssNPCs/Laserfish.cs b/NPCs/AbyssNPCs/Laserfish.cs index 972e7e0de5..e4434ba93f 100644 --- a/NPCs/AbyssNPCs/Laserfish.cs +++ b/NPCs/AbyssNPCs/Laserfish.cs @@ -70,10 +70,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 400f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) - { + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 400f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(400f, 200f)) + { flag14 = true; } if ((!Main.player[npc.target].wet || Main.player[npc.target].dead) && flag14) diff --git a/NPCs/AbyssNPCs/MorayEel.cs b/NPCs/AbyssNPCs/MorayEel.cs index 3dd11644b2..33e6c9911e 100644 --- a/NPCs/AbyssNPCs/MorayEel.cs +++ b/NPCs/AbyssNPCs/MorayEel.cs @@ -69,10 +69,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 250f : 300f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) - { + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 250f : 300f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(300f, 250f)) + { flag14 = true; } if ((!Main.player[npc.target].wet || Main.player[npc.target].dead) && flag14) diff --git a/NPCs/AbyssNPCs/OarfishHead.cs b/NPCs/AbyssNPCs/OarfishHead.cs index 9e2c3a6fa0..1391e85e63 100644 --- a/NPCs/AbyssNPCs/OarfishHead.cs +++ b/NPCs/AbyssNPCs/OarfishHead.cs @@ -131,9 +131,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { num42 *= 16; float num47 = (float)(num42 - 200); //800 - if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + //if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + // Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * + // (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(250f, 150f)) { num192 = num47; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) < 250f) @@ -165,10 +166,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.velocity *= num49; } } - if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) - { + //if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + // Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * + // (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(250f, 150f)) + { for (int num51 = 0; num51 < 200; num51++) { if (Main.npc[num51].active && Main.npc[num51].type == npc.type && num51 != npc.whoAmI) diff --git a/NPCs/AbyssNPCs/Reaper.cs b/NPCs/AbyssNPCs/Reaper.cs index 82b3192e3c..cf4f43f921 100644 --- a/NPCs/AbyssNPCs/Reaper.cs +++ b/NPCs/AbyssNPCs/Reaper.cs @@ -149,12 +149,14 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((!Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || - npc.justHit) - { - hasBeenHit = true; + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(500f, 300f)) || + npc.justHit) + + { + hasBeenHit = true; } if (!flag14) { diff --git a/NPCs/AbyssNPCs/Viperfish.cs b/NPCs/AbyssNPCs/Viperfish.cs index 3c27b95f07..7e8371e78c 100644 --- a/NPCs/AbyssNPCs/Viperfish.cs +++ b/NPCs/AbyssNPCs/Viperfish.cs @@ -70,10 +70,13 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || - Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 600f) * - (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) - { + //(Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + //Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 600f) * + //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) * + // (Main.player[npc.target].GetCalamityPlayer().abyssalMirror ? 0.7f : 1f) * + // (Main.player[npc.target].GetCalamityPlayer().eclipseMirror ? 0.3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(600f, 200f)) + { flag14 = true; } if ((!Main.player[npc.target].wet || Main.player[npc.target].dead) && flag14) diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile1.cs b/Projectiles/Rogue/AbyssalMirrorProjectile1.cs new file mode 100644 index 0000000000..5c9e704a5f --- /dev/null +++ b/Projectiles/Rogue/AbyssalMirrorProjectile1.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Projectiles.Rogue +{ + public class AbyssalMirrorProjectile1 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lumenyl Fluid"); + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.alpha = 0; + projectile.penetrate = -1; + projectile.tileCollide = true; + projectile.ignoreWater = true; + projectile.timeLeft = 50; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 2; + Mod calamity = ModLoader.GetMod("CalamityMod"); + projectile.GetGlobalProjectile(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 25) { projectile.alpha += 10; } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly && target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses) + { + target.AddBuff(mod.BuffType("SilvaStun"), 300); + } + } + } +} diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile1.png b/Projectiles/Rogue/AbyssalMirrorProjectile1.png new file mode 100644 index 0000000000000000000000000000000000000000..7fed7e0043b701e371b4ffd568832ae88dffe872 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>$?|k@43U^R zcfwgN2L}(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 25) { projectile.alpha += 10; } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly && target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses) + { + target.AddBuff(mod.BuffType("SilvaStun"), 300); + } + } + } +} diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile2.png b/Projectiles/Rogue/AbyssalMirrorProjectile2.png new file mode 100644 index 0000000000000000000000000000000000000000..26516f9035a3ff73549156272db7081bdc863e1a GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^AT|#N8<337)>#0g7>k44ofy`glX(f`Eb(-443U^R zb;3ffLje+Q=k=2vC6kKuINDepWy}sfVAi?GyRV~cbALjl=?{*k2$#rt7uWE0KQN79 z(U*Al_f@@xOr7T=!n8)W9ZFrwapeLDmis literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile3.cs b/Projectiles/Rogue/AbyssalMirrorProjectile3.cs new file mode 100644 index 0000000000..80e28ccd17 --- /dev/null +++ b/Projectiles/Rogue/AbyssalMirrorProjectile3.cs @@ -0,0 +1,43 @@ +using Terraria; +using Terraria.ModLoader; +using CalamityMod.CalPlayer; + +namespace CalamityMod.Projectiles.Rogue +{ + public class AbyssalMirrorProjectile3 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lumenyl Fluid"); + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.alpha = 0; + projectile.penetrate = -1; + projectile.tileCollide = true; + projectile.ignoreWater = true; + projectile.timeLeft = 50; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 2; + Mod calamity = ModLoader.GetMod("CalamityMod"); + projectile.GetGlobalProjectile(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 25) { projectile.alpha += 10; } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly && target.rarity != 2 && !CalamityPlayer.areThereAnyDamnBosses) + { + target.AddBuff(mod.BuffType("SilvaStun"), 300); + } + } + } +} diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile3.png b/Projectiles/Rogue/AbyssalMirrorProjectile3.png new file mode 100644 index 0000000000000000000000000000000000000000..bab50601a9d6be8940a5f381a22fff033164ce3a GIT binary patch literal 265 zcmV+k0rvihP)Px#!%0LzR49?1(IHC%aTo^h-(Th(bILdv?B*t75Sv!PU>1|z;78aOnBBZ=6jm23 zc0rbx7UsYpD2Nup&EpIfukC#5`|#t1Cmd{^g8I=R__%+_{Yi+@04tVEB}8dK+8++U z`26a(kSvrFD|-pZX05`Zd2t4w`zyuZDIYP?f!nb2%(fh_wjY`hx90T%PGazFk69R)2##V9A& P00000NkvXXu0mjfkN0m~ literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipseMirrorBurst.cs b/Projectiles/Rogue/EclipseMirrorBurst.cs new file mode 100644 index 0000000000..f746e4ff95 --- /dev/null +++ b/Projectiles/Rogue/EclipseMirrorBurst.cs @@ -0,0 +1,76 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipseMirrorBurst : ModProjectile + { + private int frameCounter = 0; + private int frameX = 0; + private int frameY = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eclipse Mirror Flash"); + } + + public override void SetDefaults() + { + projectile.width = 750; + projectile.height = 750; + projectile.friendly = true; + projectile.alpha = 0; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 150; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 5; + Mod calamity = ModLoader.GetMod("CalamityMod"); + projectile.GetGlobalProjectile(calamity).rogue = true; + } + + public override void AI() + { + frameCounter++; + if (frameCounter > 3) + { + frameCounter = 0; + frameY++; + if (frameY > 1) + { + frameX++; + frameY = 0; + } + } + if (frameX > 0 && frameY > 0) + { + projectile.Kill(); + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = mod.GetTexture("Projectiles/Rogue/EclipseMirrorFlash"); + spriteBatch.Draw + ( + texture, + new Vector2 + ( + projectile.position.X - Main.screenPosition.X + projectile.width * 0.5f - 50, + projectile.position.Y - Main.screenPosition.Y + projectile.height - 750 * 0.5f - 50 + ), + new Rectangle(frameX * 752, frameY * 752, 750, 750), + Color.White, + projectile.rotation, + new Vector2(325, 325), + projectile.scale, + SpriteEffects.None, + 0f + ); + } + } +} diff --git a/Projectiles/Rogue/EclipseMirrorBurst.png b/Projectiles/Rogue/EclipseMirrorBurst.png new file mode 100644 index 0000000000000000000000000000000000000000..c51889a8cd63cbd4fb0cb8ba62228484e4085185 GIT binary patch literal 2273 zcmeAS@N?(olHy`uVBq!ia0y~yV0s6_9Be?5kFt|b0V&4fAa^H*b?0PWGB9w=_H=O! zshIQjAR{kO>d=Dk{<-|@B0%OS7!85Z5Eu=C(GVC7fzc2c4FS4`z=zDpKMahgONBc@ OR(rboxvXl#=9 literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipseMirrorFlash.png b/Projectiles/Rogue/EclipseMirrorFlash.png new file mode 100644 index 0000000000000000000000000000000000000000..31dbce55bbea67345ab573138680f1f86028b227 GIT binary patch literal 40172 zcmdqJc{J4j7eD^8B`Gr63t>8%EygKgJ~@#oL-hR#Fph zB&e@tiyiVkcRx>K-(}Z>jABfq<}5>T_nMj1_$%_7H9S8F{KLv9D09|aW}k^tGwKGT zn5wz$hW@X8QS{#DWfF{rM1hz@LHh=L2wbi;?%&!-bXqZwpyp_xtq{ zwe<}>h~LKgcnxA_-UcYU@&CN8(xIP{2L7W1Yh}75%=SOAm41C;QeF>h4FHR=|8Iic z^xetNe3p;c86J*c04!hr-fPhDPTKbYpkQiw6mp0^n0#axZx00KX#7?I=%;oL-V&pZP^NH2GW4CcKz@7a2Tnln&(^>{&2ysX>Qe=s zs*o38;%71dWdGlCn#1I!>d=Oj>EQxu7vy*R2#?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iZr5)lWqG(calamity).rogue = true; + } + + public override void AI() + { + projectile.velocity.Y += 0.1f; + projectile.rotation += projectile.velocity.X * 0.1f; + + if (projectile.timeLeft == 1) + CreateInk(); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly) + CreateInk(); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + CreateInk(); + return true; + } + + private void CreateInk() + { + Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 14); + for (int i = 0; i < 20; i++) + { + int projType = Main.rand.Next(0, 3); + int inkType; + switch (projType) + { + case 0: + inkType = mod.ProjectileType("InkCloud"); + break; + case 1: + inkType = mod.ProjectileType("InkCloud2"); + break; + default: + inkType = mod.ProjectileType("InkCloud3"); + break; + } + int inkID = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, 22, 7, Main.myPlayer); + Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25); + } + projectile.Kill(); + } + } +} diff --git a/Projectiles/Rogue/InkBombProjectile.png b/Projectiles/Rogue/InkBombProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..f8992d1d1c6442d00bd0843e91edc0a52aa07036 GIT binary patch literal 432 zcmV;h0Z;ykP)p=2#I1yAjP$~d%-JK-aX9>XAbk{d7hcTEv+oP zinrlSKhx0@z{|-w@W4G)ciTAld=9z?I|InScpAd*@8v`;Ju%nX1va+NK(=@u!q&%1 z0L{7f8WUsf|F{exJNO8!Zhnco8`Oqacs2qq{xyM<@+lY?ZUAegDA?H467@n?O5#9I zbknzTRNMIE4ER|M42>LugS`(Sv}D?Xbi|l6JCz5$qgk;0_8lncu9BZ8$hDi}$?khF zI@VuZBmd3(*F>&%#NAKF3F6|?KIqFu=f$Ix#9+Gc1g!5=LU=t9y^Nj1KZ#)R=oiQ| z*Qc9f5dXve#}C1A(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 50) + projectile.alpha += 5; + if (projectile.timeLeft < 75) + projectile.velocity *= 0.95f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly) + { + target.AddBuff(BuffID.Confused, 300); + } + } + } +} diff --git a/Projectiles/Rogue/InkCloud.png b/Projectiles/Rogue/InkCloud.png new file mode 100644 index 0000000000000000000000000000000000000000..7312f82b9151642b7b1bb433557d1a714ab46092 GIT binary patch literal 464 zcmV;>0WbcEP)K~zY`&6K}O!$25@pKC%%Ihu-f5UfMR!3g5w;{QLmbQ7$D=wJm0 zf3+o8q_GaoSL~7NB~rP(OD^0OF7NYx_bD7o4le*`X$`<(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 50) + projectile.alpha += 5; + if (projectile.timeLeft < 75) + projectile.velocity *= 0.95f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly) + { + target.AddBuff(BuffID.Confused, 300); + } + } + } +} diff --git a/Projectiles/Rogue/InkCloud2.png b/Projectiles/Rogue/InkCloud2.png new file mode 100644 index 0000000000000000000000000000000000000000..515075a8b334b977f1ac0be078c6223a62fdf30a GIT binary patch literal 453 zcmV;$0XqJPP)1vN8X-pjanOW1U>wB6xVZTL4=ipZ;9y`76Bmq-G&1nR#Shxr>s=Aez0);) zdv|^MeqUQfL3JiYapYbG)()hERKBjjp~RZHSnWXg=mA3MK+ z9Vzb!sdg)L%8*G?UAC&SNl5xfsN1;%%zem~fkVk#Lcx4C1wiYjf?Y?JzEhOUzC`EI z8{i`$8AQ=Xg3NC<==T77^$JmucZ5{zOEHs>JlmpoD%YiDnm;I4{Or`u?=s0mTKi@$ zO=h`T03H(BW+*6E09dXTxmgmqk}+i|P3HA|0{BQs1}0Kzl}dpESg)5(eJe&N^KV1Q vZ0EP{`G56e*S0@ck&R@`mzfolyd(4lO6IG9p&CF{00000NkvXXu0mjfGhxlC literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/InkCloud3.cs b/Projectiles/Rogue/InkCloud3.cs new file mode 100644 index 0000000000..271b01aa85 --- /dev/null +++ b/Projectiles/Rogue/InkCloud3.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class InkCloud3 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ink Cloud"); + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 24; + projectile.friendly = true; + projectile.alpha = 0; + projectile.penetrate = -1; + projectile.tileCollide = true; + projectile.ignoreWater = true; + projectile.timeLeft = 100; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + Mod calamity = ModLoader.GetMod("CalamityMod"); + projectile.GetGlobalProjectile(calamity).rogue = true; + } + + public override void AI() + { + if (projectile.timeLeft < 50) + projectile.alpha += 5; + if (projectile.timeLeft < 75) + projectile.velocity *= 0.95f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (!target.friendly) + { + target.AddBuff(BuffID.Confused, 300); + } + } + } +} diff --git a/Projectiles/Rogue/InkCloud3.png b/Projectiles/Rogue/InkCloud3.png new file mode 100644 index 0000000000000000000000000000000000000000..f838f05c818dd282223a71b396913136646675da GIT binary patch literal 371 zcmV-(0gV2MP)8A5CJ+rJ!8DDR;cQ za3_W%T)PWuNLk*0^o0A%yGMuIdw zF#uuE1EBa?tpWPygVqD4lV{*3xj*9J;0D-|UR~cd20lLA0b7qPsW&JcBwdV6j+%<4lPhHwyVpU_ESf0wu-#pd(v5gJD{QVW!r#@EoN`K|8=0Ft2 z{`(k!gD5coSw3qduS*23{+E Date: Mon, 7 Oct 2019 15:37:39 -0400 Subject: [PATCH 5/6] Increased Cyst spawn rates post eow/boc and pre hm/perfs --- NPCs/HiveMind/HiveCyst.cs | 5 +++++ NPCs/Perforator/PerforatorCyst.cs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/NPCs/HiveMind/HiveCyst.cs b/NPCs/HiveMind/HiveCyst.cs index 5facf7d0a4..22a8cccf95 100644 --- a/NPCs/HiveMind/HiveCyst.cs +++ b/NPCs/HiveMind/HiveCyst.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.World; namespace CalamityMod.NPCs.HiveMind { @@ -43,6 +44,10 @@ namespace CalamityMod.NPCs.HiveMind { return 0f; } + else if (NPC.downedBoss2 && !CalamityWorld.downedHiveMind) + { + return SpawnCondition.Corruption.Chance * 1.5f; + } return SpawnCondition.Corruption.Chance * (Main.hardMode ? 0.05f : 0.5f); } diff --git a/NPCs/Perforator/PerforatorCyst.cs b/NPCs/Perforator/PerforatorCyst.cs index f87159a13e..99e5f34f06 100644 --- a/NPCs/Perforator/PerforatorCyst.cs +++ b/NPCs/Perforator/PerforatorCyst.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.World; namespace CalamityMod.NPCs.Perforator { @@ -43,6 +44,10 @@ namespace CalamityMod.NPCs.Perforator { return 0f; } + else if (NPC.downedBoss2 && !CalamityWorld.downedPerforator) + { + return SpawnCondition.Crimson.Chance * 1.5f; + } return SpawnCondition.Crimson.Chance * (Main.hardMode ? 0.05f : 0.5f); } From ae1fa7bec562f9aeff88146343f07566bc4a94e8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 7 Oct 2019 19:40:40 -0400 Subject: [PATCH 6/6] Redid DR formula so that DR applies after vanilla defense. Also moved AEW & Sepulcher DR to vanilla damage taken multiplier, and moved flat defense reductions for Calamity debuffs into their buff files. Unified line endings and added extensions to get CalamityGlobalNPC and CalamityGlobalProjectile. THIS WILL REQUIRE ENORMOUS AMOUNTS OF TESTING AND REBALANCING. --- Buffs/DoTDebuffs/AbyssalFlames.cs | 5 +- Buffs/DoTDebuffs/AstralInfectionDebuff.cs | 5 +- Buffs/DoTDebuffs/GodSlayerInferno.cs | 5 +- Buffs/DoTDebuffs/Plague.cs | 5 +- Buffs/StatDebuffs/WarCleave.cs | 4 +- Buffs/StatDebuffs/WhisperingDeath.cs | 5 +- Items/Accessories/EclipseMirror.cs | 4 +- Items/Accessories/RuinMedallion.cs | 2 +- .../BlastBarrel.cs | 2 +- .../EclipsesFall.cs | 2 +- Items/CalamityGlobalItem.cs | 2 +- Items/Weapons/Astral/AstralBlaster.cs | 2 +- Items/Weapons/Bumblebirb/GoldenEagle.cs | 2 +- Items/Weapons/Crabulon/Fungicide.cs | 2 +- Items/Weapons/HalleysInferno.cs | 8 +- Items/Weapons/Perforators/Eviscerator.cs | 2 +- Items/Weapons/SDFMG.cs | 4 +- Items/Weapons/SlagMagnum.cs | 2 +- Items/Weapons/SlimeGod/GunkShot.cs | 2 +- Items/Weapons/SlimeGod/OverloadedBlaster.cs | 2 +- Items/Weapons/SparkSpreader.cs | 8 +- NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs | 3 +- NPCs/AstralBiomeNPCs/Twinkler.cs | 10 +- NPCs/CalamityGlobalNPC.cs | 214 ++++++++---------- NPCs/SupremeCalamitas/SCalWormBody.cs | 1 + NPCs/SupremeCalamitas/SCalWormBodyWeak.cs | 3 +- NPCs/SupremeCalamitas/SCalWormHead.cs | 1 + NPCs/SupremeCalamitas/SCalWormTail.cs | 1 + Projectiles/Ranged/HalleysComet.cs | 4 +- Projectiles/Ranged/SparkSpreaderFire.cs | 4 +- Projectiles/Rogue/BlastBarrelProjectile.cs | 6 +- Projectiles/Rogue/EclipsesStealth.cs | 4 +- Projectiles/Rogue/InkCloud.cs | 2 +- Projectiles/Rogue/InkCloud2.cs | 2 +- Projectiles/Rogue/InkCloud3.cs | 2 +- Projectiles/Rogue/ScourgeVenomCloud.cs | 2 +- .../Rogue/ScourgeoftheSeasProjectile.cs | 8 +- Projectiles/Rogue/ScourgeoftheSeasStealth.cs | 8 +- Projectiles/Summon/BlackHawkSummon.cs | 10 +- Tiles/CharredOre.cs | 2 +- Tiles/FurnitureOccult/OccultStone.cs | 2 +- Utilities/CalamityUtils.cs | 13 +- 42 files changed, 189 insertions(+), 188 deletions(-) diff --git a/Buffs/DoTDebuffs/AbyssalFlames.cs b/Buffs/DoTDebuffs/AbyssalFlames.cs index ab5be6fca2..894a08bca7 100644 --- a/Buffs/DoTDebuffs/AbyssalFlames.cs +++ b/Buffs/DoTDebuffs/AbyssalFlames.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.DoTDebuffs { public class AbyssalFlames : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 10; + + public override void SetDefaults() { DisplayName.SetDefault("Abyssal Flames"); Description.SetDefault("Your soul is being consumed"); diff --git a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs index b503e59e7a..4c373e65bb 100644 --- a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs +++ b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.DoTDebuffs { public class AstralInfectionDebuff : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 8; + + public override void SetDefaults() { DisplayName.SetDefault("Astral Infection"); Description.SetDefault("Your flesh is melting off"); diff --git a/Buffs/DoTDebuffs/GodSlayerInferno.cs b/Buffs/DoTDebuffs/GodSlayerInferno.cs index 73705be872..3d7e001811 100644 --- a/Buffs/DoTDebuffs/GodSlayerInferno.cs +++ b/Buffs/DoTDebuffs/GodSlayerInferno.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.DoTDebuffs { public class GodSlayerInferno : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 20; + + public override void SetDefaults() { DisplayName.SetDefault("God Slayer Inferno"); Description.SetDefault("Your flesh is burning off"); diff --git a/Buffs/DoTDebuffs/Plague.cs b/Buffs/DoTDebuffs/Plague.cs index bed5e900fa..6b442c4b5f 100644 --- a/Buffs/DoTDebuffs/Plague.cs +++ b/Buffs/DoTDebuffs/Plague.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.DoTDebuffs { public class Plague : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 4; + + public override void SetDefaults() { DisplayName.SetDefault("Plague"); Description.SetDefault("Rotting from the inside"); diff --git a/Buffs/StatDebuffs/WarCleave.cs b/Buffs/StatDebuffs/WarCleave.cs index 2ee824ef3d..366bee9b82 100644 --- a/Buffs/StatDebuffs/WarCleave.cs +++ b/Buffs/StatDebuffs/WarCleave.cs @@ -6,7 +6,9 @@ namespace CalamityMod.Buffs.StatDebuffs { public class WarCleave : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 15; + + public override void SetDefaults() { DisplayName.SetDefault("War Cleave"); Description.SetDefault("Defense and protection reduced"); diff --git a/Buffs/StatDebuffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs index e0651255cf..14c71f5c52 100644 --- a/Buffs/StatDebuffs/WhisperingDeath.cs +++ b/Buffs/StatDebuffs/WhisperingDeath.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.StatDebuffs { public class WhisperingDeath : ModBuff { - public override void SetDefaults() + public static int DefenseReduction = 50; + + public override void SetDefaults() { DisplayName.SetDefault("Whispering Death"); Description.SetDefault("Death approaches; defense, attack power, and life regen reduced"); diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index d87c0d8449..207c7a6f6c 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Accessories "20% increased stealth regeneration while moving\n" + "Stealth regeneration rate exponentially increases while standing still\n" + "Stealth strikes have a 100% critical hit chance\n" + - "Stealth strikes only expend 50% of your max stealth\n" + - "Grants a small chance to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" + + "Stealth strikes only expend 50% of your max stealth\n" + + "Grants a small chance to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" + "Evading an attack grants full stealth\n" + "This evade has a 20s cooldown before it can occur again"); } diff --git a/Items/Accessories/RuinMedallion.cs b/Items/Accessories/RuinMedallion.cs index edee64d1fc..27e7e203c3 100644 --- a/Items/Accessories/RuinMedallion.cs +++ b/Items/Accessories/RuinMedallion.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Ruin Medallion"); - Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" + + Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" + "6% increased rogue damage, and 6% increased rogue crit chance"); } diff --git a/Items/CalamityCustomThrowingDamage/BlastBarrel.cs b/Items/CalamityCustomThrowingDamage/BlastBarrel.cs index 428885f2c0..acc3d01076 100644 --- a/Items/CalamityCustomThrowingDamage/BlastBarrel.cs +++ b/Items/CalamityCustomThrowingDamage/BlastBarrel.cs @@ -44,4 +44,4 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage return false; } } -} \ No newline at end of file +} diff --git a/Items/CalamityCustomThrowingDamage/EclipsesFall.cs b/Items/CalamityCustomThrowingDamage/EclipsesFall.cs index e85a711d5d..da5acfa910 100644 --- a/Items/CalamityCustomThrowingDamage/EclipsesFall.cs +++ b/Items/CalamityCustomThrowingDamage/EclipsesFall.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage } return false; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 0357739fbb..fb739d5eb7 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1803,7 +1803,7 @@ namespace CalamityMod.Items if (item.type == ItemID.WormScarf) player.endurance -= 0.07f; - + if (item.type == ItemID.RoyalGel) modPlayer.royalGel = true; diff --git a/Items/Weapons/Astral/AstralBlaster.cs b/Items/Weapons/Astral/AstralBlaster.cs index e0e664e638..9ec2d6e27c 100644 --- a/Items/Weapons/Astral/AstralBlaster.cs +++ b/Items/Weapons/Astral/AstralBlaster.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Astral item.shoot = mod.ProjectileType("AstralRound"); item.useAmmo = 97; } - + public override Vector2? HoldoutOffset() { return new Vector2(-5, 0); diff --git a/Items/Weapons/Bumblebirb/GoldenEagle.cs b/Items/Weapons/Bumblebirb/GoldenEagle.cs index 1cafff97d5..35395959b8 100644 --- a/Items/Weapons/Bumblebirb/GoldenEagle.cs +++ b/Items/Weapons/Bumblebirb/GoldenEagle.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb item.useAmmo = 97; item.GetGlobalItem(mod).postMoonLordRarity = 12; } - + public override Vector2? HoldoutOffset() { return new Vector2(-5, 0); diff --git a/Items/Weapons/Crabulon/Fungicide.cs b/Items/Weapons/Crabulon/Fungicide.cs index ae84df3190..331f5660e7 100644 --- a/Items/Weapons/Crabulon/Fungicide.cs +++ b/Items/Weapons/Crabulon/Fungicide.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Crabulon item.shootSpeed = 14f; item.useAmmo = 97; } - + public override Vector2? HoldoutOffset() { return new Vector2(-5, 0); diff --git a/Items/Weapons/HalleysInferno.cs b/Items/Weapons/HalleysInferno.cs index b5e8272a90..5348a74fc6 100644 --- a/Items/Weapons/HalleysInferno.cs +++ b/Items/Weapons/HalleysInferno.cs @@ -40,19 +40,19 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 14.6f; item.useAmmo = 23; } - + public override Vector2? HoldoutOffset() { return new Vector2(-15, 0); } - + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; return true; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -63,4 +63,4 @@ namespace CalamityMod.Items.Weapons recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Weapons/Perforators/Eviscerator.cs b/Items/Weapons/Perforators/Eviscerator.cs index 7a6f417810..3b13d7d8df 100644 --- a/Items/Weapons/Perforators/Eviscerator.cs +++ b/Items/Weapons/Perforators/Eviscerator.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Perforators item.shootSpeed = 22f; item.useAmmo = 97; } - + public override Vector2? HoldoutOffset() { return new Vector2(-7, 0); diff --git a/Items/Weapons/SDFMG.cs b/Items/Weapons/SDFMG.cs index d173fdd129..f163496208 100644 --- a/Items/Weapons/SDFMG.cs +++ b/Items/Weapons/SDFMG.cs @@ -39,12 +39,12 @@ namespace CalamityMod.Items.Weapons item.useAmmo = 97; item.GetGlobalItem(mod).postMoonLordRarity = 14; } - + public override Vector2? HoldoutOffset() { return new Vector2(-10, 0); } - + 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) { float SpeedX = speedX + (float)Main.rand.Next(-5, 6) * 0.05f; diff --git a/Items/Weapons/SlagMagnum.cs b/Items/Weapons/SlagMagnum.cs index 1912cd586c..158c55d8d9 100644 --- a/Items/Weapons/SlagMagnum.cs +++ b/Items/Weapons/SlagMagnum.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("SlagRound"); item.useAmmo = 97; } - + public override Vector2? HoldoutOffset() { return new Vector2(-10, 0); diff --git a/Items/Weapons/SlimeGod/GunkShot.cs b/Items/Weapons/SlimeGod/GunkShot.cs index 5f22b4f536..3035334cef 100644 --- a/Items/Weapons/SlimeGod/GunkShot.cs +++ b/Items/Weapons/SlimeGod/GunkShot.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod item.shootSpeed = 5f; item.useAmmo = 97; } - + public override Vector2? HoldoutOffset() { return new Vector2(-5, 0); diff --git a/Items/Weapons/SlimeGod/OverloadedBlaster.cs b/Items/Weapons/SlimeGod/OverloadedBlaster.cs index 0be0a3de6d..23bab11b5f 100644 --- a/Items/Weapons/SlimeGod/OverloadedBlaster.cs +++ b/Items/Weapons/SlimeGod/OverloadedBlaster.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod item.shoot = mod.ProjectileType("SlimeBolt"); item.useAmmo = 23; } - + public override Vector2? HoldoutOffset() { return new Vector2(-4, 0); diff --git a/Items/Weapons/SparkSpreader.cs b/Items/Weapons/SparkSpreader.cs index 5a4fd54ac2..2bb371a910 100644 --- a/Items/Weapons/SparkSpreader.cs +++ b/Items/Weapons/SparkSpreader.cs @@ -36,19 +36,19 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 5f; item.useAmmo = 23; } - + public override Vector2? HoldoutOffset() { return new Vector2(-4, 0); } - + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 20) return false; return true; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -60,4 +60,4 @@ namespace CalamityMod.Items.Weapons recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs index deec893330..e515dc39de 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs @@ -31,7 +31,8 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 254; //36 npc.height = 138; //20 npc.defense = 3000; - npc.lifeMax = 1000000; + npc.takenDamageMultiplier = 1E-6f; + npc.lifeMax = 1000000; npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AstralBiomeNPCs/Twinkler.cs b/NPCs/AstralBiomeNPCs/Twinkler.cs index 0f9722eb02..cfaa0bf5ff 100644 --- a/NPCs/AstralBiomeNPCs/Twinkler.cs +++ b/NPCs/AstralBiomeNPCs/Twinkler.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs //banner = npc.type; //bannerItem = mod.ItemType("TwinklerBanner"); } - + public override bool? CanBeHitByItem(Player player, Item item) { return true; @@ -68,10 +68,10 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public virtual void OnCatchNPC(Player player, Item item) { - try + try { var npcCenter = npc.Center.ToTileCoordinates(); - if (!WorldGen.SolidTile(npcCenter.X, npcCenter.Y) && Main.tile[npcCenter.X, npcCenter.Y].liquid == 0) + if (!WorldGen.SolidTile(npcCenter.X, npcCenter.Y) && Main.tile[npcCenter.X, npcCenter.Y].liquid == 0) { Main.tile[npcCenter.X, npcCenter.Y].liquid = (byte)Main.rand.Next(50, 150); Main.tile[npcCenter.X, npcCenter.Y].lava(true); @@ -79,13 +79,13 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs WorldGen.SquareTileFrame(npcCenter.X, npcCenter.Y, true); } } - catch + catch { return; } } } - + internal class TwinklerItem : ModItem { public override void SetStaticDefaults() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 214b6ff395..fa7439d8be 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1,3 +1,5 @@ +using CalamityMod.Buffs.DoTDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Projectiles; using CalamityMod.Utilities; @@ -17,9 +19,7 @@ namespace CalamityMod.NPCs public class CalamityGlobalNPC : GlobalNPC { #region Variables - // Damage reduction - private float protection = 0f; - private float defProtection = 0f; + private float DR = 0f; // Iron Heart private int ironHeartDamage = 0; @@ -564,11 +564,6 @@ namespace CalamityMod.NPCs { IronHeartChanges(npc); } - - if (protection > 0f) - { - defProtection = protection; - } } #endregion @@ -834,30 +829,30 @@ namespace CalamityMod.NPCs if (npc.type == thorium.NPCType("Viscount") || npc.type == thorium.NPCType("BoreanStrider") || npc.type == thorium.NPCType("FallenDeathBeholder") || npc.type == thorium.NPCType("Lich") || npc.type == thorium.NPCType("AbyssionReleased")) { - protection = 0.05f; + DR = 0.05f; } else if (npc.type == thorium.NPCType("CryoCore") || npc.type == thorium.NPCType("BioCore") || npc.type == thorium.NPCType("PyroCore") || npc.type == thorium.NPCType("Aquaius")) { - protection = 0.1f; + DR = 0.1f; } else if (npc.type == thorium.NPCType("ThePrimeScouter") || npc.type == thorium.NPCType("FallenDeathBeholder2") || npc.type == thorium.NPCType("SlagFury") || npc.type == thorium.NPCType("Aquaius2") || npc.type == thorium.NPCType("GraniteEnergyStorm")) { - protection = 0.2f; + DR = 0.2f; } else if (npc.type == thorium.NPCType("TheBuriedWarrior") || npc.type == thorium.NPCType("TheBuriedWarrior1") || npc.type == thorium.NPCType("TheBuriedWarrior2") || npc.type == thorium.NPCType("LichHeadless") || npc.type == thorium.NPCType("AbyssionCracked")) { - protection = 0.25f; + DR = 0.25f; } else if (npc.type == thorium.NPCType("Omnicide")) { - protection = 0.3f; + DR = 0.3f; } else if (npc.type == thorium.NPCType("Abyssion")) { - protection = 0.35f; + DR = 0.35f; } } } @@ -867,7 +862,7 @@ namespace CalamityMod.NPCs npc.type == mod.NPCType("ScornEater") || npc.type == mod.NPCType("AquaticScourgeBody") || npc.type == mod.NPCType("AquaticScourgeBodyAlt") || npc.type == mod.NPCType("Mauler") || npc.type == mod.NPCType("EutrophicRay")) { - protection = 0.05f; + DR = 0.05f; } else if (npc.type == mod.NPCType("AstrumDeusBody") || npc.type == mod.NPCType("SoulSeeker") || npc.type == mod.NPCType("DesertScourgeTail") || npc.type == mod.NPCType("Horse") || npc.type == mod.NPCType("ProfanedEnergyBody") || npc.type == mod.NPCType("ScavengerClawLeft") || @@ -875,7 +870,7 @@ namespace CalamityMod.NPCs npc.type == mod.NPCType("PhantomDebris") || npc.type == mod.NPCType("AstrumDeusHead") || npc.type == mod.NPCType("AquaticScourgeHead") || npc.type == mod.NPCType("Cryon") || npc.type == mod.NPCType("Cryogen")) { - protection = 0.1f; + DR = 0.1f; } else if (npc.type == mod.NPCType("ArmoredDiggerHead") || npc.type == mod.NPCType("AstralProbe") || npc.type == mod.NPCType("Calamitas") || npc.type == mod.NPCType("CalamitasRun") || npc.type == mod.NPCType("CalamitasRun2") || npc.type == mod.NPCType("CalamitasRun3") || @@ -888,39 +883,39 @@ namespace CalamityMod.NPCs npc.type == mod.NPCType("Hive") || npc.type == mod.NPCType("Mantis") || npc.type == mod.NPCType("Nova") || npc.type == mod.NPCType("SmallSightseer") || npc.type == mod.NPCType("StellarCulex")) { - protection = 0.15f; + DR = 0.15f; } else if (npc.type == mod.NPCType("AstrumDeusProbe3") || npc.type == mod.NPCType("PlaguebringerShade") || npc.type == mod.NPCType("BlindedAngler")) { - protection = 0.2f; + DR = 0.2f; } else if (npc.type == mod.NPCType("PlaguebringerGoliath") || npc.type == mod.NPCType("ProfanedGuardianBoss2") || npc.type == mod.NPCType("SandTortoise") || npc.type == mod.NPCType("StasisProbe") || npc.type == mod.NPCType("BobbitWormHead") || npc.type == mod.NPCType("GreatSandShark") || npc.type == mod.NPCType("Clam") || npc.type == mod.NPCType("PrismTurtle")) { - protection = 0.25f; + DR = 0.25f; } else if (npc.type == mod.NPCType("ProvSpawnOffense") || npc.type == mod.NPCType("GiantClam")) { - protection = 0.3f; + DR = 0.3f; } else if (npc.type == mod.NPCType("ArmoredDiggerBody") || npc.type == mod.NPCType("AstrumDeusTail") || npc.type == mod.NPCType("DespairStone") || npc.type == mod.NPCType("SoulSeekerSupreme") || npc.type == mod.NPCType("Leviathan")) { - protection = 0.35f; + DR = 0.35f; } else if (npc.type == mod.NPCType("CryogenIce") || npc.type == mod.NPCType("ProfanedGuardianBoss") || npc.type == mod.NPCType("ProvSpawnDefense") || npc.type == mod.NPCType("ScavengerBody")) { - protection = 0.4f; + DR = 0.4f; } else if (npc.type == mod.NPCType("ArmoredDiggerTail")) { - protection = 0.45f; + DR = 0.45f; } else if (npc.type == mod.NPCType("SirenIce")) { - protection = 0.5f; + DR = 0.5f; } else { @@ -939,7 +934,7 @@ namespace CalamityMod.NPCs case NPCID.CultistBoss: case NPCID.Crab: case NPCID.SeaSnail: - protection = 0.05f; + DR = 0.05f; break; case NPCID.Antlion: @@ -961,7 +956,7 @@ namespace CalamityMod.NPCs case NPCID.ArmoredViking: case NPCID.DD2Betsy: case NPCID.DD2OgreT2: - protection = 0.1f; + DR = 0.1f; break; case NPCID.ElfCopter: @@ -969,7 +964,7 @@ namespace CalamityMod.NPCs case NPCID.ArmoredSkeleton: case NPCID.PirateShipCannon: case NPCID.DD2OgreT3: - protection = 0.15f; + DR = 0.15f; break; case NPCID.Retinazer: @@ -1015,7 +1010,7 @@ namespace CalamityMod.NPCs case NPCID.GiantShelly: case NPCID.GiantShelly2: case NPCID.Mothron: - protection = 0.2f; + DR = 0.2f; break; case NPCID.PrimeSaw: @@ -1028,7 +1023,7 @@ namespace CalamityMod.NPCs case NPCID.GolemFistRight: case NPCID.GolemHead: case NPCID.GolemHeadFree: - protection = 0.25f; + DR = 0.25f; break; case NPCID.Mimic: @@ -1037,7 +1032,7 @@ namespace CalamityMod.NPCs case NPCID.BigMimicCrimson: case NPCID.BigMimicHallow: case NPCID.BigMimicJungle: - protection = 0.3f; + DR = 0.3f; break; case NPCID.GiantTortoise: @@ -1045,24 +1040,24 @@ namespace CalamityMod.NPCs case NPCID.SantaNK1: case NPCID.MartianWalker: case NPCID.TheDestroyerTail: - protection = 0.35f; + DR = 0.35f; break; case NPCID.DeadlySphere: - protection = 0.4f; + DR = 0.4f; break; case NPCID.Paladin: - protection = 0.45f; + DR = 0.45f; break; case NPCID.WallofFlesh: case NPCID.MothronEgg: - protection = 0.5f; + DR = 0.5f; break; case NPCID.DungeonGuardian: - protection = 0.999999f; + DR = 0.999999f; break; default: @@ -1351,6 +1346,7 @@ namespace CalamityMod.NPCs #region Strike NPC public override bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { + // TODO -- move this to Destroyer's Rev+ AI; either set his DR or modify npc.takenDamageMultiplier if (npc.type == NPCID.TheDestroyer || npc.type == NPCID.TheDestroyerBody || npc.type == NPCID.TheDestroyerTail) { if ((newAI[1] < 480f || newAI[2] > 0f) && (CalamityWorld.revenge || CalamityWorld.bossRushActive)) @@ -1358,99 +1354,83 @@ namespace CalamityMod.NPCs damage *= 0.01; } } - else if (npc.type == mod.NPCType("SCalWormBody") || npc.type == mod.NPCType("SCalWormHead") || npc.type == mod.NPCType("SCalWormBodyWeak") || npc.type == mod.NPCType("SCalWormTail") || npc.type == mod.NPCType("EidolonWyrmHeadHuge")) - { - damage *= 0.000001; - } - double yellowCandleDamageBoost = damage * 0.05; // Get value before DR + // Yellow Candle provides +5% damage which ignores both DR and defense. + // However, armor penetration bonus damage has already been applied, so it's slightly higher than it should be. + double yellowCandleDamage = 0.05 * damage; - int newDefense = npc.defense - - (pFlames ? 4 : 0) - - (wDeath ? 50 : 0) - - (gsInferno ? 20 : 0) - - (astralInfection ? 8 : 0) - - (aFlames ? 10 : 0) - - (wCleave ? 15 : 0); + // Apply modifications to enemy's current defense based on Calamity debuffs. + // As with defense and DR, flat reductions apply first, then multiplicative reductions. + int effectiveDefense = npc.defense - + (pFlames ? Plague.DefenseReduction : 0) - + (wDeath ? WhisperingDeath.DefenseReduction : 0) - + (gsInferno ? GodSlayerInferno.DefenseReduction : 0) - + (astralInfection ? AstralInfectionDebuff.DefenseReduction : 0) - + (aFlames ? AbyssalFlames.DefenseReduction : 0) - + (wCleave ? WarCleave.DefenseReduction : 0); if (gState) - { - newDefense /= 2; - } - + effectiveDefense /= 2; if (aCrunch) - { - newDefense /= 3; - } + effectiveDefense /= 3; - if (newDefense < 0) - { - newDefense = 0; - } + // Defense can never be negative and has a minimum value of zero. + if (effectiveDefense < 0) + effectiveDefense = 0; - defense = newDefense; + // Apply vanilla-style defense before DR, using Calamity's reduced defense. + damage = Main.CalculateDamage((int)damage, effectiveDefense); - if (protection > 0f) - { - double newDamage = damage + (defense * 0.25); //defense damage boost 150 * .25 = 45 + 150 = 195 damage 180 defense + // DR applies after vanilla defense. + damage = ApplyDR(npc, damage); - if (marked) - { - protection *= 0.5f; - } + // Add Yellow Candle damage if the NPC isn't supposed to be "near invincible" + if (yellowCandle && DR < 0.99f && npc.takenDamageMultiplier > 0.05f) + damage += yellowCandleDamage; - if (npc.betsysCurse) - { - protection *= 0.66f; - } - - if (wCleave) - { - protection *= 0.75f; - } - - if (npc.ichor) - { - protection *= 0.75f; - } - else if (npc.onFire2) - { - protection *= 0.8f; - } - - if (protection < 0f) - { - protection = 0f; - } - - if (newDamage >= 1.0) - { - newDamage = (1f - protection) * newDamage; //DR calc 195 * 0.4 = 78 damage 0.6 DR - - if (newDamage < 1.0) - { - newDamage = 1.0; - } - } - - damage = newDamage; - protection = defProtection; - } - - if (protection < 0.99f) - { - if (yellowCandle) - { - damage += yellowCandleDamageBoost; - } - } - - return true; //vanilla defense calc 78 - (180 / 2 = 90) = 0, boosted to 1 by calc + // Cancel out vanilla defense math by reversing the calculation vanilla is about to perform. + // While roundabout, this is safer than returning false to stop vanilla damage calculations entirely. + // Other mods will probably expect the vanilla code to run and may compensate for it themselves. + damage = Main.CalculateDamage((int)damage, -defense); + return true; } - #endregion - #region Boss Head Slot - public override void BossHeadSlot(NPC npc, ref int index) + /// + /// Modifies damage incoming to an NPC based on their DR (damage reduction) stat added by Calamity.

+ /// This is entirely separate from vanilla's takenDamageMultiplier. + ///
+ /// Incoming damage. Has been modified by Main.DamageVar and boosted by armor penetration, but nothing else. + /// + private double ApplyDR(NPC npc, double damage) + { + if (DR <= 0f || damage <= 1.0) + return damage; + + float effectiveDR = DR; + if (marked) + effectiveDR *= 0.5f; + if (npc.betsysCurse) + effectiveDR *= 0.66f; + if (wCleave) + effectiveDR *= 0.75f; + + // Ichor and Cursed Flames are mutually exclusive + if (npc.ichor) + effectiveDR *= 0.75f; + else if (npc.onFire2) + effectiveDR *= 0.8f; + + // DR floor is 0%. Nothing can have negative DR. + if (effectiveDR <= 0f) + effectiveDR = 0f; + + double newDamage = (1f - effectiveDR) * damage; + return newDamage < 1.0 ? 1.0 : newDamage; + } + #endregion + + #region Boss Head Slot + public override void BossHeadSlot(NPC npc, ref int index) { if (CalamityWorld.revenge) { @@ -2564,7 +2544,7 @@ namespace CalamityMod.NPCs public override void OnHitByProjectile(NPC npc, Projectile projectile, int damage, float knockback, bool crit) { bool isSummon = projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type); - + if (Main.player[projectile.owner].GetCalamityPlayer().sGenerator) { if (isSummon && npc.damage > 0) diff --git a/NPCs/SupremeCalamitas/SCalWormBody.cs b/NPCs/SupremeCalamitas/SCalWormBody.cs index bdb74c2749..0b01037523 100644 --- a/NPCs/SupremeCalamitas/SCalWormBody.cs +++ b/NPCs/SupremeCalamitas/SCalWormBody.cs @@ -22,6 +22,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 26; //28 npc.height = 18; //28 npc.defense = 0; + npc.takenDamageMultiplier = 1E-6f; npc.lifeMax = CalamityWorld.revenge ? 1200000 : 1000000; if (CalamityWorld.death) { diff --git a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs index 198075af0c..17764f6cf2 100644 --- a/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs +++ b/NPCs/SupremeCalamitas/SCalWormBodyWeak.cs @@ -30,7 +30,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.aiStyle = 6; aiType = -1; npc.knockBackResist = 0f; - npc.scale = 1.2f; + npc.takenDamageMultiplier = 1E-6f; + npc.scale = 1.2f; if (Main.expertMode) { npc.scale = 1.35f; diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index fea35229c4..38523c07b7 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -29,6 +29,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 56; //324 npc.height = 62; //216 npc.defense = 0; + npc.takenDamageMultiplier = 1E-6f; npc.lifeMax = CalamityWorld.revenge ? 1200000 : 1000000; if (CalamityWorld.death) { diff --git a/NPCs/SupremeCalamitas/SCalWormTail.cs b/NPCs/SupremeCalamitas/SCalWormTail.cs index a2de006140..b0c31f50fe 100644 --- a/NPCs/SupremeCalamitas/SCalWormTail.cs +++ b/NPCs/SupremeCalamitas/SCalWormTail.cs @@ -20,6 +20,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 26; //324 npc.height = 46; //216 npc.defense = 0; + npc.takenDamageMultiplier = 1E-6f; npc.lifeMax = CalamityWorld.revenge ? 1200000 : 1000000; if (CalamityWorld.death) { diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index d916932bf3..6d439031ce 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged { DisplayName.SetDefault("Halley's Comet"); } - + public override void SetDefaults() { projectile.width = 20; @@ -97,4 +97,4 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(mod.BuffType("Nightwither"), 300); } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/SparkSpreaderFire.cs b/Projectiles/Ranged/SparkSpreaderFire.cs index b4d6906bbf..ea5967466c 100644 --- a/Projectiles/Ranged/SparkSpreaderFire.cs +++ b/Projectiles/Ranged/SparkSpreaderFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged { DisplayName.SetDefault("Fire"); } - + public override void SetDefaults() { projectile.width = 12; @@ -100,4 +100,4 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(1,4)); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index 7b063779eb..586e2b240a 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public class BlastBarrelProjectile : ModProjectile { public float cooldown = 0f; - public float oldVelocityX = 0f; + public float oldVelocityX = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Barrel"); @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 fireVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f)); int fireIndex = Projectile.NewProjectile(projectile.Center, projectile.velocity + fireVelocity, - Main.rand.Next(ProjectileID.MolotovFire, ProjectileID.MolotovFire3 + 1), + Main.rand.Next(ProjectileID.MolotovFire, ProjectileID.MolotovFire3 + 1), BlastBarrel.BaseDamage, 1f, projectile.owner); Main.projectile[fireIndex].thrown = false; Main.projectile[fireIndex].GetGlobalProjectile(mod).rogue = true; @@ -97,4 +97,4 @@ namespace CalamityMod.Projectiles.Rogue return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 17e48c4f31..27c71c199c 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Rogue public class EclipsesStealth : ModProjectile { private int deadinside = 0; //used to know when to drop spears from the sky - + public override void SetStaticDefaults() { DisplayName.SetDefault("Eclipse's Stealth"); @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.localNPCHitCooldown = 30; projectile.GetGlobalProjectile(mod).rogue = true; } - + public override void AI() { deadinside++; //congrats Pinkie diff --git a/Projectiles/Rogue/InkCloud.cs b/Projectiles/Rogue/InkCloud.cs index 8e5fcc27ec..48f0c5d8c8 100644 --- a/Projectiles/Rogue/InkCloud.cs +++ b/Projectiles/Rogue/InkCloud.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.alpha += 5; if (projectile.timeLeft < 75) projectile.velocity *= 0.95f; - } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Rogue/InkCloud2.cs b/Projectiles/Rogue/InkCloud2.cs index 2a1a5f2b6e..e48b574a22 100644 --- a/Projectiles/Rogue/InkCloud2.cs +++ b/Projectiles/Rogue/InkCloud2.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.alpha += 5; if (projectile.timeLeft < 75) projectile.velocity *= 0.95f; - } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Rogue/InkCloud3.cs b/Projectiles/Rogue/InkCloud3.cs index 271b01aa85..34952fb55e 100644 --- a/Projectiles/Rogue/InkCloud3.cs +++ b/Projectiles/Rogue/InkCloud3.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.alpha += 5; if (projectile.timeLeft < 75) projectile.velocity *= 0.95f; - } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Rogue/ScourgeVenomCloud.cs b/Projectiles/Rogue/ScourgeVenomCloud.cs index ccff03a1d2..0316c517ee 100644 --- a/Projectiles/Rogue/ScourgeVenomCloud.cs +++ b/Projectiles/Rogue/ScourgeVenomCloud.cs @@ -75,4 +75,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(BuffID.Venom, 240); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index fcf715725f..b99e150e4d 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Rogue ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; ProjectileID.Sets.TrailingMode[projectile.type] = 0; } - + public override void SetDefaults() { projectile.width = 26; @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 1200; projectile.GetGlobalProjectile(mod).rogue = true; } - + public override void AI() { if (Main.rand.Next(5) == 0) @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[num622].velocity *= 1f; } if (projectile.owner == Main.myPlayer) - { + { int num320 = Main.rand.Next(2, 6); int num3; for (int num321 = 0; num321 < num320; num321 = num3 + 1) @@ -83,4 +83,4 @@ namespace CalamityMod.Projectiles.Rogue return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs index 39982291dc..018105df32 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Rogue ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; ProjectileID.Sets.TrailingMode[projectile.type] = 0; } - + public override void SetDefaults() { projectile.width = 26; @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 60; } - + public override void AI() { if (Main.rand.Next(5) == 0 && projectile.ai[0] != 1f) @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[num622].velocity *= 1f; } if (projectile.owner == Main.myPlayer) - { + { int num320 = Main.rand.Next(2, 6); int num3; for (int num321 = 0; num321 < num320; num321 = num3 + 1) @@ -219,4 +219,4 @@ namespace CalamityMod.Projectiles.Rogue return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index 6f03cb8db7..25f7ce94ee 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Summon ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; Main.projFrames[projectile.type] = 3; } - + public override void SetDefaults() { projectile.width = 36; @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Summon projectile.minion = true; target = GetClosestNPCToTarget(maxDistToEnemy, false); } - + public int GetClosestNPCToTarget(float maxDistance, bool ignoreTiles) { int closestNPC = -1; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon } return closestNPC; } - + public override void AI() { if (projectile.localAI[0] == 0f) @@ -278,7 +278,7 @@ namespace CalamityMod.Projectiles.Summon projectile.netUpdate = true; } } - } + } if (Vector2.Distance(player.Center, projectile.Center) <= 1400 & !returningBackToPlayer) //don't return to player if currently busy dealing with an enemy { if (enemyCheckTimer % 240 == 0 & enemyCheckTimer != 0) @@ -293,4 +293,4 @@ namespace CalamityMod.Projectiles.Summon return false; } } -} \ No newline at end of file +} diff --git a/Tiles/CharredOre.cs b/Tiles/CharredOre.cs index 30876bce64..3c048beb99 100644 --- a/Tiles/CharredOre.cs +++ b/Tiles/CharredOre.cs @@ -60,4 +60,4 @@ namespace CalamityMod.Tiles return false; } } -} \ No newline at end of file +} diff --git a/Tiles/FurnitureOccult/OccultStone.cs b/Tiles/FurnitureOccult/OccultStone.cs index 71ac71a725..3df5ba0c33 100644 --- a/Tiles/FurnitureOccult/OccultStone.cs +++ b/Tiles/FurnitureOccult/OccultStone.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Tiles.FurnitureOccult //Left if ( - CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, true, 0, 1, i, j) && + CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, true, 0, 1, i, j) && (CheckTile(Type, true, -1, 1, i, j) || CheckTile(Type, false, -1, 0, i, j)) ) { diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 4c4857f285..f18118f3ea 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -1,4 +1,6 @@ using CalamityMod.CalPlayer; +using CalamityMod.NPCs; +using CalamityMod.Projectiles; using CalamityMod.World; using Microsoft.Xna.Framework; using System.Collections.Generic; @@ -20,7 +22,7 @@ namespace CalamityMod { case 1: return player.GetCalamityPlayer().ZoneAbyssLayer1; - + case 2: return player.GetCalamityPlayer().ZoneAbyssLayer2; @@ -38,6 +40,8 @@ namespace CalamityMod public static class CNPCUtils { + public static CalamityGlobalNPC GetCalamityNPC(this NPC npc) => npc.GetGlobalNPC(); + /// /// Allows you to set the lifeMax value of a NPC to different values based on the mode. Called instead of npc.lifeMax = X. /// @@ -66,7 +70,7 @@ namespace CalamityMod if (npc.boss) { double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; - npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); + npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); } } /// @@ -108,6 +112,11 @@ namespace CalamityMod } } + public static class CProjectileUtils + { + public static CalamityGlobalProjectile GetCalamityProj(this Projectile proj) => proj.GetGlobalProjectile(); + } + public static class CMiscUtils { public static void AddWithCondition(this List list, T type, bool condition)