From 45f926c05de2e02dcf3f23d67f90a4a364e3fa95 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 9 Mar 2020 15:25:08 -0400 Subject: [PATCH 01/40] fixed abyssal crate not being fished up --- CalPlayer/CalamityPlayerFishing.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index c35c008573..31cd3de1ec 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -555,7 +555,7 @@ namespace CalamityMod.CalPlayer } } } - else if (player.cratePotion && Main.rand.NextBool(5)) // 20% + if (player.cratePotion && Main.rand.NextBool(5)) // 20% { caughtType = ModContent.ItemType(); } From ebd13ddaa1b31de70879228022b533cd725bc7ca Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 9 Mar 2020 16:14:12 -0400 Subject: [PATCH 02/40] Fixed typo in flask tooltip edits --- Items/CalamityGlobalItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 1e816da2a4..16b7ff6b14 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -871,7 +871,7 @@ namespace CalamityMod.Items } } } - if (item.type == ItemID.FlaskofNanites) + if (item.type == ItemID.FlaskofPoison) { foreach (TooltipLine line2 in tooltips) { From 5713fdab152776bfb7d6683c6ee5b2a39d88d58b Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Mon, 9 Mar 2020 17:55:45 -0500 Subject: [PATCH 03/40] FUCKTON of content. See description for a list Added Eternity, my dev weapon Changed the Sulf Sea worldgen a bit (a wip, more sprites needed) Added a ton of Acid Rain weapons and enemies Added a ton of summon weapons Added some early-game Sulf Sea weapons --- Buffs/FuelCellBundleSummon.png | Bin 0 -> 1467 bytes Buffs/StatBuffs/HallowedRuneAtkBuff.cs | 24 ++ Buffs/StatBuffs/HallowedRuneAtkBuff.png | Bin 0 -> 604 bytes Buffs/StatBuffs/HallowedRuneDefBuff.cs | 24 ++ Buffs/StatBuffs/HallowedRuneDefBuff.png | Bin 0 -> 651 bytes Buffs/StatBuffs/HallowedRuneRegenBuff.cs | 24 ++ Buffs/StatBuffs/HallowedRuneRegenBuff.png | Bin 0 -> 605 bytes Buffs/Summon/BloodDragonsBuff.cs | 36 ++ Buffs/Summon/BloodDragonsBuff.png | Bin 0 -> 567 bytes Buffs/Summon/CorvidHarbringerBuff.cs | 36 ++ Buffs/Summon/CorvidHarbringerBuff.png | Bin 0 -> 540 bytes Buffs/Summon/DazzlingStabberBuff.cs | 36 ++ Buffs/Summon/DazzlingStabberBuff.png | Bin 0 -> 602 bytes Buffs/Summon/EndoHydraBuff.cs | 36 ++ Buffs/Summon/EndoHydraBuff.png | Bin 0 -> 582 bytes Buffs/Summon/FuelCellBundleBuff.cs | 36 ++ Buffs/Summon/FuelCellBundleBuff.png | Bin 0 -> 545 bytes Buffs/Summon/IgneousExaltationBuff.cs | 36 ++ Buffs/Summon/IgneousExaltationBuff.png | Bin 0 -> 540 bytes Buffs/Summon/RadiantResolutionBuff.cs | 36 ++ Buffs/Summon/RadiantResolutionBuff.png | Bin 0 -> 411 bytes CalPlayer/CalamityPlayer.cs | 30 ++ CalPlayer/CalamityPlayerLifeRegen.cs | 5 +- CalPlayer/CalamityPlayerMiscEffects.cs | 27 +- CalamityMod.cs | 3 + Events/AcidRainEvent.cs | 157 +++++++++ ExtraTextures/UI/AcidRainIcon.png | Bin 0 -> 804 bytes Gores/AcidRain/AcidEelGore.png | Bin 0 -> 498 bytes Gores/AcidRain/AcidEelGore2.png | Bin 0 -> 709 bytes Gores/AcidRain/AcidEelGore3.png | Bin 0 -> 642 bytes Gores/AcidRain/NuclearToadGore1.png | Bin 0 -> 511 bytes Gores/AcidRain/NuclearToadGore2.png | Bin 0 -> 329 bytes Gores/AcidRain/NuclearToadGore3.png | Bin 0 -> 347 bytes Gores/AcidRain/NuclearToadGore4.png | Bin 0 -> 381 bytes Gores/AcidRain/Orthocera.png | Bin 0 -> 714 bytes Gores/AcidRain/Orthocera2.png | Bin 0 -> 832 bytes Gores/AcidRain/OrthoceraGore.png | Bin 0 -> 714 bytes Gores/AcidRain/OrthoceraGore2.png | Bin 0 -> 832 bytes Gores/AcidRain/SkyfinGore.png | Bin 0 -> 424 bytes Gores/AcidRain/SkyfinGore2.png | Bin 0 -> 349 bytes Gores/AcidRain/SkyfinGore3.png | Bin 0 -> 659 bytes Gores/AcidRain/TrilobiteGore.png | Bin 0 -> 960 bytes Gores/AcidRain/TrilobiteGore2.png | Bin 0 -> 321 bytes Gores/AcidRain/TrilobiteGore3.png | Bin 0 -> 413 bytes ILEditing/ILChanges.cs | 214 ++++++++++++ Items/Accessories/Abaddon_Head.png | Bin 0 -> 2472 bytes Items/Accessories/AbyssalDivingGear_Head.png | Bin 0 -> 3393 bytes Items/Accessories/CorrosiveSpine.cs | 62 ++++ Items/Accessories/CorrosiveSpine.png | Bin 0 -> 425 bytes Items/Accessories/HallowedRune.cs | 44 +++ Items/Accessories/HallowedRune.png | Bin 0 -> 454 bytes Items/Accessories/MutatedTruffle.cs | 44 +++ Items/Accessories/MutatedTruffle.png | Bin 0 -> 548 bytes Items/Accessories/StarbusterCore.cs | 34 ++ Items/Accessories/StarbusterCore.png | Bin 0 -> 697 bytes Items/Materials/Acidwood.cs | 20 ++ Items/Materials/Acidwood.png | Bin 0 -> 304 bytes Items/Materials/SulfuricScale.cs | 22 ++ Items/Materials/SulfuricScale.png | Bin 0 -> 287 bytes Items/Placeables/Banners/AcidEelBanner.cs | 25 ++ Items/Placeables/Banners/AcidEelBanner.png | Bin 0 -> 454 bytes Items/Placeables/Banners/NuclearToadBanner.cs | 25 ++ .../Placeables/Banners/NuclearToadBanner.png | Bin 0 -> 395 bytes Items/Placeables/Banners/OrthoceraBanner.cs | 25 ++ Items/Placeables/Banners/OrthoceraBanner.png | Bin 0 -> 404 bytes Items/Placeables/Banners/SkyfinBanner.cs | 25 ++ Items/Placeables/Banners/SkyfinBanner.png | Bin 0 -> 445 bytes Items/Placeables/Banners/TrilobiteBanner.cs | 25 ++ Items/Placeables/Banners/TrilobiteBanner.png | Bin 0 -> 454 bytes Items/Placeables/Banners/WaterLeechBanner.cs | 25 ++ Items/Placeables/Banners/WaterLeechBanner.png | Bin 0 -> 396 bytes Items/SummonItems/BloodwormItem.cs | 21 ++ Items/SummonItems/BloodwormItem.png | Bin 0 -> 1001 bytes Items/SummonItems/Invasion/CausticTear.png | Bin 0 -> 439 bytes Items/TreasureBags/PlaguebringerGoliathBag.cs | 2 + Items/Weapons/Magic/AcidGun.cs | 54 +++ Items/Weapons/Magic/AcidGun.png | Bin 0 -> 562 bytes Items/Weapons/Magic/Eternity.cs | 77 ++++ Items/Weapons/Magic/Eternity.png | Bin 0 -> 774 bytes Items/Weapons/Magic/Miasma.cs | 49 +++ Items/Weapons/Magic/Miasma.png | Bin 0 -> 1284 bytes Items/Weapons/Magic/VitriolicViper.cs | 57 +++ Items/Weapons/Magic/VitriolicViper.png | Bin 0 -> 1190 bytes Items/Weapons/Melee/Basher.cs | 46 +++ Items/Weapons/Melee/Basher.png | Bin 0 -> 478 bytes Items/Weapons/Ranged/FetidEmesis.cs | 61 ++++ Items/Weapons/Ranged/FetidEmesis.png | Bin 0 -> 1499 bytes Items/Weapons/Ranged/Toxibow.cs | 52 +++ Items/Weapons/Ranged/Toxibow.png | Bin 0 -> 474 bytes Items/Weapons/Rogue/ToxicantTwister.cs | 66 ++++ Items/Weapons/Rogue/ToxicantTwister.png | Bin 0 -> 1157 bytes Items/Weapons/Summon/CadaverousCarrion.cs | 51 +++ Items/Weapons/Summon/CadaverousCarrion.png | Bin 0 -> 1325 bytes Items/Weapons/Summon/CausticCroakerStaff.cs | 59 ++++ Items/Weapons/Summon/CausticCroakerStaff.png | Bin 0 -> 695 bytes Items/Weapons/Summon/CorvidHarbringerStaff.cs | 61 ++++ .../Weapons/Summon/CorvidHarbringerStaff.png | Bin 0 -> 968 bytes Items/Weapons/Summon/DazzlingStabberStaff.cs | 62 ++++ Items/Weapons/Summon/DazzlingStabberStaff.png | Bin 0 -> 1138 bytes Items/Weapons/Summon/DragonbloodDisgorger.cs | 57 +++ Items/Weapons/Summon/DragonbloodDisgorger.png | Bin 0 -> 1163 bytes Items/Weapons/Summon/EndoHydraStaff.cs | 80 +++++ Items/Weapons/Summon/EndoHydraStaff.png | Bin 0 -> 970 bytes Items/Weapons/Summon/FuelCellBundle.cs | 44 +++ Items/Weapons/Summon/FuelCellBundle.png | Bin 0 -> 622 bytes Items/Weapons/Summon/IgneousExaltation.cs | 124 +++++++ Items/Weapons/Summon/IgneousExaltation.png | Bin 0 -> 740 bytes Items/Weapons/Summon/RadiantResolution.cs | 91 +++++ Items/Weapons/Summon/RadiantResolution.png | Bin 0 -> 1156 bytes Items/Weapons/Summon/Sirius.cs | 4 +- NPCs/Abyss/Flounder.cs | 1 + NPCs/Abyss/Frogfish.cs | 1 + NPCs/Abyss/Gnasher.cs | 4 +- NPCs/Abyss/Trasher.cs | 4 +- NPCs/AcidRain/AcidEel.cs | 106 ++++++ NPCs/AcidRain/AcidEel.png | Bin 0 -> 2828 bytes NPCs/AcidRain/BloodwormFleeing.cs | 68 ++++ NPCs/AcidRain/BloodwormFleeing.png | Bin 0 -> 1330 bytes NPCs/AcidRain/BloodwormNormal.cs | 111 ++++++ NPCs/AcidRain/BloodwormNormal.png | Bin 0 -> 665 bytes NPCs/AcidRain/NuclearToad.cs | 128 +++++++ NPCs/AcidRain/NuclearToad.png | Bin 0 -> 1904 bytes NPCs/AcidRain/Orthocera.cs | 167 +++++++++ NPCs/AcidRain/Orthocera.png | Bin 0 -> 3182 bytes NPCs/AcidRain/Skyfin.cs | 150 ++++++++ NPCs/AcidRain/Skyfin.png | Bin 0 -> 1707 bytes NPCs/AcidRain/Trilobite.cs | 146 ++++++++ NPCs/AcidRain/Trilobite.png | Bin 0 -> 3235 bytes NPCs/AcidRain/WaterLeech.cs | 141 ++++++++ NPCs/AcidRain/WaterLeech.png | Bin 0 -> 610 bytes NPCs/AcidRain/WaterLeechGlow.png | Bin 0 -> 366 bytes NPCs/Astral/StellarCulex.cs | 5 + NPCs/CalamityGlobalNPC.cs | 24 ++ .../PlaguebringerGoliath.cs | 2 + Projectiles/Enemy/NuclearToadGoo.cs | 51 +++ Projectiles/Enemy/NuclearToadGoo.png | Bin 0 -> 591 bytes Projectiles/Enemy/OrthoceraStream.cs | 63 ++++ Projectiles/Enemy/OrthoceraStream.png | Bin 0 -> 159 bytes Projectiles/Enemy/TrilobiteSpike.cs | 47 +++ Projectiles/Enemy/TrilobiteSpike.png | Bin 0 -> 342 bytes Projectiles/Environment/AcidDrop.cs | 59 ++++ Projectiles/Environment/AcidDrop.png | Bin 0 -> 262 bytes Projectiles/Environment/HotSteam.cs | 38 ++ Projectiles/Environment/HotSteam.png | Bin 0 -> 119 bytes Projectiles/Magic/AcidGunStream.cs | 63 ++++ Projectiles/Magic/AcidGunStream.png | Bin 0 -> 159 bytes Projectiles/Magic/EternityBook.cs | 84 +++++ Projectiles/Magic/EternityBook.png | Bin 0 -> 787 bytes Projectiles/Magic/EternityCircle.cs | 66 ++++ Projectiles/Magic/EternityCircle.png | Bin 0 -> 191 bytes Projectiles/Magic/EternityCrystal.cs | 172 +++++++++ Projectiles/Magic/EternityCrystal.png | Bin 0 -> 974 bytes Projectiles/Magic/EternityHex.cs | 183 ++++++++++ Projectiles/Magic/EternityHex.png | Bin 0 -> 191 bytes Projectiles/Magic/EternityHoming.cs | 63 ++++ Projectiles/Magic/EternityHoming.png | Bin 0 -> 191 bytes Projectiles/Magic/MiasmaGas.cs | 67 ++++ Projectiles/Magic/MiasmaGas.png | Bin 0 -> 544 bytes Projectiles/Magic/VitriolicViperFang.cs | 57 +++ Projectiles/Magic/VitriolicViperFang.png | Bin 0 -> 418 bytes Projectiles/Magic/VitriolicViperSpit.cs | 39 +++ Projectiles/Magic/VitriolicViperSpit.png | Bin 0 -> 362 bytes Projectiles/Ranged/EmesisGore.cs | 80 +++++ Projectiles/Ranged/EmesisGore.png | Bin 0 -> 253 bytes Projectiles/Ranged/ToxicArrow.cs | 56 +++ Projectiles/Ranged/ToxicArrow.png | Bin 0 -> 428 bytes Projectiles/Rogue/Corrocloud1.cs | 57 +++ Projectiles/Rogue/Corrocloud1.png | Bin 0 -> 1543 bytes Projectiles/Rogue/Corrocloud2.cs | 57 +++ Projectiles/Rogue/Corrocloud2.png | Bin 0 -> 1511 bytes Projectiles/Rogue/Corrocloud3.cs | 57 +++ Projectiles/Rogue/Corrocloud3.png | Bin 0 -> 1635 bytes Projectiles/Rogue/ToxicantTwisterDust.cs | 31 ++ Projectiles/Rogue/ToxicantTwisterDust.png | Bin 0 -> 130 bytes .../Rogue/ToxicantTwisterProjectile.cs | 69 ++++ .../Rogue/ToxicantTwisterProjectile.png | Bin 0 -> 1157 bytes Projectiles/Summon/BloodBreath.cs | 80 +++++ Projectiles/Summon/BloodBreath.png | Bin 0 -> 136 bytes Projectiles/Summon/BloodSpit.cs | 60 ++++ Projectiles/Summon/BloodSpit.png | Bin 0 -> 639 bytes Projectiles/Summon/CryogenShieldIce.cs | 36 ++ Projectiles/Summon/CryogenShieldIce.png | Bin 0 -> 834 bytes Projectiles/Summon/DazzlingStabber.cs | 154 ++++++++ Projectiles/Summon/DazzlingStabber.png | Bin 0 -> 1497 bytes Projectiles/Summon/DazzlingStabberKnife.cs | 48 +++ Projectiles/Summon/DazzlingStabberKnife.png | Bin 0 -> 408 bytes Projectiles/Summon/EXPLODINGFROG.cs | 104 ++++++ Projectiles/Summon/EXPLODINGFROG.png | Bin 0 -> 1250 bytes Projectiles/Summon/EndoHydraBody.cs | 99 ++++++ Projectiles/Summon/EndoHydraBody.png | Bin 0 -> 5104 bytes Projectiles/Summon/EndoHydraChain.png | Bin 0 -> 207 bytes Projectiles/Summon/EndoHydraHead.cs | 190 ++++++++++ Projectiles/Summon/EndoHydraHead.png | Bin 0 -> 1632 bytes Projectiles/Summon/EndoRay.cs | 44 +++ Projectiles/Summon/EndoRay.png | Bin 0 -> 135 bytes Projectiles/Summon/FrogGore1.cs | 48 +++ Projectiles/Summon/FrogGore1.png | Bin 0 -> 266 bytes Projectiles/Summon/FrogGore2.cs | 48 +++ Projectiles/Summon/FrogGore2.png | Bin 0 -> 283 bytes Projectiles/Summon/FrogGore3.cs | 48 +++ Projectiles/Summon/FrogGore3.png | Bin 0 -> 260 bytes Projectiles/Summon/FrogGore4.cs | 48 +++ Projectiles/Summon/FrogGore4.png | Bin 0 -> 355 bytes Projectiles/Summon/FrogGore5.cs | 48 +++ Projectiles/Summon/FrogGore5.png | Bin 0 -> 254 bytes Projectiles/Summon/IgneousBlade.cs | 121 +++++++ Projectiles/Summon/IgneousBlade.png | Bin 0 -> 790 bytes Projectiles/Summon/IgneousBladeStrike.cs | 46 +++ Projectiles/Summon/IgneousBladeStrike.png | Bin 0 -> 790 bytes Projectiles/Summon/MK2FlaskSummon.cs | 47 +++ Projectiles/Summon/MK2FlaskSummon.png | Bin 0 -> 622 bytes Projectiles/Summon/MK2RocketHoming.cs | 62 ++++ Projectiles/Summon/MK2RocketHoming.png | Bin 0 -> 1053 bytes Projectiles/Summon/MK2RocketNormal.cs | 56 +++ Projectiles/Summon/MK2RocketNormal.png | Bin 0 -> 554 bytes Projectiles/Summon/OldDukeHeadCorpse.cs | 81 +++++ Projectiles/Summon/OldDukeHeadCorpse.png | Bin 0 -> 4352 bytes Projectiles/Summon/OldDukeSharkVomit.cs | 48 +++ Projectiles/Summon/OldDukeSharkVomit.png | Bin 0 -> 1407 bytes Projectiles/Summon/PlaguebringerMK2.cs | 142 ++++++++ Projectiles/Summon/PlaguebringerMK2.png | Bin 0 -> 1772 bytes Projectiles/Summon/PowerfulRaven.cs | 160 +++++++++ Projectiles/Summon/PowerfulRaven.png | Bin 0 -> 1537 bytes Projectiles/Summon/RadiantResolutionAura.cs | 126 +++++++ Projectiles/Summon/RadiantResolutionAura.png | Bin 0 -> 1630 bytes Projectiles/Summon/RadiantResolutionFire.cs | 61 ++++ Projectiles/Summon/RadiantResolutionFire.png | Bin 0 -> 138 bytes Projectiles/Summon/RadiantResolutionOrb.cs | 67 ++++ Projectiles/Summon/RadiantResolutionOrb.png | Bin 0 -> 4019 bytes Projectiles/Summon/SkeletalDragonChild.cs | 141 ++++++++ Projectiles/Summon/SkeletalDragonChild.png | Bin 0 -> 1917 bytes Projectiles/Summon/SkeletalDragonMother.cs | 133 +++++++ Projectiles/Summon/SkeletalDragonMother.png | Bin 0 -> 3276 bytes Projectiles/Summon/SummonAstralExplosion.cs | 50 +++ Projectiles/Summon/SummonAstralExplosion.png | Bin 0 -> 513 bytes Projectiles/Summon/YoungDuke.cs | 124 +++++++ Projectiles/Summon/YoungDuke.png | Bin 0 -> 7532 bytes Projectiles/Summon/YoungDukeEyes.png | Bin 0 -> 421 bytes Tiles/Abyss/SteamGeyser.cs | 47 +++ Tiles/Abyss/SteamGeyser.png | Bin 0 -> 949 bytes Tiles/MonsterBanner.cs | 37 +- Tiles/MonsterBanner.png | Bin 66549 -> 53180 bytes World/Abyss.cs | 328 +++++++++++++++++- World/CalamityWorld.cs | 47 ++- World/WorldGenerationMethods.cs | 10 +- 245 files changed, 7733 insertions(+), 27 deletions(-) create mode 100644 Buffs/FuelCellBundleSummon.png create mode 100644 Buffs/StatBuffs/HallowedRuneAtkBuff.cs create mode 100644 Buffs/StatBuffs/HallowedRuneAtkBuff.png create mode 100644 Buffs/StatBuffs/HallowedRuneDefBuff.cs create mode 100644 Buffs/StatBuffs/HallowedRuneDefBuff.png create mode 100644 Buffs/StatBuffs/HallowedRuneRegenBuff.cs create mode 100644 Buffs/StatBuffs/HallowedRuneRegenBuff.png create mode 100644 Buffs/Summon/BloodDragonsBuff.cs create mode 100644 Buffs/Summon/BloodDragonsBuff.png create mode 100644 Buffs/Summon/CorvidHarbringerBuff.cs create mode 100644 Buffs/Summon/CorvidHarbringerBuff.png create mode 100644 Buffs/Summon/DazzlingStabberBuff.cs create mode 100644 Buffs/Summon/DazzlingStabberBuff.png create mode 100644 Buffs/Summon/EndoHydraBuff.cs create mode 100644 Buffs/Summon/EndoHydraBuff.png create mode 100644 Buffs/Summon/FuelCellBundleBuff.cs create mode 100644 Buffs/Summon/FuelCellBundleBuff.png create mode 100644 Buffs/Summon/IgneousExaltationBuff.cs create mode 100644 Buffs/Summon/IgneousExaltationBuff.png create mode 100644 Buffs/Summon/RadiantResolutionBuff.cs create mode 100644 Buffs/Summon/RadiantResolutionBuff.png create mode 100644 Events/AcidRainEvent.cs create mode 100644 ExtraTextures/UI/AcidRainIcon.png create mode 100644 Gores/AcidRain/AcidEelGore.png create mode 100644 Gores/AcidRain/AcidEelGore2.png create mode 100644 Gores/AcidRain/AcidEelGore3.png create mode 100644 Gores/AcidRain/NuclearToadGore1.png create mode 100644 Gores/AcidRain/NuclearToadGore2.png create mode 100644 Gores/AcidRain/NuclearToadGore3.png create mode 100644 Gores/AcidRain/NuclearToadGore4.png create mode 100644 Gores/AcidRain/Orthocera.png create mode 100644 Gores/AcidRain/Orthocera2.png create mode 100644 Gores/AcidRain/OrthoceraGore.png create mode 100644 Gores/AcidRain/OrthoceraGore2.png create mode 100644 Gores/AcidRain/SkyfinGore.png create mode 100644 Gores/AcidRain/SkyfinGore2.png create mode 100644 Gores/AcidRain/SkyfinGore3.png create mode 100644 Gores/AcidRain/TrilobiteGore.png create mode 100644 Gores/AcidRain/TrilobiteGore2.png create mode 100644 Gores/AcidRain/TrilobiteGore3.png create mode 100644 ILEditing/ILChanges.cs create mode 100644 Items/Accessories/Abaddon_Head.png create mode 100644 Items/Accessories/AbyssalDivingGear_Head.png create mode 100644 Items/Accessories/CorrosiveSpine.cs create mode 100644 Items/Accessories/CorrosiveSpine.png create mode 100644 Items/Accessories/HallowedRune.cs create mode 100644 Items/Accessories/HallowedRune.png create mode 100644 Items/Accessories/MutatedTruffle.cs create mode 100644 Items/Accessories/MutatedTruffle.png create mode 100644 Items/Accessories/StarbusterCore.cs create mode 100644 Items/Accessories/StarbusterCore.png create mode 100644 Items/Materials/Acidwood.cs create mode 100644 Items/Materials/Acidwood.png create mode 100644 Items/Materials/SulfuricScale.cs create mode 100644 Items/Materials/SulfuricScale.png create mode 100644 Items/Placeables/Banners/AcidEelBanner.cs create mode 100644 Items/Placeables/Banners/AcidEelBanner.png create mode 100644 Items/Placeables/Banners/NuclearToadBanner.cs create mode 100644 Items/Placeables/Banners/NuclearToadBanner.png create mode 100644 Items/Placeables/Banners/OrthoceraBanner.cs create mode 100644 Items/Placeables/Banners/OrthoceraBanner.png create mode 100644 Items/Placeables/Banners/SkyfinBanner.cs create mode 100644 Items/Placeables/Banners/SkyfinBanner.png create mode 100644 Items/Placeables/Banners/TrilobiteBanner.cs create mode 100644 Items/Placeables/Banners/TrilobiteBanner.png create mode 100644 Items/Placeables/Banners/WaterLeechBanner.cs create mode 100644 Items/Placeables/Banners/WaterLeechBanner.png create mode 100644 Items/SummonItems/BloodwormItem.cs create mode 100644 Items/SummonItems/BloodwormItem.png create mode 100644 Items/SummonItems/Invasion/CausticTear.png create mode 100644 Items/Weapons/Magic/AcidGun.cs create mode 100644 Items/Weapons/Magic/AcidGun.png create mode 100644 Items/Weapons/Magic/Eternity.cs create mode 100644 Items/Weapons/Magic/Eternity.png create mode 100644 Items/Weapons/Magic/Miasma.cs create mode 100644 Items/Weapons/Magic/Miasma.png create mode 100644 Items/Weapons/Magic/VitriolicViper.cs create mode 100644 Items/Weapons/Magic/VitriolicViper.png create mode 100644 Items/Weapons/Melee/Basher.cs create mode 100644 Items/Weapons/Melee/Basher.png create mode 100644 Items/Weapons/Ranged/FetidEmesis.cs create mode 100644 Items/Weapons/Ranged/FetidEmesis.png create mode 100644 Items/Weapons/Ranged/Toxibow.cs create mode 100644 Items/Weapons/Ranged/Toxibow.png create mode 100644 Items/Weapons/Rogue/ToxicantTwister.cs create mode 100644 Items/Weapons/Rogue/ToxicantTwister.png create mode 100644 Items/Weapons/Summon/CadaverousCarrion.cs create mode 100644 Items/Weapons/Summon/CadaverousCarrion.png create mode 100644 Items/Weapons/Summon/CausticCroakerStaff.cs create mode 100644 Items/Weapons/Summon/CausticCroakerStaff.png create mode 100644 Items/Weapons/Summon/CorvidHarbringerStaff.cs create mode 100644 Items/Weapons/Summon/CorvidHarbringerStaff.png create mode 100644 Items/Weapons/Summon/DazzlingStabberStaff.cs create mode 100644 Items/Weapons/Summon/DazzlingStabberStaff.png create mode 100644 Items/Weapons/Summon/DragonbloodDisgorger.cs create mode 100644 Items/Weapons/Summon/DragonbloodDisgorger.png create mode 100644 Items/Weapons/Summon/EndoHydraStaff.cs create mode 100644 Items/Weapons/Summon/EndoHydraStaff.png create mode 100644 Items/Weapons/Summon/FuelCellBundle.cs create mode 100644 Items/Weapons/Summon/FuelCellBundle.png create mode 100644 Items/Weapons/Summon/IgneousExaltation.cs create mode 100644 Items/Weapons/Summon/IgneousExaltation.png create mode 100644 Items/Weapons/Summon/RadiantResolution.cs create mode 100644 Items/Weapons/Summon/RadiantResolution.png create mode 100644 NPCs/AcidRain/AcidEel.cs create mode 100644 NPCs/AcidRain/AcidEel.png create mode 100644 NPCs/AcidRain/BloodwormFleeing.cs create mode 100644 NPCs/AcidRain/BloodwormFleeing.png create mode 100644 NPCs/AcidRain/BloodwormNormal.cs create mode 100644 NPCs/AcidRain/BloodwormNormal.png create mode 100644 NPCs/AcidRain/NuclearToad.cs create mode 100644 NPCs/AcidRain/NuclearToad.png create mode 100644 NPCs/AcidRain/Orthocera.cs create mode 100644 NPCs/AcidRain/Orthocera.png create mode 100644 NPCs/AcidRain/Skyfin.cs create mode 100644 NPCs/AcidRain/Skyfin.png create mode 100644 NPCs/AcidRain/Trilobite.cs create mode 100644 NPCs/AcidRain/Trilobite.png create mode 100644 NPCs/AcidRain/WaterLeech.cs create mode 100644 NPCs/AcidRain/WaterLeech.png create mode 100644 NPCs/AcidRain/WaterLeechGlow.png create mode 100644 Projectiles/Enemy/NuclearToadGoo.cs create mode 100644 Projectiles/Enemy/NuclearToadGoo.png create mode 100644 Projectiles/Enemy/OrthoceraStream.cs create mode 100644 Projectiles/Enemy/OrthoceraStream.png create mode 100644 Projectiles/Enemy/TrilobiteSpike.cs create mode 100644 Projectiles/Enemy/TrilobiteSpike.png create mode 100644 Projectiles/Environment/AcidDrop.cs create mode 100644 Projectiles/Environment/AcidDrop.png create mode 100644 Projectiles/Environment/HotSteam.cs create mode 100644 Projectiles/Environment/HotSteam.png create mode 100644 Projectiles/Magic/AcidGunStream.cs create mode 100644 Projectiles/Magic/AcidGunStream.png create mode 100644 Projectiles/Magic/EternityBook.cs create mode 100644 Projectiles/Magic/EternityBook.png create mode 100644 Projectiles/Magic/EternityCircle.cs create mode 100644 Projectiles/Magic/EternityCircle.png create mode 100644 Projectiles/Magic/EternityCrystal.cs create mode 100644 Projectiles/Magic/EternityCrystal.png create mode 100644 Projectiles/Magic/EternityHex.cs create mode 100644 Projectiles/Magic/EternityHex.png create mode 100644 Projectiles/Magic/EternityHoming.cs create mode 100644 Projectiles/Magic/EternityHoming.png create mode 100644 Projectiles/Magic/MiasmaGas.cs create mode 100644 Projectiles/Magic/MiasmaGas.png create mode 100644 Projectiles/Magic/VitriolicViperFang.cs create mode 100644 Projectiles/Magic/VitriolicViperFang.png create mode 100644 Projectiles/Magic/VitriolicViperSpit.cs create mode 100644 Projectiles/Magic/VitriolicViperSpit.png create mode 100644 Projectiles/Ranged/EmesisGore.cs create mode 100644 Projectiles/Ranged/EmesisGore.png create mode 100644 Projectiles/Ranged/ToxicArrow.cs create mode 100644 Projectiles/Ranged/ToxicArrow.png create mode 100644 Projectiles/Rogue/Corrocloud1.cs create mode 100644 Projectiles/Rogue/Corrocloud1.png create mode 100644 Projectiles/Rogue/Corrocloud2.cs create mode 100644 Projectiles/Rogue/Corrocloud2.png create mode 100644 Projectiles/Rogue/Corrocloud3.cs create mode 100644 Projectiles/Rogue/Corrocloud3.png create mode 100644 Projectiles/Rogue/ToxicantTwisterDust.cs create mode 100644 Projectiles/Rogue/ToxicantTwisterDust.png create mode 100644 Projectiles/Rogue/ToxicantTwisterProjectile.cs create mode 100644 Projectiles/Rogue/ToxicantTwisterProjectile.png create mode 100644 Projectiles/Summon/BloodBreath.cs create mode 100644 Projectiles/Summon/BloodBreath.png create mode 100644 Projectiles/Summon/BloodSpit.cs create mode 100644 Projectiles/Summon/BloodSpit.png create mode 100644 Projectiles/Summon/CryogenShieldIce.cs create mode 100644 Projectiles/Summon/CryogenShieldIce.png create mode 100644 Projectiles/Summon/DazzlingStabber.cs create mode 100644 Projectiles/Summon/DazzlingStabber.png create mode 100644 Projectiles/Summon/DazzlingStabberKnife.cs create mode 100644 Projectiles/Summon/DazzlingStabberKnife.png create mode 100644 Projectiles/Summon/EXPLODINGFROG.cs create mode 100644 Projectiles/Summon/EXPLODINGFROG.png create mode 100644 Projectiles/Summon/EndoHydraBody.cs create mode 100644 Projectiles/Summon/EndoHydraBody.png create mode 100644 Projectiles/Summon/EndoHydraChain.png create mode 100644 Projectiles/Summon/EndoHydraHead.cs create mode 100644 Projectiles/Summon/EndoHydraHead.png create mode 100644 Projectiles/Summon/EndoRay.cs create mode 100644 Projectiles/Summon/EndoRay.png create mode 100644 Projectiles/Summon/FrogGore1.cs create mode 100644 Projectiles/Summon/FrogGore1.png create mode 100644 Projectiles/Summon/FrogGore2.cs create mode 100644 Projectiles/Summon/FrogGore2.png create mode 100644 Projectiles/Summon/FrogGore3.cs create mode 100644 Projectiles/Summon/FrogGore3.png create mode 100644 Projectiles/Summon/FrogGore4.cs create mode 100644 Projectiles/Summon/FrogGore4.png create mode 100644 Projectiles/Summon/FrogGore5.cs create mode 100644 Projectiles/Summon/FrogGore5.png create mode 100644 Projectiles/Summon/IgneousBlade.cs create mode 100644 Projectiles/Summon/IgneousBlade.png create mode 100644 Projectiles/Summon/IgneousBladeStrike.cs create mode 100644 Projectiles/Summon/IgneousBladeStrike.png create mode 100644 Projectiles/Summon/MK2FlaskSummon.cs create mode 100644 Projectiles/Summon/MK2FlaskSummon.png create mode 100644 Projectiles/Summon/MK2RocketHoming.cs create mode 100644 Projectiles/Summon/MK2RocketHoming.png create mode 100644 Projectiles/Summon/MK2RocketNormal.cs create mode 100644 Projectiles/Summon/MK2RocketNormal.png create mode 100644 Projectiles/Summon/OldDukeHeadCorpse.cs create mode 100644 Projectiles/Summon/OldDukeHeadCorpse.png create mode 100644 Projectiles/Summon/OldDukeSharkVomit.cs create mode 100644 Projectiles/Summon/OldDukeSharkVomit.png create mode 100644 Projectiles/Summon/PlaguebringerMK2.cs create mode 100644 Projectiles/Summon/PlaguebringerMK2.png create mode 100644 Projectiles/Summon/PowerfulRaven.cs create mode 100644 Projectiles/Summon/PowerfulRaven.png create mode 100644 Projectiles/Summon/RadiantResolutionAura.cs create mode 100644 Projectiles/Summon/RadiantResolutionAura.png create mode 100644 Projectiles/Summon/RadiantResolutionFire.cs create mode 100644 Projectiles/Summon/RadiantResolutionFire.png create mode 100644 Projectiles/Summon/RadiantResolutionOrb.cs create mode 100644 Projectiles/Summon/RadiantResolutionOrb.png create mode 100644 Projectiles/Summon/SkeletalDragonChild.cs create mode 100644 Projectiles/Summon/SkeletalDragonChild.png create mode 100644 Projectiles/Summon/SkeletalDragonMother.cs create mode 100644 Projectiles/Summon/SkeletalDragonMother.png create mode 100644 Projectiles/Summon/SummonAstralExplosion.cs create mode 100644 Projectiles/Summon/SummonAstralExplosion.png create mode 100644 Projectiles/Summon/YoungDuke.cs create mode 100644 Projectiles/Summon/YoungDuke.png create mode 100644 Projectiles/Summon/YoungDukeEyes.png create mode 100644 Tiles/Abyss/SteamGeyser.cs create mode 100644 Tiles/Abyss/SteamGeyser.png diff --git a/Buffs/FuelCellBundleSummon.png b/Buffs/FuelCellBundleSummon.png new file mode 100644 index 0000000000000000000000000000000000000000..e210f873f1403775f471fc5d26b6c98039b6c4ca GIT binary patch literal 1467 zcmai!eNfT|7{`BY>h~`TsL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~gm)4$_HtkaLb002ovPDHLkV1m3dD2M<6 literal 0 HcmV?d00001 diff --git a/Buffs/StatBuffs/HallowedRuneRegenBuff.cs b/Buffs/StatBuffs/HallowedRuneRegenBuff.cs new file mode 100644 index 0000000000..09608d87b5 --- /dev/null +++ b/Buffs/StatBuffs/HallowedRuneRegenBuff.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class HallowedRuneRegenBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Hallowed Regen"); + Description.SetDefault("Regenerating life"); + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + longerExpertDebuff = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().sRegen = true; + } + } +} diff --git a/Buffs/StatBuffs/HallowedRuneRegenBuff.png b/Buffs/StatBuffs/HallowedRuneRegenBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..118f4e35e79ea777cc4586f060045b1470442bba GIT binary patch literal 605 zcmV-j0;2tiP)Px%7fD1xR9J=0m%mFKK@`V77xZFS;Q|^0;(2$ofg7NXHozUTDfQxQa~M`ziSA9-tBBIyQ4r{-3tarIwS2*N1p?5u(PH7j3W5SAK;Dxf}!b}d6EO*&1YjTf4Kmlr@>U` zf>ubXK_FEi^RsOp?kFHxFU$oum1h8y{NF&B-J7d=&kdv+N`BRfFJz^^)GYsdS0FeI z>nr6*hrMqd04yA@0??K*N=RSO`0)J_2$}y_n2%m~$=o^JS3qNY&D?Cpku{Am~NBM0DY^z rcLh>8FAu()] > 0) + { + modPlayer.dragonFamily = true; + } + if (!modPlayer.dragonFamily) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/BloodDragonsBuff.png b/Buffs/Summon/BloodDragonsBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..507a4dc69831290153c7d19ad542ae2c7cb9f1a3 GIT binary patch literal 567 zcmV-70?7S|P)Px$@kvBMR9J=Om%mF}Q545NG2H^qqN!PG79luDiQSqdgB1!cu}l62DR$|<&?OXF zbdWAx3K_&KZaS1gvb9A7CE)Vv;*WNTV7HPE_kDTXlRRRVc){-y&O7(r-0$~$@44q? zmL5I=;QRIEfC-|Uoz4JEP4Z7iAp;BmJ}#^P5Jfitlu9{opq>jhKMwZ&w|_c7017-v zOH^{um+y1p%_oGTz_9nD(3J4YBtzvl$j$vc<2>{K#Lm*MY=38+-4dEytZ}QbS0KRm70#J+NX6)&+@~k(3 z;%3in?~PZ_|7!u^C?KyteRkV3tF9TG-HNo_j(%Re#cR>Jz^!UGwopafL*a*YkHD*zt&?_)SBrl?CuxB zQ9vt{SHrd2?+p`1qq}GI72|N{3S`RJX#jeEf8Woq()] > 0) + { + modPlayer.powerfulRaven = true; + } + if (!modPlayer.powerfulRaven) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/CorvidHarbringerBuff.png b/Buffs/Summon/CorvidHarbringerBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..6f4f6df1c5c67a1551b4e83a2079923cabcad2cb GIT binary patch literal 540 zcmV+%0^|LOP)Px$)=5M`R9J=Om%U0uK@f$%sHibN3K9t<7XB0wEG*IlMG&zN?8MeWd=K#rd;nW3 zTOnXtA&rG)3W-Pzib2#w4Hi+0b-e6wZ$d20f~T3xo!Oh6vu9`bhSHHR05`AAPyP_; zNH_%0_m_X_hY;`yur-weU@~gYsq*pxz}mF`Tub-1FZrEtd{qS;U|=99keM*H^5P%= zZRHy7F|a#3Wcj7&yRqLD3o~Mu;^@Y0Oy#Ed%(>@S3^fK;HN*M2GP|Kd&>61c;F zhSow5&gzCKtp)K5Gy$)_Xid1oKsI0RYT)_0S^S_~5Cq+6-C-csAF~3DRs(?PRK|W@ ze*z$zzq6hTBLdk)x?+uUWI~kwFG#TZZijX3}y3nTsmT*?0+WooPi$=%+D-a0a;^#FtM3@ z1mN^-$~SLxJOOxG5+?R8npU2B8mQfw86}dbwgZmJgWtbQexp@tn=faDz}-$bJQ4xC zPNyL%7c0BrU{T$m)O|txppNJc0~%Tr!i?^S-NN1bfb?>Wgz`JBeYf8SJ!c@)-)Aam eeZ2qAuj4O|x1mq)&zWQZ0000()] > 0) + { + modPlayer.providenceStabber = true; + } + if (!modPlayer.providenceStabber) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/DazzlingStabberBuff.png b/Buffs/Summon/DazzlingStabberBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..4a2ab50bd6589ec7533a54e1df4fd154dc97a8e8 GIT binary patch literal 602 zcmV-g0;TPx%6iGxuR9J=8moZ3OK@f(&Cn>B%u+b9(2DFG+Xb4J-a-b2-AtIy+2sR-_3b6>m zCKgIS#7eM;3P*x%I6+Q?1R{4t62w?(5l93D6BI$LLYhnQ-n?b^-ukTW*1uV1cJA%X zce6A1ynD4(0POy`EKoxAHP?6m6{S2hN*+)Ecstkv!2OnLEnsK=;#v=S{_1w5e=mC( z>2II^0yse6mg$g;g@mj&5@zPMjBRp{fLQ}Jzl}&+s_M!EO+xMwFqK-Z1fZj-Uh_|N z`~*}+aha1G^5c?$ePeEcDD$QlfQ@b6Kb`%cfACunH+`nLLqbU+ADPn0WO74Seu1(R2xr0fmtBC$-0X0Pr~d$0nHUEY37f`O4gokm`~^TJ z*Qp=uy#O2_VC@4-b4P%E%1MTk?_L9t$ggVq19#g1*bMBEp07YL33mwCe)~Ahj?Dn^ zB$k6(5E7!Y69{iX;qzc*fH}QnHpp$*JlF$NwJ+w>ET=Jfa;9d(ZAYu`t*@zhy5U^6|qy3 z!+-+>ifSNkehZnC-@cis)2Cl{^rL2{5B$|6Au2n8q8cz2TN5IqHbhVQyEWUn8u0p> oYXJE4()] > 0) + { + modPlayer.endoHydra = true; + } + if (!modPlayer.endoHydra) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/EndoHydraBuff.png b/Buffs/Summon/EndoHydraBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..46127e0c188f9e4301c832b5179ab2a8db34ad4a GIT binary patch literal 582 zcmV-M0=fN(P)Px%07*naR9J=Ompw~dK@^6c8w>_SV<1r@rcjH(ZZuj1v|2)nz_to0(g;Bi#NN^( zg0(h+2>t-u*ojz0NU=s#5VA@@{0z7uKVVbbd9Tiickfm@khhtg&pYRtb9T-|UAZCv z$NOtl?oeI1Vg&HuE>FitFaj@eJtiJ3AV6fv&%?0b7zdF+c1VErc zKeY42LRW5YF8l2n(ztC$V4(2H>(_Ura0r~POvR$9`6mRLe*^Q>>&JAot$ z^0~JF93Ae}obY^Xp=Q4&krov{HfDj42z0*a1K>&X(_06&wsind+FJM8Es=WvC(4T- zfB*<2QIKW1G&uCmtCw8#ByvPfZM&1AtL*CG5RhyXG+j0U@bJ-30J?i$dHwG{jstK} zc6W)hyt^k4r2CE(4uRyX4S~YsJOFERLjY8auT(D10J!?|D_-YWyT4wB!XY4a4##Ku zd-pqVZMh^%B}I>oB9W0#$@{IsA)p;M5|=F_697Cucnv^%HTLqO@~*dlh*U1my>>-` zRk-z>% literal 0 HcmV?d00001 diff --git a/Buffs/Summon/FuelCellBundleBuff.cs b/Buffs/Summon/FuelCellBundleBuff.cs new file mode 100644 index 0000000000..8516a54014 --- /dev/null +++ b/Buffs/Summon/FuelCellBundleBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class FuelCellBundleBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Mini Plaguebringer"); + Description.SetDefault("A small plague bee is following you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.plaguebringerMK2 = true; + } + if (!modPlayer.plaguebringerMK2) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/FuelCellBundleBuff.png b/Buffs/Summon/FuelCellBundleBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..cceb2eea4557208ec46898a7d1f44c4cd505bac7 GIT binary patch literal 545 zcmV++0^a?JP)Px$+et)0R9J=8m&+?fQ5431S3*J*C6AQyn#gma7)TNmQ8F>`9~da5j7TX16QwB0 zM5Gunz{tStN+uq6B(6tl?p=<(94-d#_D#BC_bYqq0C))UXy3EzJoYHCxP1*kPf_NV4q_+J)l%|9Q}GD^3)3lpv-XZ%z(4E? jc*6B}oS2+x$KUZQwxzeBwwHzS00000NkvXXu0mjfg0uaO literal 0 HcmV?d00001 diff --git a/Buffs/Summon/IgneousExaltationBuff.cs b/Buffs/Summon/IgneousExaltationBuff.cs new file mode 100644 index 0000000000..c44d973dfa --- /dev/null +++ b/Buffs/Summon/IgneousExaltationBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class IgneousExaltationBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Igneous Blade"); + Description.SetDefault("A blade is orbiting you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.igneousExaltation = true; + } + if (!modPlayer.providenceStabber) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/IgneousExaltationBuff.png b/Buffs/Summon/IgneousExaltationBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..13ce07a7d2503fe12cb4d6cb61ea9fa8227df8c9 GIT binary patch literal 540 zcmV+%0^|LOP)Px$)=5M`R9J=Om%T~@K@>*MiYTr^j9@hQM+k@@XhZ~?Aa-^l=p$J90AgcdBR+$@ zje?}J6R{K_u@WIjLO?WNT+oOCiN)q_m~jUcArAO8%gpZ1&UfbS+&fOfjRJ66t<-6u z5^mH1Xlvz1!{h*Ufc3Fi02U*z^1!KA{n3EmeSg1j30Od&UGGRI`T#h;eGGl!$h%Y8 ztC6_U7RN$Dt|k)p5YX37NTgAT9C`lz>Ewjp&R+vf68boz?bI*;JK2)bZw~>HI28h4 zNhbk53305CtIHk&CdV@Kjba{v!QL1E&(&uDdfXo1Gl^}&*Ibu91WXFZGzfHeb%Z|G z-y2R)j|J=gf*=0w(AB zn*UbT?E?V;lk>fppWP%z^r#<*`cePgwU>HfztOgbz)bZWXgU<e2a+L9H& zlKu67$+_-WSN^V~Ty>e8i|ip#+*$@;bl1;PCg-`J_VcBm3rtn9NIxI^IRR%aH4eaG e_U3<{jz0io#i)Nx&0yI80000()] > 0) + { + modPlayer.radiantResolution = true; + } + if (!modPlayer.radiantResolution) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/RadiantResolutionBuff.png b/Buffs/Summon/RadiantResolutionBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..71c1dedb1d9f8018edc732a1426bff8c48f563d2 GIT binary patch literal 411 zcmV;M0c8G(P)Px$RY^oaR9J=OmoZKRF$_gt5L;{s+LjY=0U9JI7m0HqaRy2%dXU&_P;3bj4Hw`7 z&>|=)C_=I04Dnz*Bc$~Rel;^0JMquAouuhx2EhBrOJoPkaK;cV{}fRp9p&z1+r%|p$AM5b{)-v!|OVY~W1J_aOm zYmbLQ`_UR19|Hnean4t(_jC%hdnu3z7Z*>!7Y3D`g>VKsb-+@wL|P1$HoS2Q;S3ZF zc=;=^A}g9{m=HU!o`f?{G+@E2`KD%?Ea>3wrt&u)28xPHjaNT5`D}GN%|zcy8qPq; zf_A0#ibc&r%dunt;oi&T2OTh1jdY*6w%x>5>kG;O{WluN* zofDDl@o&$90`b$HitF)k272F&ypz(<8`5YrkpBJc_!CT$ql%pedSn0q002ovPDHLk FV1ihuuA%?{ literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ff3bcb2fa9..77aa41730c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -28,6 +28,7 @@ using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Summon; using CalamityMod.Projectiles.Typeless; using CalamityMod.UI; using CalamityMod.World; @@ -432,6 +433,13 @@ namespace CalamityMod.CalPlayer public int plaguedFuelPackDirection = 0; public bool veneratedLocket = false; public bool camper = false; + public bool corrosiveSpine = false; + public bool miniOldDuke = false; + public bool starbusterCore = false; + public bool hallowedRune = false; + public bool hallowedDefense = false; + public bool hallowedPower = false; + public bool hallowedRegen = false; // Armor Set public bool eskimoSet = false; //vanilla armor @@ -706,6 +714,13 @@ namespace CalamityMod.CalPlayer public bool cSpirit = false; public bool rOrb = false; public bool dCrystal = false; + public bool endoHydra = false; + public bool powerfulRaven = false; + public bool dragonFamily = false; + public bool providenceStabber = false; + public bool radiantResolution = false; + public bool plaguebringerMK2 = false; + public bool igneousExaltation = false; // Biome public bool ZoneCalamity = false; @@ -1211,6 +1226,9 @@ namespace CalamityMod.CalPlayer sDefense = false; sRegen = false; sPower = false; + hallowedDefense = false; + hallowedRegen = false; + hallowedPower = false; IBoots = false; elysianFire = false; sTracers = false; @@ -1498,6 +1516,15 @@ namespace CalamityMod.CalPlayer shellfish = false; hCrab = false; tDime = false; + endoHydra = false; + powerfulRaven = false; + dragonFamily = false; + providenceStabber = false; + hallowedRune = false; + starbusterCore = false; + plaguebringerMK2 = false; + igneousExaltation = false; + radiantResolution = false; abyssalDivingSuitPrevious = abyssalDivingSuit; abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false; @@ -1620,6 +1647,9 @@ namespace CalamityMod.CalPlayer sDefense = false; sRegen = false; sPower = false; + hallowedDefense = false; + hallowedRegen = false; + hallowedPower = false; onyxExcavator = false; angryDog = false; fab = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index db47c8ac9c..ccb5b59263 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -551,7 +551,10 @@ namespace CalamityMod.CalPlayer if (modPlayer.sRegen) player.lifeRegen += 2; - if (modPlayer.affliction || modPlayer.afflicted) + if (modPlayer.hallowedRegen) + player.lifeRegen += 3; + + if (modPlayer.affliction || modPlayer.afflicted) player.lifeRegen += 1; if (modPlayer.absorber) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 98c0e334aa..27b046991c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -17,6 +17,7 @@ using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; +using CalamityMod.Projectiles.Environment; using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; @@ -402,10 +403,26 @@ namespace CalamityMod.CalPlayer if (modPlayer.ZoneCalamity && player.lavaWet) { player.AddBuff(ModContent.BuffType(), 2, false); - } + } - // Death Mode effects - modPlayer.caveDarkness = 0f; + // Acid rain droplets + if (player.whoAmI == Main.myPlayer) + { + if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur && !CalamityPlayer.areThereAnyDamnBosses) + { + int acidRainDropRate = (int)MathHelper.Clamp(Main.invasionSize * 0.4f, 13.5f, 50); + Vector2 spawnPoint = new Vector2(player.Center.X + Main.rand.Next(-1000, 1001), player.Center.Y - Main.rand.Next(700, 801)); + + if (player.miscCounter % acidRainDropRate == 0f && Main.rand.NextBool(2)) + { + Projectile.NewProjectile(spawnPoint, Vector2.UnitY * Main.rand.NextFloat(7f, 11f), + ModContent.ProjectileType(), 28, 0f); + } + } + } + + // Death Mode effects + modPlayer.caveDarkness = 0f; if (CalamityWorld.death) { if (player.whoAmI == Main.myPlayer) @@ -582,7 +599,9 @@ namespace CalamityMod.CalPlayer } int randomFrequency2 = (int)(20f * frequencyMult); - if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2)) + if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur) + randomFrequency2 = (int)(randomFrequency2 * 3.75); + if (player.miscCounter % (Main.hardMode ? 90 : 120) == 0 && Main.rand.NextBool(randomFrequency2)) { if (!tileSafely.active()) { diff --git a/CalamityMod.cs b/CalamityMod.cs index 5efd145042..9313ac68f1 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; +using CalamityMod.ILEditing; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Fishing.AstralCatches; @@ -232,6 +233,8 @@ namespace CalamityMod LoadClient(); } + ILChanges.Initialize(); + thorium = ModLoader.GetMod("ThoriumMod"); BossHealthBarManager.Load(this); diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs new file mode 100644 index 0000000000..0453bd8376 --- /dev/null +++ b/Events/AcidRainEvent.cs @@ -0,0 +1,157 @@ +using CalamityMod.ILEditing; +using CalamityMod.NPCs.AcidRain; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System; +using System.Linq; +using System.Collections.Generic; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Terraria.Localization; + +namespace CalamityMod.Events +{ + public class AcidRainEvent + { + // Make sure this does not interfere with any vanilla values. An obscure and random number is used just in case + // Any other mods are changing the invasion ID as well. + public const int InvasionID = 57; + + // A partially bright pale-ish cyan with a hint of yellow. + public static readonly Color TextColor = new Color(115, 194, 147); + + // Not readonly so that if anyone else wants to add stuff in here with their own mod, they can. + // The first value is the NPC type, the second is the value they're worth in the event + public static List<(int, int)> PossibleEnemies = new List<(int, int)>() + { + ( ModContent.NPCType(), 0 ), + ( ModContent.NPCType(), 0 ), + ( ModContent.NPCType(), 0 ), + ( ModContent.NPCType(), 1 ), + ( ModContent.NPCType(), 1 ), + ( ModContent.NPCType(), 1 ), + ( ModContent.NPCType(), 1 ), + ( ModContent.NPCType(), 1 ) + }; + + // Temporary variable. Remove when Old Duke is added. + internal const bool OldDukeExists = false; + + /// + /// Broadcasts some text from a given localization key. + /// + /// The key to write + public static void BroadcastEventText(string localizationKey) + { + if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(Language.GetTextValue(localizationKey), TextColor); + } + else if (Main.netMode == NetmodeID.Server) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(localizationKey), TextColor); + } + } + /// + /// Checks if the player's screen is in the view of the invasion, based on . + /// + /// The area to check based on the screen. + /// The ID for the icon. For more info on how this works, check .. + /// + public static bool NearInvasionCheck(int rectangleCheckSize, ref int iconID) + { + Rectangle screen = new Rectangle((int)Main.screenPosition.X, (int)Main.screenPosition.Y, Main.screenWidth, Main.screenHeight); + for (int i = 0; i < Main.npc.Length; i++) + { + if (Main.npc[i].active) + { + iconID = InvasionID; + int type = Main.npc[i].type; + for (int j = 0; j < PossibleEnemies.Count; j++) + { + if (PossibleEnemies.Select(enemy => enemy.Item2).Contains(type)) + { + Rectangle invasionCheckArea = new Rectangle((int)Main.npc[i].Center.X - rectangleCheckSize / 2, (int)Main.npc[i].Center.Y - rectangleCheckSize / 2, + rectangleCheckSize, rectangleCheckSize); + if (screen.Intersects(invasionCheckArea)) + { + Main.invasionProgressDisplayLeft = 480; + return true; + } + } + } + } + } + return false; + } + /// + /// Attempts to start the Acid Rain event. Will fail if there is another invasion going on. + /// + public static void TryStartEvent() + { + if (CalamityWorld.rainingAcid) + return; + int playerCount = 0; + for (int i = 0; i < Main.player.Length; i++) + { + if (Main.player[i].active) + { + playerCount++; + } + } + if (playerCount > 0) + { + // So that vanilla doesn't shit itself + Main.invasionType = -1; + + CalamityWorld.rainingAcid = true; + // The E - 1 part is to ensure that we start at 1 as a multiple instead of 0 + // At a maximum of 255 players, the max multiplier is 9.98, or 998 enemies that need to be killed. + Main.invasionSize = Main.invasionSizeStart = (int)(180 * Math.Log(playerCount + Math.E - 1)); + Main.invasionProgress = 0; + Main.invasionProgressIcon = 3; + Main.invasionProgressWave = 0; + + // Make it rain normally + Main.raining = true; + + // If abyssSide is true, then the abyss was generated on the left side of the world. + // If false, the right. + Main.invasionX = CalamityWorld.abyssSide ? 0 : Main.maxTilesX; + } + BroadcastEventText("Mods.CalamityMod.AcidRainStart"); // A toxic downpour falls over the wasteland seas! + } + /// + /// Updates the invasion, checking to see if it has ended. + /// + public static void UpdateInvasion() + { + // If the custom invasion is up + if (CalamityWorld.rainingAcid) + { + foreach (Player p in Main.player) + { + NetMessage.SendData(MessageID.InvasionProgressReport, p.whoAmI, -1, null, Main.invasionSizeStart - Main.invasionSize, (float)Main.invasionSizeStart, (float)(Main.invasionType + 3), 0f, 0, 0, 0); + } + // End invasion if we've defeated all the enemies, including Old Duke + if (Main.invasionSize <= 0) + { + CalamityWorld.rainingAcid = false; + BroadcastEventText("Mods.CalamityMod.AcidRainEnd"); // The sulfuric skies begin to clear... + Main.invasionType = 0; + Main.invasionDelay = 0; + Main.invasionProgressNearInvasion = false; + Main.invasionProgressDisplayLeft = 0; + + // Turn off the rain from the event + Main.numCloudsTemp = Main.rand.Next(5, 20 + 1); + Main.numClouds = Main.numCloudsTemp; + Main.windSpeedTemp = Main.rand.NextFloat(0.04f, 0.25f); + Main.windSpeedSet = Main.windSpeedTemp; + Main.raining = false; + } + } + } + } +} diff --git a/ExtraTextures/UI/AcidRainIcon.png b/ExtraTextures/UI/AcidRainIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..3962778a2ee0d014ecaef9350e116e1db8c13a06 GIT binary patch literal 804 zcmV+<1Ka$GP)Px%-bqA3R9J=0m(NR7Q545N*BqsA9K&hM98IlUgjr578EJ@Q76^eUSw#H*RYVI38ij(Uu(GgUGij6Ms6mWouf_8)-f7+tEt>b;-23ji=ic}I z-gC}cnX01ux&0TRq__cdz^MW*B0bD)1zV;Wyt0pLWFxzC*k z!+@O>5D0U5(*#Tfl9>xiip{eYCHl@E1YqVe(1yqg;0B8Oj0E-J70f>Bk z3s}FoFb%(7(#E}8a{vfEE&`yox+3j*8CO6Rx_1EZZ6T^f_sqLCZQ|zg5dg-5i`uyR zR1|>O0S^FIhJq=T~b{FN`5Qb3x`6kWSA?B>;i8(UcQAk2NX)?*_kC;r?W9LYP~{Ky=#78v7_9 z=nWqM;B!|^vMJ?RpW9TgO}hRis@ap7PhQ&#K;HH_o7{#DZ&(4u2HOpQB7X>gqTY~& zOO?fVYKRigPCJ1F^Y3rWFRzR%pt{ap1R%F220%PiV3F7V24U{;0005GNklqapxp6OjrF=!mRa#87B;N8`1zE7ummX9+XKxRKkMGyP zz5`9*@`VBLJUb0;Oq~U#S2Ljawur4De3#F}FnBbsSO^5c9=_;HoQY%zWWR(Ohs)k{ z#e5)Z$TUR!51nRaas{Njo58KILC}1rBMF#DI#BomtK}-)w!cy*0iC*FO?E oH`E_NSN|e7a-yYXT-^zO0+`HoGm`qLwg3PC07*qoM6N<$f;PhBeEA6O>|;y)Cua?X)>)El3?+p8bNH;f~}<>C@2zKxe-A(c3}#Ndj(xox25Zv zh0sl*ASi_{iui$aQ96RsCX?vsXcD51k#Jp{xt-iJLE25H@8;Zd?sGow|32?IC-R0k z^!Z_sU7Q1>F?x>C2#x-VdJXsFjJA5~4%3abI39 zg2%t)W?e{A%U_IQ8kyL%=NJ}e0;#13!;Y>0$5e-JkA^dH@AmNJ*M53}x)-|!R-m43 zzYZjX7J_ws_rSpUSD^1i=-1lW8bkF#wehnuwX-K@R`SK?hQ0v(9f91Dk2i*n^LKzX zHH%)p`VDyRdN>20eBWMszYC22c?Hu6mQepQ$$Xi%;MImD7A0BPyr3ENd(q5DNS@vo zJaXdTSE%0_Dignfb$w+p{KF^s`&pWhO}v#vrjU(ba&Q!lOe}erxt}F57s<2z<$pEd rr#pHgc&EDp3O#8yXO7=R0~31Nkl_=EfqoBHrQBN`2*OBh=qRu3maP-OR=!*#s*2HLS5R3 zOG)EiZS)pBs#+b3_l(o23L%o?w|O(qJHIEB?>v|2)cJ;3P-G6BIra>kI^O_Z+^+%I zky7ybX|PXy9S`yGKG6I6#a!urTl4(>1uK>{Mld?|5r0mwV2Ksa4pbg)1%sFFr3hAJvdEKatX`V(?P@s!+Pi`;JKlpl z!9@!*Lj3m#7Cy0}rDYL$QVF?46So6_q?R_U-Wb99rYMH)5Vor&@r83X!L=(}BdDp| z0y-XCne)R6me^0bGSTI8ld0$Z>*_&SCd{#I+ZThkeG}l#%P(N)LmjBjtV#LXyY7MV z(vk?qCPMz%Ai-f%7t(dPH_bNBrze`8k?*SZu3@mf zX96Nh*0IaDA zyD_P`L@N&70PouNrs9KRk5kVH$=Pbm&B1FohCo~AL;NSiQhL($89eF?^Q`B|_?$%l cl?s;FH?|bZ$A9I~{Qv*}07*qoM6N<$f>U!gSpWb4 literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/NuclearToadGore1.png b/Gores/AcidRain/NuclearToadGore1.png new file mode 100644 index 0000000000000000000000000000000000000000..e7a328664feecc489d581c1f7fe5a69ba86d2ae8 GIT binary patch literal 511 zcmVPx$xk*GpR5*>j)K5!PQ5XjB-whk5{8LU4S(0dkG`et?t^%P&i&ohe=nDivyPyvs zL7QkDge{sDLE$1O`UBdkAT=aNjAVq$V$vAPye;mWE?3l*GtcI{=bZOFJkNa|Zls3c z!3*Hb**tjuq#D}-odYWol&4$4--=H*+i(%j1#FOn%e+B(Lr@+ko`^-i7 z=G)=W{v{CQ3P@8J5Im`Wif&#R&*Xja+dNqR^CHvO)t%e&fzm|wywJWL!Ez#3hf*KBJHEzMsd8lfOxoQ+`ZV-INVosVI4 zWDKdIYHj^Gei*5OfYU>5wJK5a@a3nNMx-bd*KeN(zov#_QcnVcCksn=kTO2mHw-?^ zO@hVp8n|`$9UA#B+NiW6W&Y#-DCihmh+uVOEQaoouJXOwxf`_?mHTw;2)t%gbe+0KfV9}002ovPDHLkV1hg+ B^27iD literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/NuclearToadGore2.png b/Gores/AcidRain/NuclearToadGore2.png new file mode 100644 index 0000000000000000000000000000000000000000..3d508ecf729d47e4eec1bb8d18a5d40b1cabb37d GIT binary patch literal 329 zcmV-P0k-~$P)Px$14%?dR49?H(!VQ(VHn2o&+D8zBI*bw=adeI$RL9s*{~=vV6ob5CcDL8^jAp! z0R~wNEEWv%qZB7focxGmIEQ*qZw9^B@;uLV-FNr5r#n!k(Sf;Y3pCb!f~R7l6qVOR zcKt&^H9?=?)yCW587N$~g674$$j18J70@|&AXcJa zVm1#hjy^(rv%IhdUdGpdYb$375_dfT)Sk@5Oq9!Zgp96CKj@t-Z+PqQ?GI@nLaWoq b@e+Ll4U0H6=@HWP00000NkvXXu0mjf;YyPy literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/NuclearToadGore3.png b/Gores/AcidRain/NuclearToadGore3.png new file mode 100644 index 0000000000000000000000000000000000000000..e9abc48dad1754307ad0f2cce34f3cb33a66b35d GIT binary patch literal 347 zcmV-h0i^zkP)Px$6-h)vR5*>j(y=Z>Q5XmC-)$R-h;+~pjaI3|WH8lY@d73Zi8qjV06UA#YnUY7 zKq5Ms4Wx=TgwRMy8EVigX%l*fTmR`K=R4o|H4OzplIX*RuyPZZ8(EIkaK8t>rt`U8}f zM!{XZ)pao3k6)C{eBW4md~L((@;rF!2+C*Qg;Uc*T?da&EE002ovPDHLkV1jelmtX(@ literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/NuclearToadGore4.png b/Gores/AcidRain/NuclearToadGore4.png new file mode 100644 index 0000000000000000000000000000000000000000..2051a0220a2869d376b1c8096dd171908a0848c8 GIT binary patch literal 381 zcmV-@0fPRCP)Px$H%UZ6R5*>j(LGC>Q4|2+=UT1SqEHZx9|1+AbJl`OC!Jgz`a6U!?$W`Mgl}uc_@pSDqSX?WMhEjI{4!@WGen{GQ;lfNdhO3wJ ziGz;Z5LjA$4AKLo0Qs*4P&nB8Pr^6Z32@h4jH&i8HN2cCoSn~u;lWgZlk)(su8$Mq z=1;j2qlM8#esp|;YEO%2U%)_5SAcJ)m(3Bjwv^HVo z*Gd~Nd~}gkE2~U-D|-9a3!VM#iF|52DQ&#)=g2x}+kFurD!vEra#3RXBYn@xi=F!) bY`E|@(6nTL6P)!V00000NkvXXu0mjfn#`-E literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/Orthocera.png b/Gores/AcidRain/Orthocera.png new file mode 100644 index 0000000000000000000000000000000000000000..5d2b67eb29b508272c4d64f6a56610c53e452d23 GIT binary patch literal 714 zcmV;*0yX`KP)(!bx?vL zPj>78P+kigwLBJEGV;@Ht##Kq^=K7^D5*fPPOSdhfG+*8#{6ImQNhi|iTELbSDN{2n|5wQ9{! zy*ipYnMPq=TCJ@{&eO!K{mL6LZ_nts4M4W`|_$i9b0T@ zqUKL~x8;v^e8_tWV)mSHR2Eyu8s%F1)`9qOwz8|?gBR--vw`aZr|0352 zo&o(BpAaOeEhYXd7iV=oV3+hes9j6v*(;0KHuM;=Q%U@#}w^~0MO`f2cWs} z2LS2SWfS1@(z<2-i7Gx@MP&T#2Pj3nE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F{@w5s92Gx2 T1S@;y00000NkvXXu0mjfg@uSu literal 0 HcmV?d00001 diff --git a/Gores/AcidRain/TrilobiteGore3.png b/Gores/AcidRain/TrilobiteGore3.png new file mode 100644 index 0000000000000000000000000000000000000000..b1d7a534a78b408248c8c60fc21aa36ba40ebad3 GIT binary patch literal 413 zcmV;O0b>4%P)8}i6b9huGi?%UXlNv2NehBxuvkzhokZ{_2;Ce67bgc7-TVjoGYT#aZh};3$>65d zQP7B*nnKeO8>C!^ua|mDgi`qWPUpPuxrg_hdoufY{Jb5*0HtavgT39o0Ogr-22by< zI|@!6sp=S*7{et_YZq&vyAr^?`&U43{R~)K>Wyt&nB(j)@!-*AP@f+Kc)xruaTfDd zJ7iF54wCxV^W=8C^|b=NtkuD-n+@=0S(>kG23Wi{icgd2i*r2Rx(ZHL@?ZY>xeBTi zzmvinPlkE0+W23u0B>Jbi`{XSmFoenFWgRqvr|7n`$8?@hu`y^ejEJ({o(mU?|giX zlemiLuvM7^yOWo|=C54u?|j0+Rp@N**Y|NSK}2zmXJ@7}c=hf>_*Zy%C%@;o(>O`Q z)NHOld(lbw*ssv5NQk-SH0W*&!ng;AG1tr;b~gqIUzp>+wMt!(j49=>00000NkvXX Hu0mjfk$S?L literal 0 HcmV?d00001 diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs new file mode 100644 index 0000000000..1275ce068b --- /dev/null +++ b/ILEditing/ILChanges.cs @@ -0,0 +1,214 @@ +using CalamityMod.Events; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; +using MonoMod.Cil; +using static Mono.Cecil.Cil.OpCodes; +namespace CalamityMod.ILEditing +{ + public class ILChanges + { + /// + /// Loads all IL Editing changes in the mod. + /// + public static void Initialize() + { + IL.Terraria.Main.DrawInvasionProgress += (il) => + { + // 201 was retrieved by searching the instructions in dnspy + var cursor = new ILCursor(il) + { + Index = 201 + }; + cursor.EmitDelegate(() => + { + if ((CalamityWorld.rainingAcid && !Main.LocalPlayer.Calamity().ZoneSulphur) || + (!CalamityWorld.rainingAcid && Main.LocalPlayer.Calamity().ZoneSulphur)) + return; + float progressAlpha = 0.5f + Main.invasionProgressAlpha * 0.5f; + if (CalamityWorld.rainingAcid && Main.LocalPlayer.Calamity().ZoneSulphur && + Main.LocalPlayer.Center.Y < (int)(Main.worldSurface * 16) + 1600) + { + int sizeX = (int)(200f * progressAlpha); + int sizeY = (int)(45f * progressAlpha); + Vector2 screenCoords = new Vector2(Main.screenWidth - 120, Main.screenHeight - 40); + Rectangle screenCoordsRectangle = new Rectangle((int)screenCoords.X - sizeX / 2, (int)screenCoords.Y - sizeY / 2, sizeX, sizeY); + Utils.DrawInvBG(Main.spriteBatch, screenCoordsRectangle, new Color(63, 65, 151, 255) * 0.785f); + + float progressRatio = 1f - MathHelper.Clamp(Main.invasionSize / (float)Main.invasionSizeStart, 0f, 1f); + string progressText = $"{((int)(100 * progressRatio)).ToString()}%"; + progressText = Language.GetTextValue("Game.WaveCleared", progressText); + Texture2D barTexture = Main.colorBarTexture; + Texture2D blipTexture = Main.colorBlipTexture; + Main.spriteBatch.Draw(barTexture, screenCoords, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(barTexture.Width / 2, 0f), progressAlpha, SpriteEffects.None, 0f); + Vector2 textMeasurement = Main.fontMouseText.MeasureString(progressText); + float adjustedAlpha = progressAlpha; + if (textMeasurement.Y > 22f) + { + adjustedAlpha *= 22f / textMeasurement.Y; + } + float barDrawOffsetX = 169f * progressAlpha; + float scaleY = 8f * progressAlpha; + Vector2 barDrawPosition = screenCoords + Vector2.UnitY * scaleY + Vector2.UnitX * 1f; + Utils.DrawBorderString(Main.spriteBatch, progressText, barDrawPosition + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, adjustedAlpha, 0.5f, 1f, -1); + barDrawPosition += Vector2.UnitX * (progressRatio - 0.5f) * barDrawOffsetX; + Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(barDrawOffsetX * progressRatio, scaleY), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, scaleY), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(barDrawOffsetX * (1f - progressRatio), scaleY), SpriteEffects.None, 0f); + + string invasionNameText = "Acid Rain"; + Vector2 textMeasurement2 = Main.fontMouseText.MeasureString(invasionNameText); + float x = 120f; + if (textMeasurement2.X > 200f) + { + x += textMeasurement2.X - 200f; + } + Texture2D iconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AcidRainIcon"); + Rectangle iconRectangle = Utils.CenteredRectangle(new Vector2(Main.screenWidth - x, Main.screenHeight - 80), (textMeasurement2 + new Vector2(iconTexture.Width + 12, 6f)) * progressAlpha); + Utils.DrawInvBG(Main.spriteBatch, iconRectangle, AcidRainEvent.TextColor * 0.5f); + Main.spriteBatch.Draw(iconTexture, iconRectangle.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, (float)(iconTexture.Height / 2)), progressAlpha * 0.8f, SpriteEffects.None, 0f); + Utils.DrawBorderString(Main.spriteBatch, invasionNameText, iconRectangle.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1); + } + // I don't have the energy to clean this up. If you want to do so, go ahead. + else + { + Texture2D texture2D = Main.extraTexture[9]; + string text = ""; + Color c = Color.White; + if (Main.invasionProgressIcon == 1) + { + texture2D = Main.extraTexture[8]; + text = Lang.inter[83].Value; + c = new Color(64, 109, 164) * 0.5f; + } + else if (Main.invasionProgressIcon == 2) + { + texture2D = Main.extraTexture[12]; + text = Lang.inter[84].Value; + c = new Color(112, 86, 114) * 0.5f; + } + else if (Main.invasionProgressIcon == 3) + { + texture2D = Main.extraTexture[79]; + text = Language.GetTextValue("DungeonDefenders2.InvasionProgressTitle"); + c = new Color(88, 0, 160) * 0.5f; + } + else if (Main.invasionProgressIcon == 7) + { + texture2D = Main.extraTexture[10]; + text = Lang.inter[85].Value; + c = new Color(165, 160, 155) * 0.5f; + } + else if (Main.invasionProgressIcon == 6) + { + texture2D = Main.extraTexture[11]; + text = Lang.inter[86].Value; + c = new Color(148, 122, 72) * 0.5f; + } + else if (Main.invasionProgressIcon == 5) + { + texture2D = Main.extraTexture[7]; + text = Lang.inter[87].Value; + c = new Color(173, 135, 140) * 0.5f; + } + else if (Main.invasionProgressIcon == 4) + { + texture2D = Main.extraTexture[9]; + text = Lang.inter[88].Value; + c = new Color(94, 72, 131) * 0.5f; + } + if (Main.invasionProgressWave > 0) + { + int num2 = (int)(200f * progressAlpha); + int num3 = (int)(45f * progressAlpha); + Vector2 vector = new Vector2((float)(Main.screenWidth - 120), (float)(Main.screenHeight - 40)); + Rectangle r = new Rectangle((int)vector.X - num2 / 2, (int)vector.Y - num3 / 2, num2, num3); + Utils.DrawInvBG(Main.spriteBatch, r, new Color(63, 65, 151, 255) * 0.785f); + string text2; + if (Main.invasionProgressMax == 0) + { + text2 = Language.GetTextValue("Game.InvasionPoints", Main.invasionProgress); + } + else + { + text2 = ((int)((float)Main.invasionProgress * 100f / (float)Main.invasionProgressMax)).ToString() + "%"; + } + text2 = Language.GetTextValue("Game.WaveMessage", Main.invasionProgressWave, text2); + Texture2D texture2D2 = Main.colorBarTexture; + Texture2D texture2D4 = Main.colorBlipTexture; + float num4 = MathHelper.Clamp((float)Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f); + if (Main.invasionProgressMax == 0) + { + num4 = 1f; + } + float num5 = 169f * progressAlpha; + float num6 = 8f * progressAlpha; + Vector2 vector2 = vector + Vector2.UnitY * num6 + Vector2.UnitX * 1f; + Utils.DrawBorderString(Main.spriteBatch, text2, vector2, Color.White * Main.invasionProgressAlpha, progressAlpha, 0.5f, 1f, -1); + Main.spriteBatch.Draw(texture2D2, vector, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2((float)(texture2D2.Width / 2), 0f), progressAlpha, SpriteEffects.None, 0f); + vector2 += Vector2.UnitX * (num4 - 0.5f) * num5; + Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(num5 * num4, num6), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, num6), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, vector2, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(num5 * (1f - num4), num6), SpriteEffects.None, 0f); + } + else + { + int num7 = (int)(200f * progressAlpha); + int num8 = (int)(45f * progressAlpha); + Vector2 vector3 = new Vector2((float)(Main.screenWidth - 120), (float)(Main.screenHeight - 40)); + Rectangle r2 = new Rectangle((int)vector3.X - num7 / 2, (int)vector3.Y - num8 / 2, num7, num8); + Utils.DrawInvBG(Main.spriteBatch, r2, new Color(63, 65, 151, 255) * 0.785f); + string text3; + if (Main.invasionProgressMax == 0) + { + text3 = Main.invasionProgress.ToString(); + } + else + { + text3 = ((int)((float)Main.invasionProgress * 100f / (float)Main.invasionProgressMax)).ToString() + "%"; + } + text3 = Language.GetTextValue("Game.WaveCleared", text3); + Texture2D texture2D3 = Main.colorBarTexture; + Texture2D texture2D5 = Main.colorBlipTexture; + if (Main.invasionProgressMax != 0) + { + Main.spriteBatch.Draw(texture2D3, vector3, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2((float)(texture2D3.Width / 2), 0f), progressAlpha, SpriteEffects.None, 0f); + float num9 = MathHelper.Clamp((float)Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f); + Vector2 vector4 = Main.fontMouseText.MeasureString(text3); + float num10 = progressAlpha; + if (vector4.Y > 22f) + { + num10 *= 22f / vector4.Y; + } + float num11 = 169f * progressAlpha; + float num12 = 8f * progressAlpha; + Vector2 vector5 = vector3 + Vector2.UnitY * num12 + Vector2.UnitX * 1f; + Utils.DrawBorderString(Main.spriteBatch, text3, vector5 + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, num10, 0.5f, 1f, -1); + vector5 += Vector2.UnitX * (num9 - 0.5f) * num11; + Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(num11 * num9, num12), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, num12), SpriteEffects.None, 0f); + Main.spriteBatch.Draw(Main.magicPixel, vector5, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(num11 * (1f - num9), num12), SpriteEffects.None, 0f); + } + } + Vector2 value = Main.fontMouseText.MeasureString(text); + float num13 = 120f; + if (value.X > 200f) + { + num13 += value.X - 200f; + } + Rectangle r3 = Utils.CenteredRectangle(new Vector2((float)Main.screenWidth - num13, (float)(Main.screenHeight - 80)), (value + new Vector2((float)(texture2D.Width + 12), 6f)) * progressAlpha); + Utils.DrawInvBG(Main.spriteBatch, r3, c); + Main.spriteBatch.Draw(texture2D, r3.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, (float)(texture2D.Height / 2)), progressAlpha * 0.8f, SpriteEffects.None, 0f); + Utils.DrawBorderString(Main.spriteBatch, text, r3.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1); + } + }); + cursor.Emit(Pop); + cursor.Emit(Ret); + }; + } + } +} diff --git a/Items/Accessories/Abaddon_Head.png b/Items/Accessories/Abaddon_Head.png new file mode 100644 index 0000000000000000000000000000000000000000..4b6e75247b5576965d9e9dce6f8e3a79813be902 GIT binary patch literal 2472 zcmeAS@N?(olHy`uVBq!ia0vp^8Vn392^?%d*6dv(^$ZN0d7dtgAr*0NZ*4r4c2%Q%2{3uuaG6uC;|YTeGr!_pk!?bC{+k?$yYae zuwC1~F8@Jj{%rXY`_1=j*FG=z{kZQ-#t(aa-udqXnO||L&RD>ev5!w}1=Fnk(d_pt zo}Rb=Q!-=y|L;%Vp8xmmz{xAfA8PtU*C5(|Nq8T^Z(@iJd6KTziz&L9xlJH z_V>@@{r_y83+^=d|Nr!EZSwz`Z-0GXywCsl_1kCp`?b}-f8JxS-}SfV+x+}Id-+?g z?;iYMyq^E^{r#%9|I2b~4@}m#+nc!N{VV?k2lX!OF z5XQ6D53+w?efSukMV)TypN8b?L1EvI@%`wI z^p@OzV{_lGy^?!9<3j%B)kkI=5LaDLpXWXY9(3!QIaf72d!5jvwcw`}B1CZr0|WZ@ z?2C&fc2C=6m-D9K@%5l%{1#=psipaE8s46baWAQvZ1euvh5z&a+5CSk`{7>D`QM-W zSfvB%J%xNe_{qN59-&C8XA8m??423A^0}=!&>mi!vI8HpH6OFf09~-lyzIcYv~|i> z|4utq8*8mFKcDySM@M=5g7cM4kGzVIy;2ytkzNg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o@DLvMrom)C(); + break; + case 1: + type = ModContent.ProjectileType(); + break; + case 2: + type = ModContent.ProjectileType(); + break; + } + // Should never happen, but just in case- + if (type != -1) + { + float speed = Main.rand.NextFloat(3f, 11f); + Projectile.NewProjectile(player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, + type, 100, 0f, player.whoAmI); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Items/Accessories/CorrosiveSpine.png b/Items/Accessories/CorrosiveSpine.png new file mode 100644 index 0000000000000000000000000000000000000000..54e40784ede29e6513bfb4477130e5f62e4412cf GIT binary patch literal 425 zcmeAS@N?(olHy`uVBq!ia0vp^LO`s?!3HE%%RC!_6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(K&H|6fVg?4j!ywFfJby(BP*AeOHKHUqKdq!Zu_%?HATcwqL@zJ3M8QPQ zK+n+FggLqjXsV>Ai(`m~_t8lkc@G%~xNhba<#oOg80aLut)WX)L*pi6r|gTF94W8o zaopclFiE-QrTDkM)hA;wtq|M%(>PuGx;8uKwxYcmHd|)Dc>Po2uJj8wCle;7JJK)s zm_F=?U$mTE@W|UDS>6ug(roXmtt|a)8&ke!Ztb1N*TV5?ljPZ?`=$~ui)Xnx?DW}? zDC1~y=i6@n%_$B&Q8BxuIRqClGCyj3vPO5Rbce$FGm-&?B2%R~G&`35mvdQ|;-F(Y zo%0*}N6WA6Pvj=t``s*{tTCf{+FHx(dT-{%j%7Y}_R6A+CwN;pR!RE4U#mNn?PG$# z>1#`iL3T5}*qif&?^WORY?UW`Nn8FmiZrZdJR!RT=$E1i3EJXUO!O6_cjhhoaPB!U PBpEzi{an^LB{Ts58KIw4 literal 0 HcmV?d00001 diff --git a/Items/Accessories/HallowedRune.cs b/Items/Accessories/HallowedRune.cs new file mode 100644 index 0000000000..e10f6da85b --- /dev/null +++ b/Items/Accessories/HallowedRune.cs @@ -0,0 +1,44 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class HallowedRune : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hallowed Rune"); + Tooltip.SetDefault("Whenever your minions hit an enemy you will gain a random buff\n" + + "These buffs will either boost your defense, summon damage, or life regen for a while"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 36, 0, 0); + item.rare = 5; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.hallowedRune = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.HallowedBar, 18); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/HallowedRune.png b/Items/Accessories/HallowedRune.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5301f9a198416e4f3dd245003d13f5fa053086 GIT binary patch literal 454 zcmV;%0XhDOP)Px$fJsC_R7i=vmZ49>Kop0+BdnX4La=2^1FjehBus$CqEIt91cqb@e+7gDi<<$D z#eyga)69)DEZYQXVx1{sd8~K4vI(v~)84z@>v!*dcRA(P18gc6O8|`HNn-2wD;o+R z8h!&1eRZ||HEY&?kV+9-$@cth0D_&07JqyW0Vo$s3Sb;hw0>vA>t;X*MJB2FT_@_9 zGgXi$u@H7YhJOx}@8p@PIglr@NwliWn!6)T?J%ulzp({C^(HQJGNe162s z&WP645wPeM@vo;mx2K!(>w(qBqUPCw*1o-d0ie3+0kAtd1)v?@{N{u_Yb>iSL{dxB z4a?-7SXQ-GtO3gjrM6jeN~{11ssKPg?k6xOH+4)?Yl|By%2xoxWVRFC`B+}EZbU+! wMQY}fJ6x{B0C;NV<7qOr-s#MmikuVw0QP2oy>GCwYXATM07*qoM6N<$f&~D<_5c6? literal 0 HcmV?d00001 diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs new file mode 100644 index 0000000000..65817da6e3 --- /dev/null +++ b/Items/Accessories/MutatedTruffle.cs @@ -0,0 +1,44 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Items.Accessories +{ + public class MutatedTruffle : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mutated Truffle"); + Tooltip.SetDefault("Summons a small Old Duke to fight for you\n" + + "When below 50% life, it moves much faster"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 26; + item.value = Item.buyPrice(2, 50, 0, 0); + item.rare = 10; + item.expert = true; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.miniOldDuke = true; + if (player.whoAmI == Main.myPlayer) + { + const int damage = 2424; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + { + Projectile.NewProjectile(player.Center, Vector2.Zero, + ModContent.ProjectileType(), + (int)(damage * (player.allDamage + player.minionDamage - 1f)), + 6.5f, Main.myPlayer, 0f, 0f); + } + } + } + } +} diff --git a/Items/Accessories/MutatedTruffle.png b/Items/Accessories/MutatedTruffle.png new file mode 100644 index 0000000000000000000000000000000000000000..12bf99395c846fb1caa0b02016d2a67d17a237c2 GIT binary patch literal 548 zcmV+<0^9wGP)Px$-bqA3R7i=<)y+#(VH5`N-xVFxVssQ8WHdE~!Vi!!2=N0#>OZJOo0hFxM1MrI zZ5_C2(W+fgL|}_(5wtM`K}AIz&5t1mEa`Sb2;Zc_kGXvzRx*t5G2|_ zN3t927V;qsrc+MZ^41>c@9GI)r?3MKkAB8*;g5ru-{6cb7|4u()$R2VCWdc;tKF%p zKg@r9i(^J7*Wx@F1c|l~?%%u%x_btz0zZ8Dj7ny6?_ZYJ;v5)MY>?kvmfu{i08WpM zn;si4`?=9sxzX7QT##rJDYNPZ|JoW)2Ws6xrgJd%efIkKX-EkDUA+OUZkK{*ucF-0 z6gc?45kk82I+V|QYH|jwEUu%n^2y%*m>;PsVp6|8cy#Y^Rlw61Pr!qzTrB=(X$8y- zl{!DVyGVf%lln2JWh0lf0ThqEg>XAN5X-;YY6443pKv@8>dN46nAnv4xKNs=5ARHX zSM!UYC6NqZVQn>bB4^K_X5yGxtfFl82AEC9U$RJ5euV+#3x_yQ2B}mUT)NNPx%b4f%&R7i=%mETK~Q5eTR$JFUwb(_+PHQUe#K`jd+A%YSj3<_d(B?S@v3H}G& zbsN-u7tw`XbWw-|LR~~%^h>*mg_~2ZfVq3hcj8F z0R|2kp!SOn07K=y8X!BK2cWsTLGAS+Pl*6n+b{%2_8WqOZMw=9JA|~b+77^v8wp^y zR-O{c*=i`eN@C8xrT~6DT?OE})2g9N!pJQE3ODa-fZJ~~3LqLjX4Uatqp6K81+ZR{ zCRyAD;Q7?NCDvUQ0EkV;0C+uO^2f)&$`ZG@3OpqGE6ACXm*uC`QCIY^wc%SPZ9PBh zZ3N)qLL7jx?G*r)KEDGX;)H5MG|*#a-tjvc;M|E**22m6ro&4eM*$ezN&)a@U(9-z zko<#>6M&bl6Tfd3&F!1Ylsa<}Nw_4M-uKdhtfb)ZA zt%cM1bpVFrwub(+(aP;UnICF)*Hv?$xGw#D5h#=OI!yrd6q>ApLLztEe0~|IrR#h? zp8`l_QW{{=^*&L$>&EiNZLj(w0NnYKwbltqX6X}93nKZl`@g;r3ImX+3tIVXUzhbP z+H?mFD1c;c(R%N_>m-E87YG6HJGZO>!u`g5Zj$2TC#FzmrvlKkvq1TTBx*+_QH^X@ ffq#%lct-RGWy;a)K81a#00000NkvXXu0mjf$@xH8 literal 0 HcmV?d00001 diff --git a/Items/Materials/Acidwood.cs b/Items/Materials/Acidwood.cs new file mode 100644 index 0000000000..4ca317c2bc --- /dev/null +++ b/Items/Materials/Acidwood.cs @@ -0,0 +1,20 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Materials +{ + public class Acidwood : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acidwood"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 22; + item.maxStack = 999; + item.value = 0; + } + } +} diff --git a/Items/Materials/Acidwood.png b/Items/Materials/Acidwood.png new file mode 100644 index 0000000000000000000000000000000000000000..b9ce4603bef09c565d3847d5430eb12a931e9208 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^Qa~)m!3HGnb@XfnQY`6?zK#qG8~eHcB(eheoCO|{ z#S9F5hd`K7RKu$QC@5Lt8c`CQpH@-%RJ7L9 z#WBRg`|JcmzC#8AEWXaCxhE*iW8@7n*`pxuG55c?V_%-jmQOE*G%eyXrS897SDLAR zcir7BN9KLMe!rVTF7EuyZ`}rNHShW*Yq!sc$oj(3U9zC(?{1FepAO`kigx=wKRrcL zH+>P4-!hr_BMb%^8xF}?%Dok-Tz|8bX+NkhNJuJ-+Lf?Z6OGt0fconY+#-|1-V wddkQoxo}^^ny@XRo7abHrtqfmPq`$1#y+Qh;_Y=ufDUKyboFyt=akR{0KL|4K>z>% literal 0 HcmV?d00001 diff --git a/Items/Materials/SulfuricScale.cs b/Items/Materials/SulfuricScale.cs new file mode 100644 index 0000000000..c8d90e717f --- /dev/null +++ b/Items/Materials/SulfuricScale.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Materials +{ + public class SulfuricScale : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sulfuric Scale"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.maxStack = 999; + item.value = Item.sellPrice(silver: 3); + item.rare = 1; + } + } +} diff --git a/Items/Materials/SulfuricScale.png b/Items/Materials/SulfuricScale.png new file mode 100644 index 0000000000000000000000000000000000000000..16a53ba6e55d7a9372171783fc85996785a5e866 GIT binary patch literal 287 zcmV+)0pR|LP)zdBKoEIL8HJ^>9D{tg5jzvX$e7B4O)kR{~+5dJfe8v&ArXPk4KJ%SYq z8gY?l91zYP90OiYckyBY2N=CRkbh@1o`{N+BqIUN9L}ra@CpOffPir>v;(); + item.placeStyle = 115; + } + } +} diff --git a/Items/Placeables/Banners/AcidEelBanner.png b/Items/Placeables/Banners/AcidEelBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..148f9306ff63e89f9edc792e0ae8ac6fbff54440 GIT binary patch literal 454 zcmV;%0XhDOP)f00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0b5B#K~y+TW3)5~ zW&iKLFza?1vD~Utob-Cq9E|7*Mm|1=DM`vw>-n zZNRBPb)`5MqXY8&peOhiEC6#e48Z(!>Af(RCf^TSlI&pov;rB;7ib+7;oh(x^t({GlEf$5EhZ-Qy^ZP1dH1`9aa z3xR1E*njXHn7;P-DVQcdl%&~N!59_~FaQ&W0n+_osi_5Ky!`SFYiPkjN1TU?{89tV wkP?BU(r0fzgKdHVpg7oMpg5RMq74iT0FQ!p`7I-7U;qFB07*qoM6N<$f?;C6Gynhq literal 0 HcmV?d00001 diff --git a/Items/Placeables/Banners/NuclearToadBanner.cs b/Items/Placeables/Banners/NuclearToadBanner.cs new file mode 100644 index 0000000000..ef770b8866 --- /dev/null +++ b/Items/Placeables/Banners/NuclearToadBanner.cs @@ -0,0 +1,25 @@ +using CalamityMod.Tiles; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.Banners +{ + public class NuclearToadBanner : ModItem + { + public override void SetDefaults() + { + item.width = 10; + item.height = 24; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.consumable = true; + item.rare = 1; + item.value = Item.buyPrice(0, 0, 10, 0); + item.createTile = ModContent.TileType(); + item.placeStyle = 116; + } + } +} diff --git a/Items/Placeables/Banners/NuclearToadBanner.png b/Items/Placeables/Banners/NuclearToadBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..b4ef373b7b1c3a52c58eb94d936a39b37f393e08 GIT binary patch literal 395 zcmV;60d)R}P)f00001b5ch_0Itp) z=>Px$MM*?KR5*>Ll)Xv=K@^3*jj}5maCMC$5yapRq=-==D5q)FL2j+$i{iintatQ|ua)Ol~u04(HyF3&R)-=@n%8{9Oh>WuY&15j^>-udK9AW%7v0-$oO6Y7nK50G2_l$IF?pfW*sH~+4XqPy+(#+< z0Ejzd;(C||;B{#S0F~3(); + item.placeStyle = 112; + } + } +} diff --git a/Items/Placeables/Banners/OrthoceraBanner.png b/Items/Placeables/Banners/OrthoceraBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..a24336c2992c2f1cb1a6ff69412eb7b034fa8c44 GIT binary patch literal 404 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eN!3HEl7su5ADaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5hd`K7RKu$Qs6o@y#WBRfKiQ|efl2c$R{a_Kw#fPzK2dMvO|htaWIV&Ju$TRf(4^dio|4au#&Ua-*k>~s zOUk-Td&72F<@Ny<6Uh{-DW?x?NI6<;aE#SsyJN?9Yi5qa4Tsqz4eEaVQI}ZEd?`2K z&+m`+9MKuIi42Ly{^ck1a8HoCeCf@agf>f)WfvKBmL)cn*xUU5Ih(O(;lf3$@;Hwf zC@7z2J7(apOa8_VmIIyXXUohAqN+X>h<6-%sebA2hd;dRAX_}HXd5hx^Ks5(EBjd8 zqhMqH*%l~#U~>EZ0}^Z=+ZgBVosuHDK!>d$BlY-;CQH@5?FY8>XvkMCWxFUfZ_huL uV^=;i^LTU=H(iz4|Aps_`b9Q2HilfmZ1Z+5pHg5*GI+ZBxvX(); + item.placeStyle = 113; + } + } +} diff --git a/Items/Placeables/Banners/SkyfinBanner.png b/Items/Placeables/Banners/SkyfinBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..45aedc2fc0903556fed0efc4de1ce03a6a82b6d2 GIT binary patch literal 445 zcmV;u0Yd(XP)f00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940a8gsK~y+TW7Ji% zWB`G$-=F^nGoV0K&WI62-+pusMVtvr6Ac&*HJ!i=4t7DXNjCaMVE&Pd=fE_Kzjohj zFio-zOhA)CrbD?105TbbUp>DM#xOv-A1n=m!3=Rhb};?&{ZFiZ5#i+ohZ^}d00G!! z3#~6;&bv3VVA@az5{fJLtp(GhhZ2;A1Cgj#U@Ru72*&7uEE_;>ho_e}%f!GK7a-pc zYGQ(54D$mFJbil~j9#-q}u?c8DKU^iSUBy nXKy~kQ!ohd^RSbXrx_RkFlJ^=S#O^#00000NkvXXu0mjfVGFII literal 0 HcmV?d00001 diff --git a/Items/Placeables/Banners/TrilobiteBanner.cs b/Items/Placeables/Banners/TrilobiteBanner.cs new file mode 100644 index 0000000000..d730d9c795 --- /dev/null +++ b/Items/Placeables/Banners/TrilobiteBanner.cs @@ -0,0 +1,25 @@ +using CalamityMod.Tiles; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.Banners +{ + public class TrilobiteBanner : ModItem + { + public override void SetDefaults() + { + item.width = 10; + item.height = 24; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.consumable = true; + item.rare = 1; + item.value = Item.buyPrice(0, 0, 10, 0); + item.createTile = ModContent.TileType(); + item.placeStyle = 111; + } + } +} diff --git a/Items/Placeables/Banners/TrilobiteBanner.png b/Items/Placeables/Banners/TrilobiteBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..148f9306ff63e89f9edc792e0ae8ac6fbff54440 GIT binary patch literal 454 zcmV;%0XhDOP)f00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0b5B#K~y+TW3)5~ zW&iKLFza?1vD~Utob-Cq9E|7*Mm|1=DM`vw>-n zZNRBPb)`5MqXY8&peOhiEC6#e48Z(!>Af(RCf^TSlI&pov;rB;7ib+7;oh(x^t({GlEf$5EhZ-Qy^ZP1dH1`9aa z3xR1E*njXHn7;P-DVQcdl%&~N!59_~FaQ&W0n+_osi_5Ky!`SFYiPkjN1TU?{89tV wkP?BU(r0fzgKdHVpg7oMpg5RMq74iT0FQ!p`7I-7U;qFB07*qoM6N<$f?;C6Gynhq literal 0 HcmV?d00001 diff --git a/Items/Placeables/Banners/WaterLeechBanner.cs b/Items/Placeables/Banners/WaterLeechBanner.cs new file mode 100644 index 0000000000..bea85e2872 --- /dev/null +++ b/Items/Placeables/Banners/WaterLeechBanner.cs @@ -0,0 +1,25 @@ +using CalamityMod.Tiles; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.Banners +{ + public class WaterLeechBanner : ModItem + { + public override void SetDefaults() + { + item.width = 10; + item.height = 24; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.consumable = true; + item.rare = 1; + item.value = Item.buyPrice(0, 0, 10, 0); + item.createTile = ModContent.TileType(); + item.placeStyle = 114; + } + } +} diff --git a/Items/Placeables/Banners/WaterLeechBanner.png b/Items/Placeables/Banners/WaterLeechBanner.png new file mode 100644 index 0000000000000000000000000000000000000000..27edc651585e29b3a8108f8b783279303f60ede2 GIT binary patch literal 396 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eN!3HEl7su5ADaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F52SAuH>slu#P=lhUi(`m|fASU+j90Iu24_^_QFO(s|9!3ZkzWvZ%n;vZs5lLl9MTchZ*P?iI?*@(>DD5&+GTT>X`n)Kc=^D9x&mV zvtt{(&*U6t?h7df&7Gfxcidr|#j{QG$Y=46q>4`hPWx-LIhJ{TXP%PQFtx!*=>LH) nlf`{BR29vCXBTX00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00TEkL_t(o!_}8dNK{c6$A8xpdk~7{ zBOM=^j!upd=0Xd~im=*5f-PD^)TWJ~mS~%zRYW$5(6V;933@C{EP8AziHII!Q{yz1 zj^(=<22n7*EskGyuQO`2Xy(7U=XKAy=g0TD8evqGw?UeEsClc^ssZ>teE@7JC2!}@B|eqWzB0eI2Tp#yxHBbSq&r2$mUt&4bqTDS?Z!Ay$lT6BQhcdr2ua2dUOO-5Ff5fpNg zAyU06G@fc}P&ZG?(E#ECqkpyW(9qDL^O9lScHLWaUE~uq4fhV8F%j_013Iq%rGz(G(-d6@Gvm%#gdy{&PM#=MexlY|8-Vy;mgv9Px$aY;l$R7i=nl)p;DP!xy1h{Z|*jZllysaVpfT?#&e4KKAku1CjAT0V8z;s*yR=vvKqv^O10eHQ80Q^B) zi(XRs5v@e)&`Vvko&l)rt8rNLwfz!3^F+4e0uYRX2%veVNWw=& z;C56i(X$;_i=H_m`PagMic%%vO;TB2nR{#9<4XYMGx6plb)$GC@&|3;*DG@#t?P|s zxR52iGDj4QmRjDdE4QOph5TN>cp#o!>{bBipY6pvS{jik{|YH&{b5U+Pm&lXvaYVX zs^?duzrL7MFgyX^tNda(v+=9i&5{>h?gKCV6jQl<23*NnLU3698tfJ5kyJ hr#`Xbbs&eD{S6!te2KBvC=UPt002ovPDHLkV1jfC$dv#9 literal 0 HcmV?d00001 diff --git a/Items/TreasureBags/PlaguebringerGoliathBag.cs b/Items/TreasureBags/PlaguebringerGoliathBag.cs index 52e2ab742b..5c08c4cdb0 100644 --- a/Items/TreasureBags/PlaguebringerGoliathBag.cs +++ b/Items/TreasureBags/PlaguebringerGoliathBag.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.PlaguebringerGoliath; using CalamityMod.World; using Terraria; @@ -54,6 +55,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Blight Spewer DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); float malachiteChance = DropHelper.LegendaryDropRateFloat; DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge, malachiteChance); diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs new file mode 100644 index 0000000000..bc5757dfed --- /dev/null +++ b/Items/Weapons/Magic/AcidGun.cs @@ -0,0 +1,54 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Magic +{ + public class AcidGun : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acid Gun"); + Tooltip.SetDefault("Releases a stream of acid"); + } + + public override void SetDefaults() + { + item.damage = 29; + item.magic = true; + item.mana = 9; + item.width = 48; + item.height = 30; + item.useTime = item.useAnimation = 15; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 1.5f; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 1; + item.UseSound = SoundID.Item13; + item.autoReuse = true; + item.shootSpeed = 14f; + item.shoot = ModContent.ProjectileType(); + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + for (int i = 0; i < 3; i++) + { + float angle = MathHelper.Lerp(-0.145f, 0.145f, i / 3f); + Projectile.NewProjectile(position, new Vector2(speedX, speedY).RotatedBy(angle), type, damage, knockBack, player.whoAmI); + } + return false; + } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 35); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + } + } +} diff --git a/Items/Weapons/Magic/AcidGun.png b/Items/Weapons/Magic/AcidGun.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5d06e5f2f05306d661a55c2ddc729b111af350 GIT binary patch literal 562 zcmV-20?qx2P)N2bZe?^J zG%heMF*7s+TY3Nh0k26!K~z{r-Ic9Q17Q$Fi^1{)B!mQm0tslqfI^U9YOn|df(NLB zx9L;y1h|rKGiP`9W@Z<*Ey>qOj_CZ}n{KzWzsBDF!79SaX+$#~YukQA#|u_YBbxD8 z+xihL_uO4x^*BB}YPdLi2%)ZXKz)Am++Z@MM$&<5b(7-}?QY>vF@ z&_41ee}@ccV@C9Nc%oP65IV1S(5IOE9WX#p(65-!W6%#?R3Vxff;lhRW3s!TzygH$ zr9*h}1uwo3%?!bu7ws|GT~J^FLil`gdfmWZJ&@0Y(-*yZJ@k2z1@;1YlidY{Y7G!N zs0K3VR|DkP`&&#-t4H%`(8%Fx4Ilsme#sEb@tRZvcBYLiKRH-fy#WrZ0c%S`=YhOp zW19;WbGUi~Qx7qxSb2NFq3R9%+rdpo9R_BzAIPXmzm>>m2mk;807*qoM6N<$g29#U ANB{r; literal 0 HcmV?d00001 diff --git a/Items/Weapons/Magic/Eternity.cs b/Items/Weapons/Magic/Eternity.cs new file mode 100644 index 0000000000..0dc96923a5 --- /dev/null +++ b/Items/Weapons/Magic/Eternity.cs @@ -0,0 +1,77 @@ +using System.Collections.Generic; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Magic +{ + public class Eternity : ModItem + { + public const int BaseDamage = 4770; + public const int ExplosionDamage = 50000; + public const int MaxHomers = 40; + public const int dustID = 16; + public static readonly Color blueColor = new Color(34, 34, 160); + public static readonly Color pinkColor = new Color(169, 30, 184); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eternity"); + Tooltip.SetDefault("Hexes a possible nearby enemy, trapping them in a brilliant display of destruction\n" + + "This line is modified in ModifyTooltips"); + } + + public override void SetDefaults() + { + item.damage = BaseDamage; + item.magic = true; + item.mana = 30; + item.width = 38; + item.height = 40; + item.useTime = item.useAnimation = 120; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 0f; + item.value = Item.buyPrice(5, 0, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Developer; + item.autoReuse = true; + item.noUseGraphic = true; + item.shoot = ModContent.ProjectileType(); + item.channel = true; + item.shootSpeed = 0f; + } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + public override void ModifyTooltips(List tooltips) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + { + line2.text = $"[" + DisoHex + "There's pictures of ponies in the book]"; + } + } + } + public static string DisoHex => "c/" + + ((int)(156 + Main.DiscoR * 99f / 255f)).ToString("X2") + + 108.ToString("X2") + 251.ToString("X2") + ":"; + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ItemID.UnicornHorn, 5); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Weapons/Magic/Eternity.png b/Items/Weapons/Magic/Eternity.png new file mode 100644 index 0000000000000000000000000000000000000000..9059a2fb2a9588d078b24c4d450351ad06667c86 GIT binary patch literal 774 zcmV+h1Nr=kP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0-H%hK~z{r<(ExJ zR8bg)@2EM^CDf5ZYYfS-pr%4MDYfW_mhM_5VbGtnF=#7EZCV7i5UN!X?W7h)8_8M} zRzyODP!!S6Ohut4F_Mu?-1nR}=6?Bgn;?m)yyD**E{mA$mleP7A^bwNK zP!u#sXtJ+<53+GI{0+p<7)>?zp2Bsm|2mRLQ_=`Y`m62E!28bE^&weXe#LSmyVqG` z>KhBXZm!N-*s=jDsJY^mN*}_K1co%5zau_1)|T3hKU`@#j_W%gUm*K?T9M-;StPqN zuov*4*+-JkL*_HDecXv8?8bplLrB)(#MDis^Utvgn?K1cT4i^JgC9)yWV~z0+V(Uu zXN`>wY($a+>0?MfpT^c-MoM$+zN8oKTH=0Jb8oT)Z0y0H=snQ;o5dH+p#ow;eUoIhONKUAlIeDM#ZW??0su!u%7ID_tFK;X`Qfx(D2WIA4BrsKMYjFBC zR;jpOV?@qR5>5)VBx{M#5+`4ts-n7)xNB@dSp$s82~xr?(oRQ2PPR1m{Avd>svAjs zjA=xjq#GJfAUU5AP9yh@wjk$^F-dFH7P||hJ^7=I^7S50-9~Drh`YwLb7f`uijqtc z%_yIH^VgV$W|DN(@3p%yPo~Xj>;E$rMU+tzQ)8a@1BanU-AR1l0ssI207*qoM6N<$ Ef*4h4QUCw| literal 0 HcmV?d00001 diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs new file mode 100644 index 0000000000..18e2518b3d --- /dev/null +++ b/Items/Weapons/Magic/Miasma.cs @@ -0,0 +1,49 @@ +using CalamityMod.Projectiles.Magic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; + +namespace CalamityMod.Items.Weapons.Magic +{ + public class Miasma : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Miasma"); + Tooltip.SetDefault("Releases gas clouds that stay still and explode after a while"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 440; + item.magic = true; + item.mana = 16; + item.width = 50; + item.height = 64; + item.useTime = item.useAnimation = 27; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 3f; + item.value = Item.buyPrice(1, 20, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.Item8; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 12f; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + for (int i = 0; i < Main.rand.Next(5, 8 + 1); i++) + { + Vector2 velocity = new Vector2(speedX, speedY) * Main.rand.NextFloat(0.9f, 1.1f); + float angle = Main.rand.NextFloat(-1f, 1f) * MathHelper.ToRadians(23f); + Projectile.NewProjectile(position, velocity.RotatedBy(angle), type, damage, knockBack, player.whoAmI); + } + return false; + } + } +} diff --git a/Items/Weapons/Magic/Miasma.png b/Items/Weapons/Magic/Miasma.png new file mode 100644 index 0000000000000000000000000000000000000000..10266bf4f58749197d21d702c465fcb100fdad00 GIT binary patch literal 1284 zcmV+f1^fDmP)Px(zDYzuRA_ZAPqD@H#fkGJ+dmt58-T7@695;-(oXUDx~F_!n?%6f~{=9M5j2Cr{3ScpxcM3-U z0xijs<4N2|_VpX>;+6GbpX|1`j;cmPNc42J04@oM6Q7^`O?P~-;($v)R->~hSyQm;~}@gD%_Xx*j& z<`-uHpGbKnwg&+?|KmIW1HEzM{DHw1<0y58tsX~6?C9=N0N18x0B}}y zyzzAN}w^$*%zT;K;`DL*yAEPh7Jf zctO`2w-=X;`a^X3oc>J<36Wi2NCcP4uRqbF04Ao=_Ku_i-y{E*cq0;N03h0?Be=aU zb!e}id8s?>y<3SBl1uG~X^&jb%u1Jvel?yU^4K0J+P5m{4XL%|H~+@|-GEC(+KcK7 z!wZpcNC9NCnTqbmGejQQBPyu(tHMp%8@c=%;Ce$My3BYou5+YsE?vgHyqE72ahYy5UJQB;*EIW z4TSbwp(3k%Q5Oz28)a!NnPIPuXzp!Ot0-XS70F17I5 zeO*^H)CY{uxs^3zm6A6Pn!|Mp;P=1gfXyc%@(hvsqFo6G-0V}H(G6^mDuDd*ed9v= zId`o{h&)3?#iBg`ghRoS&ov}xvb_-qC uNR_otM09XpLIGU(WvZebzO5q95cv;&#<%bkT!7#J0000(); + item.shootSpeed = 10f; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Vector2 velocity = new Vector2(speedX, speedY); + float spitAngleMax = MathHelper.ToRadians(20f + Main.rand.NextFloat(-2f, 2f)); + float fangAngleMax = MathHelper.ToRadians(10f + Main.rand.NextFloat(-1f, 1f)); + for (int i = 0; i < 9; i++) + { + float angle = MathHelper.Lerp(i / 9f, -spitAngleMax, spitAngleMax); + Projectile.NewProjectile(position, velocity.RotatedBy(angle) * 1.65f, type, (int)(damage * 0.7f), knockBack, player.whoAmI); + } + for (int i = 0; i < 5; i++) + { + float angle = MathHelper.Lerp(i / 5f, -fangAngleMax, fangAngleMax); + Projectile.NewProjectile(position, velocity.RotatedBy(angle), + ModContent.ProjectileType(), damage, knockBack, player.whoAmI); + } + return false; + } + } +} diff --git a/Items/Weapons/Magic/VitriolicViper.png b/Items/Weapons/Magic/VitriolicViper.png new file mode 100644 index 0000000000000000000000000000000000000000..1f15cf2da3c23798217f344e1efb8c31990032c9 GIT binary patch literal 1190 zcmV;X1X=ruP)Px(U`a$lRA_3j|VGu!D6s zh-DZ31N;LdegGSmm0(qgO*d3xfdq=w2C71^qk!$yNn^)J!>~AWGM#Hr{Ag^an)x=? zJnTEsH|N}Q?}^1r%HrGt09GUez)Zpdpj@rk$9?b2fS>EsVJ%<24#3*#-4Q=Zcc|HX zHVHtfyki55C6@vC_|5hX@7#L;1kv!QAD|OzRLSQi0Vr+m+5k7Mt^ja;KH|CW;ZHjN z-2MGA0Q0Y=EeH({VZccG*z1$g2>>#w902Lb6ac%84Nvy{;`2A!e*f=3_W?I%^$iGY z43Cd+?6&jeZu0&4*}P#N#G2RGKOt{ zkFLD#xn6K$*yQ3n$+qV;X3Z>Z#&SNJ472oL2Jp$sa~V0mUai>xOG|HiuKQI?ifL5w zGg~Ulyc`-n@d1pOHM#ljTL8qJY^&5anx135?iZ`y|MDLIhdXOPtJz2EQgMZbPkaEw zuo^Y_anqZfKgh{^Y?@c}4bWP7DkZgYZEs8l+phwyStT@l;sZE_7iXpbcvN}fiDff8 z|GWJU0PkH$c+M{`c#jp$#yEeAY1AY%Jg|Wr)9LtG0BZF;8z4O^>s>Xfl~&QIsjs~+ zdsdo_70t@i6IBbKT&)11;TDFzT2ixS4XwD@T0XBC*L5B~y!R^rm2r79I+;~M!^7f- zpML|~EUoiy!THqr6=Y|_uXeVdJ?&}S(C|s4yN>l|VkkN>VF5%Ec^h1_ipKC)x2^zC zG-~Q^?(6|j$Y(8pVyWEI^Mr<9lukXLvBW$8D^qmvl=Qj z<^FE7vl1Ham)4$7)dtu)ke<(tt69(e=jSt?W9<}}t0Oi0^|vzbzIH)YMSuKN?dv%M zXZVF{X}@ls-@b4s%$*CxHCqFEk6k4++$+y@_l`BY_E;*S2T$Tat3f53nXv#W+mgP` zN~&M8O5hClou$?6bWGN_Ta7)>b&W-xZ|izYe^jmDWsJDymA&TPu&6z!|p8ib*RazmB}} z-P#raucT%@=bu~WcGa&PHi0wTG7q~w9YJHcz9GkI-tEv!ZLF1*H7*;`z4m;DMc@n{ z#c(), 12); + recipe.AddIngredient(ModContent.ItemType(), 30); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + } + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } +} diff --git a/Items/Weapons/Melee/Basher.png b/Items/Weapons/Melee/Basher.png new file mode 100644 index 0000000000000000000000000000000000000000..83c3c73eb985b6238845c023d0bfc4ad90e49a04 GIT binary patch literal 478 zcmV<40U`d0P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00B-(L_t(oNA1=zN(3@^^#pdn7nToca~k1%HICL*RXkc`BaBN zFYC9|e|WJ}ha$sWahdx5dY3wOZZZyz4Y0l#Y;YXp`sDN~ z6&T^M<}ur`p*ak&4tRdN+34}%QL6ptXZIU*J~P{~p&9Ie*TskE^Wz~kg6e#19zPx% ztHa^|7^omO6yZE(ewxEREI^MKsMdE6b}$a~8V#}G-?e|(M)hdpK>a(gFAR+X3b%b5(?!pm_kZX0L{zbEIU}s_HHIJQ+1Kq&DF?co<(><)e2Bmwr7%0_Y zgS-~L2qIhzlx|=@XWc+?P`ZN`1Em{yaZswm0Iy52Fa4=BhpU0o9IggR8+f()2KJs( Ut<58L*Z=?k07*qoM6N<$g15HE2LJ#7 literal 0 HcmV?d00001 diff --git a/Items/Weapons/Ranged/FetidEmesis.cs b/Items/Weapons/Ranged/FetidEmesis.cs new file mode 100644 index 0000000000..dbe0546270 --- /dev/null +++ b/Items/Weapons/Ranged/FetidEmesis.cs @@ -0,0 +1,61 @@ +using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Ranged +{ + public class FetidEmesis : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fetid Emesis"); + Tooltip.SetDefault("Has a chance to release rotten chunks instead of bullets."); + } + + public override void SetDefaults() + { + item.damage = 125; + item.ranged = true; + item.width = 76; + item.height = 46; + item.useTime = item.useAnimation = 5; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 3f; + item.value = Item.buyPrice(1, 20, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.Item11; + item.autoReuse = true; + item.shoot = 10; + item.shootSpeed = 16f; + item.useAmmo = AmmoID.Bullet; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-5, 0); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (Main.rand.NextBool(8)) + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY) * 0.45f, + ModContent.ProjectileType(), damage, knockBack, player.whoAmI); + for (int i = 0; i < 5; i++) + { + Dust dust = Dust.NewDustDirect(position, 10, 10, 27); + dust.velocity = Vector2.Normalize(new Vector2(speedX, speedY)).RotatedByRandom(MathHelper.ToRadians(15f)); + dust.noGravity = true; + } + // WoF vomit sound. + Main.PlaySound(SoundID.NPCKilled, position, 13); + return false; + } + return true; + } + } +} diff --git a/Items/Weapons/Ranged/FetidEmesis.png b/Items/Weapons/Ranged/FetidEmesis.png new file mode 100644 index 0000000000000000000000000000000000000000..5e142252ff40bb64a5088445b80a1b8ab8c69518 GIT binary patch literal 1499 zcmV<11tj{3P){2LK0mHVoHbfF@u+>!L)F&IfQc1n^k_K(r2o(?nS+)yZE-S7NXMYUm?99TnyKPP8d+N@dJu_Rr`CZN& zMTtmyF}NwQHrig=~V&Kc%8 z#+l!{(~S!Z^NA|iMEMxj8jS!jy^ziUy!z~bF)lN`3c&H9bH?#_M@#{XP9}jn*R;Se zpOnn7jS2In^|r+TSYOZO0FL%{1F&bH&KN&=bq#=bJ{|_(K)h1{{5k(G0I^s*0HY&c zmikt2h`=zPs7>|Lw%BfLiAHw=kh;E-12}fL-#8y`tpcEm`_w)tOtOlrKD?xE>u_7DS+kWMdP>_=VfYpgN|9DstO~P zO|51DhA02af>o*^gfX(A(6d08-Z$jQLwyS^&88$CVtw!M%M7U~Ft0 zfFI7EEcUZ}6By=`3NcG!#@>dEG2n743_v1r)-cein+oPM#x1TX1&~hV&Bz-jjE+lh zS?hX(FF*Mr04D}dx;_CjGcy3Z^~xIny!pYqIe=aD4GQ3)`=0?yXIfyGPm~JPyZ+?{ z_CEnYUvwUDvYH@uQ%6%o0Zh(qG=;g%-ya@1ZG2C9OhI~0L9TP^yspCzb#wvHf8cQd zy7zV%>puoK=B=#0r{~SjFC7Fo z**^z{`NY$(Sfm+%WO_CS(6d|rCHHsg)dR2WCJc}080D2^1u@LaJV6YUy3jW6;k)(q z9(z=;lGv*tr6MrQC&gAPjC!guJmWe@VvU$2NOrTcqiv=jhIyG~XI1GCWIkDEyE3eM zU0KnUY~9@2<9gk#kX|;CI12=Z`KF-K-%$}#0QKPpz=>h?&D{VrtceKB4$Z%=v8@dMNH`)ZmW9Ej$Kk$d36R7%WTtx#=5Wqh=kqi!R-*67c9vr>~6ie6x&H?6C2J#WXPQ|HY(E|GAr z*k`B5fX&%j*Go>XsgL*FbFTup`1@}~?{m8ZhWVuAdn*bqVC_t__l?M-@mbdLgY#wk)~TzJ0-K|Nf>`k{md_tX+r6 zXFF@|sM32Yex1t+N#Hsm}IZR$(!&KgW8~dojnR*eO33a!Tzw@ zOxY{_8%6eY6~Ty&oz3kEU}9FUy_ec7Au!A*{{fJh5YvJrVc-A&002ovPDHLkV1nz- B+R6X` literal 0 HcmV?d00001 diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs new file mode 100644 index 0000000000..833a2ebe90 --- /dev/null +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -0,0 +1,52 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Ranged +{ + public class Toxibow : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Toxibow"); + Tooltip.SetDefault("Fires slow arrows that inflict sulfuric poisoning"); + } + + public override void SetDefaults() + { + item.damage = 17; + item.ranged = true; + item.width = 20; + item.height = 54; + item.useTime = item.useAnimation = 29; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 3f; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 1; + item.UseSound = SoundID.Item5; + item.autoReuse = true; + item.shoot = 10; + item.shootSpeed = 15f; + item.useAmmo = AmmoID.Arrow; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), + damage, 0f, player.whoAmI, 0f, 0f); + return false; + } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + } + } +} diff --git a/Items/Weapons/Ranged/Toxibow.png b/Items/Weapons/Ranged/Toxibow.png new file mode 100644 index 0000000000000000000000000000000000000000..5dd229fab94844dfb8028826fb431e980947a6a5 GIT binary patch literal 474 zcmV<00VV#4P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^DS16z6k00Bx#L_t(oN9~p|P6IIzMNN~I6Cg#AXsBpO zYC;25sA$q~0V1Wy0a8Xn>2d)?$r-qqBU|&b%UB~*taq&_U;2e-=0D53+3dQj(Y0^e zDdqZ!a)Dew5rZFZPtomg@b~^Tnzh92jVKfcPHx800H3F`X!_Ph<$wfso0n*SY((D# zq0WJb0f2e~UB@Q4bKrWp^}!5qG=c!R1oUwNE(Vn4=@JkC%+12gVTl(2ey+ZJuq;nv zP=gbIR&PM0!MAsh(I&WeAOi4kzliP+_;dL6!Ll?3U^#z}t{=$Fk#?iOfB<+@FTh6U z1FZjdsDZ4d-KcY5{r`tKAi?_HDH=4~dznW`mL}-mpCZM8G&E@V??Va%HAvTS0z#bu zDKJ2gi_Q`0n@2>&fCO0s1OSk}38qjSh^=6Ird=-wOd6tGKT$4_>;IK=M_hMptrC85 QeE(); + item.shootSpeed = 12f; + item.Calamity().rogue = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + + Main.projectile[stealth].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); + if (Main.projectile[stealth].Calamity().stealthStrike) + { + Main.projectile[stealth].velocity *= 1.5f; + Main.projectile[stealth].timeLeft = 420; + Main.projectile[stealth].penetrate = -1; + Main.projectile[stealth].usesLocalNPCImmunity = true; + Main.projectile[stealth].localNPCHitCooldown = 6; + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemID.SunplateBlock, 3); + recipe.AddIngredient(ItemID.Cloud, 4); + recipe.AddTile(TileID.SkyMill); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Rogue/ToxicantTwister.png b/Items/Weapons/Rogue/ToxicantTwister.png new file mode 100644 index 0000000000000000000000000000000000000000..f54ead37b4a1fd475f4c0f00b16ad6ef2c9995dd GIT binary patch literal 1157 zcmV;01bX|4P)Px(KS@MER9J=GnN4q7MHGgg$%h>$PMkPtlGY?mDIro}QFfIIMMYv)sX{_x#exmu zPxL>qL1M?I3y|1UDyvE$S{6k@C{m$PlmJPKo9_?DiG!WQm&M#S&P;sczy=NPCcZQF zIQO|{-gC~_5X+=;dKqy{mxlTcz)E=+fXQn!LI`pC^-3h>MbsvC_ufGAngSq+W_&D+3foukV+iy()aDTcU0YnG0O}|LQ zO)3vSRNDZ~PB<8%MzNWSW3MpS7XiHc%7pXAZY>8hO>NNl_*2+L@vOy7znoZ<}Ezu7q2LR|kp9Y|^Xm_;;OSi7N_dGjqN#A@s z?~IG^y+<xe91AYh^${=n+?3IHG7 z7OZ~Zx}ck zL*ISB(R3k^R4$h;j#__QSSmFom!x2ccJ!n>4Zyj)t)fib-ubPo?yf)Pb3nsy-x;wP zYbG9-PfFV58dr{&{(tr8%VS4%r*r3$2wWKHvGwEXft{#Vox0U`3EzkP^=J{JzJeio zA~X3hbX18imzyr|>a|_~im@9!`Sk_>?_d8JfXRuhv+iInW4qPTp4JE8#ag*(T}(_q zNTN++Mm>!*n6sHhL{zbh-00Xtpy9&>uO3}5*PV4lGHGu}!4N(3&P#F!-MLRhJ(D^D zxq_d$l1N5v?FL|V!`2kx5za3P6LXdM-&ZEq(ED$+<4AgqrJ5nR5vB z_gQjVyEXe14(+aASh6vc>B<^_TIcx)ppdo%zna|yPF7=bi%-9P3^b}X)wPVj4!}1* z{Q?9;^t2dtcDH|aG?3{s0M)u3uT*OhG-6Zrsk&J8Tp}sS9V8LFG-6L^+Du!xndwxC zOl8p$*SV=Al9JyUv?BS#GkdLAg_1KL4AI0G^{W~`gGheA-%9Ga6vI>f6`eEZK5=EVKbGB?eQIn5k`HTM zzk5|H)+K@=`j2|+<4USqO^1!Sfi6pAV`tOJV4FL824Fvqz5X5>`^AmsXH!uvunPZg X)q%k0&^uSZ00000NkvXXu0mjfyYenP literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs new file mode 100644 index 0000000000..5978e1d7cb --- /dev/null +++ b/Items/Weapons/Summon/CadaverousCarrion.cs @@ -0,0 +1,51 @@ +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class CadaverousCarrion : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cadaverous Carrion"); + Tooltip.SetDefault("Summons a gross Old Duke fishron head on the ground"); + } + + public override void SetDefaults() + { + item.damage = 360; + item.mana = 32; + item.summon = true; + item.sentry = true; + item.width = 54; + item.height = 56; + item.useTime = 30; + item.useAnimation = 30; + item.useStyle = 1; + item.noMelee = true; + item.knockBack = 4f; + item.value = Item.buyPrice(1, 20, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.NPCDeath13; + item.shoot = ModContent.ProjectileType(); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + position = Main.MouseWorld; + Point mouseTileCoords = position.ToTileCoordinates(); + if (WorldGen.SolidTile(mouseTileCoords.X, mouseTileCoords.Y)) + return false; + Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + player.UpdateMaxTurrets(); + } + return false; + } + } +} diff --git a/Items/Weapons/Summon/CadaverousCarrion.png b/Items/Weapons/Summon/CadaverousCarrion.png new file mode 100644 index 0000000000000000000000000000000000000000..3cc33f076ec53b86dbc6b2777346e817f7cb6dd1 GIT binary patch literal 1325 zcmV+|1=9M7P)Px(=Sf6CRA_l|Svx!(AmGHmB0Fo`IO9No+>aun%`g$-E zfT`hjz<<@o`an3=T!=2k)gG&ke{TW4N~h|L^(?L)0Td1(xQRlWkC zc%5`@_Ka$fy?y-iEU`U%#ZBJN254@m0=5#mbZ#ElYGaL!?*T9pR)jt{^)UeXfr9|N z*?d5|e|$-0Frji~YaKmdz{y1BZr=esOf2r1hs-Q`L3H0qFg;2Y~jU zPigJNONuRu!vAIfp!e>O@_eosPa9JmuE((?U#@Ge*HZs70L8f#09^c|4Tv7!A|tl| zIMS&4Z9REjtM_N5Spf5kI$6&W+p~?CE7)LA&FtFp4VAN{W!d1668&_p6>vz1Oq(k9 zrEdHD`Nd`J%_z$AdplQ*dve*OnJf8+W;)AmS~ki-pzNry#$O$PS zBpE}8TApoW7%lbg;(6#{XX$__R7te zo^$-2-+`^6+uolbwsERb@CX1CQwv(X*ivWzX~6N8Vp~>Q0K2y`tNYN00000NkvXXu0mjfdp3)% literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/CausticCroakerStaff.cs b/Items/Weapons/Summon/CausticCroakerStaff.cs new file mode 100644 index 0000000000..0b4c63cbe6 --- /dev/null +++ b/Items/Weapons/Summon/CausticCroakerStaff.cs @@ -0,0 +1,59 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class CausticCroakerStaff : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Caustic Croaker Staff"); + Tooltip.SetDefault("Summons a toad that explodes if enemies are nearby"); + } + + public override void SetDefaults() + { + item.damage = 38; + item.mana = 10; + item.width = 10; + item.height = 32; + item.useTime = item.useAnimation = 33; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.knockBack = 0f; + item.value = Item.buyPrice(0, 2, 0, 0); + item.rare = 1; + item.UseSound = SoundID.Item44; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + position = Main.MouseWorld; + Point mouseTileCoords = position.ToTileCoordinates(); + if (WorldGen.SolidTile(mouseTileCoords.X, mouseTileCoords.Y + 1)) + return false; + Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + player.UpdateMaxTurrets(); + } + return false; + } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + } + } +} diff --git a/Items/Weapons/Summon/CausticCroakerStaff.png b/Items/Weapons/Summon/CausticCroakerStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..77d97c90da6b0decce0b95df610fc0a716c6ade6 GIT binary patch literal 695 zcmV;o0!aOdP)Px%aY;l$R9J=8m(5QTK^TXhF)f4yi_i~HS}`=xs9-=nz@Z+9iSgt?5-%iNP4r-b z#>79slO)EISI_Dn;KhR`iWf0TOsGMv6hGQpXlY_fjpJeaTBej}VPkin%Wije-t0X2 zy}MI|&5Vzn2cW&x3qY|{)|?$PYBB5RY zmeVU5U@+7P!06Bf0C(=+&;aM+F#v8qm;)ewxYMYYNUv&efk9o?mzjKq9>gxWJ%o8QhLqbA3J208CArW^2v4ri*RQU~pdm zfXrG}1B@Lh0#$R8$yzR7e+EFC*P{S_lz##)Fu3asZt7kD%D>W;Gjr{dv5T{90NkA! z2euj&bI)HrtW(8-?AV}~>+)GE&J{cwV69-SdGhQA0I8%oPs|CDz0qO60+@gE-57Vg z!G^oIKXM3wqXX74oAVpp8t!W`?!P+w1Z(_s-FlHwuL4+3uK?BT363}T&lwbRLosXD zv9S1216-QgTe-tBC&sQ!jv4b)nfD4H9PBr)Z)Z+$yurU_P|QUSb^x&SDX#%;UONfE zi@9~6y01GP>sA0S7r$wMfpC`sc$dlnpf~ajJ)nCHin#*;D`TIt>y^w61J$evwWexm z)STcxgQ~^K+DNnqfPAr3_di55+@S!LQl^=mn%WNM8x&(gIOqc)l__YbzR$$mZo9Hk zTwzex8)&vU!SM$Fe2Z_*oH7RFJ=ZLAf_n_6lGYAbGIwk+pa5PcvcUg0Cpg~VmM(5~ d=4x@g!QaGp-VAarT-g8s002ovPDHLkV1ig(); + item.shootSpeed = 13f; + + item.value = Item.buyPrice(2, 50, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.DarkBlue; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.StaffoftheFrostHydra); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.png b/Items/Weapons/Summon/CorvidHarbringerStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8e535379dd334f51a85f648194d6f3588a7c77 GIT binary patch literal 968 zcmV;(12_DMP)Px&f=NU{RA_06b+`4SQmv&bC`AxF2qJP3_i2Vs@WPI%zTqdGfyVPG%MV zn7+b+mX0s&-U~ow`DeJD<9D@wOX)_nyTc>{u5$I($pKLFSGRoP1I2v`V9EOt0-QW? zcFXHdy?YLH4aL|dwrim16agso^#d?;aLo9BZDk3753|!ivYCN>LjXK`_CViHZ&5)8 z4Y_UTBLwh6AAsJl7l2}MSZ_;%#=(XDfu@~^8DS_oKZ!S!kBxS9)dMnUs2wpBLi|K+ zBZ601G}^W5iryc1#{Od?<3O^>FEdldc@B;O2nc`-8fr%j0r3-;tzE_kj^}~cj7|C5 zXQM4<#BiafPXW}{s>X3$LpF}1yI5ZHLWr}JAZ8?{JWpq*J0E%gxOUv^Z=yPAoF`^% z#Eis_kU2wbABP0Vc7hnXGW^TfKT$nuv?a?WjZ>RY&;f?pHV&1&Iiua{>MXSCSGB>C zj)i-3_L-)UjaW;l1pY+V(Cv$(0K8s^MrdEZ%VjNsxo8^ncCp$twglU#AXzZ)78F3; zuj%Vpv64jR8oGW;o0*NKEvNT8O=qOj(Sv-uSO?;YL9&;aks8kC#`LNJxcjj+GeYMY z61=(|cf`bzJvxR8IlceZdu_&!9WitBe7PoOQX6dJa#L7iyT7iXO(=lL zd7bTEEo@XBO{;C;$=5&u6h|8Xy!gHz0*pt6$5IeVZ0@Lv=^C=R|H+p>wVCLNy0pfOP4*3m8Cf&+L*E$D(`rV@uA!tXX0KYO)r^omLt@53 z*H{6;mbF=0%?Oz@(); + item.shootSpeed = 13f; + + item.value = Item.buyPrice(1, 20, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); + } + float angleMax = MathHelper.ToRadians(45f); + if (CalamityUtils.CountProjectiles(type) == 1) + angleMax = 0f; + float index = 1f; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + { + Main.projectile[i].ai[1] = (index / CalamityUtils.CountProjectiles(type)) * angleMax - angleMax / 2f; + Main.projectile[i].netUpdate = true; + index++; + } + } + return false; + } + } +} diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.png b/Items/Weapons/Summon/DazzlingStabberStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..959b2003dde309beaa237c0058537d24704f4902 GIT binary patch literal 1138 zcmV-&1daQNP)Px(EJ;K`RA_Ok;Od~wz%VQe@UzKBBvCj&P{Y{yn`U2Sn6x-P9r8O_!Y*Cxg7`f&2!_1t{5 zG_y6{-^;!CpTo&*fA@dR|C}4ee~eGJwK+qU<5~e!{VR8~1bCME1{Q%~%J20kfa#gP z0N2>^WpmqV0H&^MQvsj;lU!rvB3xU&p!Ui1T;6zVY^BPcS^xo`#{#Htsc}cevLL2{ z-W33(W@er9j}rx8o!FN5!|}K_IWmw2;Qs9a0Fvi3fNQKU;rgeFex4lr&bSs+k4En{ z;-jgn09?L43&5K%HaWX842PoC#!(o%kg>ouHZP3-=%$ut1<;qi3_#7?C;*w8HvxEh ztrviUr*vFQC63;D0(5`js2=^2aUFf)Io;2hvkGA7@PGw&j>*wACOC6ybzmg`6H|Wz zu>bWv0Cer^wg5J+4J&}NgK-Ps9^Z<*{U&Dj75YkTuCdvew`w{zS^%wcH*}3SG7Nw} z=vE#DvA{O<{MN?+c&2j#fJEmj07PCmWaM5$a1CJBc#>l!@%r-4d)}E*9e;4W0#HpK z1Fo^cNKSn_^fLh8^k@@ej)@-uJGW%Mg2-aOT9X|m8SFE{uCY>dcj-zYvUQgccUBm} z=|OFD_d^W;JQ8{rfZi`UbptW+{nr4@+|{N4&K>AA=B-=A))|)-YfP1HVj}ZcYv=|5 z=Pvdbqt))t%|`p<{l6I3GAaso&S|6q`Ec*U3gD%e9{?bEY`|z&>(@@|!gm;P_2f~& zHI~aiR>Bt8rp}Kh0NX_U`W*m_4SfZ`mi7$*w6!!C{S98w^Vz|k)5g6OT0xh>H71Cu zXjtb;JbBfq0pEM;5C9!-KMTOlkZ$+U2d@I~d!IIXU!U}7E^-cmNQ;%Tw{gU)E>*8Z2{niV`qTeib4#@Q7RG{4a-f%8e8zF*c=G~a4|7% z0etz%Yeu^_-Z=n($D`j@{WdvWbjP=*s!D;qdnLG|VgX9#m~+ovOvyT{uV3#D*}0~f zOlRb@=u;u47Hi1K|Ie71iUsQc7*1U?O#Kx91Axcr0PNgqzb~c$`UkYhfywfkm@gG; zEa&+zWJ=asQqwtW#AxH43Lrjm1%Q*O$=i6_rKwzFMcxS)T^S3@&6H5F#ymLQYeljv z*hF>(E66Aq_51W5d3OF;Zl;8aHKxL~)p_S9XKszBGkPcX$~aK|N}=3Ttg)QR!?}|y z1{+uTf#q*Xs90la!(); + item.shootSpeed = 10f; + item.summon = true; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI); + return false; + } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + public override void AddRecipes() + { + ModRecipe r = new ModRecipe(mod); + r.AddIngredient(ModContent.ItemType(), 12); + r.AddTile(TileID.LunarCraftingStation); + r.SetResult(this); + r.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.png b/Items/Weapons/Summon/DragonbloodDisgorger.png new file mode 100644 index 0000000000000000000000000000000000000000..d1c8066dfecd4c2c7be64b1da84d1db583473b70 GIT binary patch literal 1163 zcmV;61a$j}P)Px(MM*?KRA_yfY+=wo8H;~oHpu-4CJH(I4#AIk%W7L=g;-c#9vJQ2+x;t$`+xOj6-?|@F-S2zO zJ@=fB=n#}feu}Th#{nomU)(I15&@K}&*~1^we?r)Z1n8(3lza){>tSGx#O?jxZl+J zK><7c0v?)We(A+hOV8=(WLnli>$|#P_d(V+_%GGBP1O;qe0b+jg;4lEM7v46+ga^xbvtC~||M2c?-FZO) z30gi2c(J+|SA=FEW;}*pmEQm-G2c#$Vyn+D1J8NjbB=Y<_HXFalVrtYn@S z6wvGhYx6~?v?7S{*{AXK;^zZ#$DaK0>j~2&HZSJSo%kU$PRvhCj6?wQ^VRr$!&xAU zh85s>d)cUk^}>R+O))-mB);B$5s$Nssy+MkO=g#o^5jdbPw|)+f&!YI;4v>oEpvxT z*|vx2h5zIEQ}Ot-=TB$)3(K^}e6zMM1O+rY(6c3* z2M`n1TibrYDn<&i5u#O$(5meVU9W()Q!yU{DI;AOay7;0oneklRriPe?R#bXxzq&5ES5bi22cdvA35G;PvA2W-=~H#sU5*(8dAl>l>N2b_>ndE^__GeLcUe)vTZZeei5u%-hIr=FX$c zec797dU!&6o9#xmE4%#%kFNs*KRkuUI9HMvH#r53gFlK?WwNQ znHPcr^uc3Z5c7)BJDqtUD8TEml^UUTI_q%eg`fa^u-RJ00k$6hy&)(7b1Kt$-DYsU dS9HAsz5vrzJhxkGMfLyy002ovPDHLkV1m9JK(YV; literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs new file mode 100644 index 0000000000..f3b2c349c4 --- /dev/null +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -0,0 +1,80 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class EndoHydraStaff : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Endo Hydra Staff"); + Tooltip.SetDefault("Summons a frigid entity with a head\n" + + "If the entity already exists, using this item again will cause it to gain more heads"); + } + + public override void SetDefaults() + { + item.width = 58; + item.height = 60; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.UseSound = SoundID.Item60; + item.summon = true; + item.mana = 25; + item.damage = 3775; + item.knockBack = 3f; + item.autoReuse = true; + item.useTime = item.useAnimation = 36; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + + item.value = Item.buyPrice(2, 50, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.DarkBlue; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + bool bodyExists = false; + int bodyIndex = -1; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI) + { + bodyIndex = i; + bodyExists = true; + break; + } + } + if (bodyExists) + { + Projectile.NewProjectile(player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, bodyIndex); + } + else + { + bodyIndex = Projectile.NewProjectile(player.Center, Vector2.Zero, type, damage, knockBack, player.whoAmI); + Projectile.NewProjectile(player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, bodyIndex); + } + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.StaffoftheFrostHydra); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/EndoHydraStaff.png b/Items/Weapons/Summon/EndoHydraStaff.png new file mode 100644 index 0000000000000000000000000000000000000000..6fa7f3ad9d08bb303edad83e4dee2cfcf7482d1a GIT binary patch literal 970 zcmV;*12z1KP)Px&gh@m}RA_3h(I(5=ny^6KtstB@EDY7Xm|q} z3R*x&fIy)@B1r)RVu!@By|xoOGKGB<&t%7!#7k^u|7N{=W@l&j+cW3PSv!n~;?a!! zY;7U;^Y(pZKcD>#z{dI)owx%Q5p~Xb0KH0lbSg6k zz@O}917LpP8UX3cMWy}6x3A=9Ky;`iB-4}4ZGI=)fQ~+@cVQRNp_z5t;-sQvDh-%P ziiG5a3sDE);GnA5ts(l)ebhuQ8jS-`t(HAAADv`oaRGpr&sPA5CB~F{sklX@pMdB| zWg;dLpDPvep5!DhW^)Mu+~PY=yZB^kV%h;H>~1Ul$r~W?)Ec6G&bpq&N`*Xd+~+pd zR-0Qb4qkfr6o6mP9(!IyND66@#8r_sME&$p&nK zjOQm(c4bBbBPt|A;V=O8TFsN_ZgCrc`Nd`6$Tug(rUBTWy{oiuT)hq)_tCjKj{t~l zy>9jsWJXO5oG2~dOwY_J_Iz%u%Iw;@V%KMBoutV(^>K)-Av*9}S4iqP zsVJTt2cTTq>lkliiKGKiaZBCevT_drQNKFw7FSJ#+Tv|TlA&;DDctKb|6nWkw^jHx&=>?Qq2>RA~{~Id~3ze9nb5SNcF0KXgBpt zGPxl0Km)+}`Wb+|)lbax99^fBIQ9x8zza(9^(A;m$swVkOQWOvs3CVCI0zhqlzbBHXjeCPuK-5H1RwJ^~ zA9j)=dx`c+G8~CGEjuv0Bt`ZR)z^7?t!LCpimV|TLaVk(o%DYpDYA+vVEzw*RK!P> sq{teg&dk&jaI_lnY6GK7Qe+L$zpj3=b?J?CvH$=807*qoM6N<$f>NZu(*OVf literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs new file mode 100644 index 0000000000..3d62a6a18d --- /dev/null +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -0,0 +1,44 @@ +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Weapons.Summon +{ + public class FuelCellBundle : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fuel Cell Bundle"); + Tooltip.SetDefault("Releases a small, special variant of the plaguebringers"); + } + + public override void SetDefaults() + { + item.mana = 10; + item.damage = 73; + item.useStyle = ItemUseStyleID.SwingThrow; + item.width = 32; + item.height = 32; + item.useTime = item.useAnimation = 36; + item.noMelee = true; + item.knockBack = 7f; + item.value = Item.buyPrice(0, 80, 0, 0); + item.rare = 8; + item.UseSound = SoundID.Item106; + item.autoReuse = true; + item.noUseGraphic = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 11f; + item.summon = true; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + } + return false; + } + } +} diff --git a/Items/Weapons/Summon/FuelCellBundle.png b/Items/Weapons/Summon/FuelCellBundle.png new file mode 100644 index 0000000000000000000000000000000000000000..191e5f6570eb78b7fa5478956e1dc99d2db4b6dd GIT binary patch literal 622 zcmV-!0+IcRP)Px%C`m*?R7i=%md{I6Q545Nud#I0(HY*P4m1oHnu8!}wGmPV`i0`gF!}=ugjTNF z=&BYjf?B(9;VKB+ND$F3Xc5$iAmc9-eNFnv!4}Pw#PnR;cN*_Fh7jDot9Q@2_rCk# z-0ykM;*_eZkIAEVG#+V+SO9je0Kj_jK+B8Hoc2ZkDyuwjqyLsR-rN5MK-T>VK)&$9 z1Gs+gCID|=ywT=AZ@2)!U`Ggm_754rAW>CETQ>lq^Nj#>_S6EflrDGx(MTA8)y?gS z8widtY)Y?5=HnIs$;$}jE=~hbSiJ+l`a(*}4~%a4`CR}Kp=toKe!eE4Sj_pT zu0G}gJe%v$5_4%)v*N2S0L;$V6*rjQP(FM5NOcAw621Sl2>cJCa`p9g0mn(CX7?XF z1Yqc{>KNlA>A$|nC=me7@frYJ=ciV);nuLWU~K9v00(XAj8ene_7*_veOezi=c8y+ zoy5)TR=j<3t6n}S0wur6SV)AhT>0-ifJve~pXA!)Z9n8{6HX!#okUVD^Sw?a9ie(n zeNO^I>MY|UuYr=k{?x`_C$}%&8MgqOB}d!WoR1P$)h#<-E2Vdj6^R|UEr6Vp)BYJm z;vYNQXaQ`0Ue@yFJA?R1$VAa(i{-~9RIxW6-4jaw5g8*o1QuJZ$86me^#A|>07*qo IM6N<$f{()(=l}o! literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs new file mode 100644 index 0000000000..333654f57e --- /dev/null +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -0,0 +1,124 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class IgneousExaltation : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Igneous Exaltation"); + Tooltip.SetDefault("Summons an orbiting blade\n" + + "If this item is used but you have no free minion slots, all knives are launched towards the mouse"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 47; + item.mana = 19; + item.width = 52; + item.height = 50; + item.useTime = item.useAnimation = 30; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 4.5f; + item.value = Item.buyPrice(0, 48, 0, 0); + item.rare = 7; + item.UseSound = SoundID.Item71; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + position = Main.MouseWorld; + Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI); + int swordCount = 0; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + { + swordCount++; + for (int j = 0; j < 22; j++) + { + Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6); + dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt(); + dust.noGravity = true; + } + } + } + float angleVariance = MathHelper.TwoPi / swordCount; + float angle = 0f; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == type && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + { + Main.projectile[i].ai[0] = angle; + angle += angleVariance; + for (int j = 0; j < 22; j++) + { + Dust dust = Dust.NewDustDirect(Main.projectile[i].position, Main.projectile[i].width, Main.projectile[i].height, 6); + dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt(); + dust.noGravity = true; + } + } + } + float totalMinionSlots = 0f; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].minion && Main.projectile[i].owner == player.whoAmI) + { + totalMinionSlots += Main.projectile[i].minionSlots; + } + } + if (totalMinionSlots >= player.maxMinions) + { + bool hasBlades = false; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + { + hasBlades = true; + break; + } + } + if (hasBlades) + { + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) + { + Main.projectile[i].rotation = MathHelper.PiOver2 + MathHelper.PiOver4; + Main.projectile[i].velocity = Main.projectile[i].DirectionTo(Main.MouseWorld) * 16f; + Main.projectile[i].rotation += Main.projectile[i].velocity.ToRotation(); + Main.projectile[i].ai[0] = 180f; + Main.projectile[i].localAI[1] = 1f; + Main.projectile[i].tileCollide = true; + Main.projectile[i].netUpdate = true; + } + } + } + } + } + return false; + } + + public override void AddRecipes() + { + ModRecipe r = new ModRecipe(mod); + r.AddIngredient(ModContent.ItemType(), 10); + r.AddIngredient(ModContent.ItemType(), 5); + r.AddTile(TileID.MythrilAnvil); + r.SetResult(this); + r.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/IgneousExaltation.png b/Items/Weapons/Summon/IgneousExaltation.png new file mode 100644 index 0000000000000000000000000000000000000000..0e640a9533d40f92480a87e1cc428eec90da57a9 GIT binary patch literal 740 zcmVPx%o=HSORA_JEnwIK~vy5}=Ns#T?(T{OI-f`B<^#6bohf=})iEyH6FsUGpA*y7vQs zC+oYk^bVaSQ=m;IhSr5-$4R9D==8b(>=m8?v!(zAiJ^x_%(zYl zfM%!d161}8js3)w;5u0#hKAIpFF=TDMtE610^r8G1>mfD4#d#V+A=g%@k2SZ9RO-` z%v{xPjj{A-lX#YoOZRD%E6Iw+{e$K zLeCdFLo4qTLb_xh;6>rNv0rJ|tRL0y-+OoKk`c*9 z&dKTVPdyHrT4ZM4T!N4oS`}_4WsJp0qt!6hM>QiPhL)w-?g5huFIjRkdMrkA*_?6Q zvSx(Dkg%v%%cL9yaOqw904KY;cN1f>lq|`6jhHFqv>C4v&5V#33L&&tYxg?9{5gS3 z?^^%x^g=Q;Z@w)mi6O~O%CZ6I4f?>WiQrR95Hr?}r2x{l&d`*Rf8y~Pnm2DIU3B%L zw$vXFh67{CiaP(;8CrN(7R_jinUrNKm}Dv{QR_=o9*?1@W?UyTdUI?8tH0yR5`RPE zIRSe#C(!Ty7iNU`8k%QD>WozQZ8amr&ybiIf1l}hLd`gKS^;$W`fK#InGs@V$SUsW zI#cVnjjsUjy$fK{0c^V&A%2GHLv7}D=3unym$8HNX4`H?h@Bx-ER+|$DJn<|ZH(V# Wn(); + item.shootSpeed = 10f; + + item.value = Item.buyPrice(1, 80, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Violet; + } + + public override void HoldItem(Player player) + { + double minionCount = 0; + for (int j = 0; j < Main.projectile.Length; j++) + { + Projectile projectile = Main.projectile[j]; + if (projectile.active && projectile.owner == player.whoAmI && projectile.minion && projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType()) + { + minionCount += projectile.minionSlots; + } + } + radianceSlots = (int)(player.maxMinions - minionCount); + } + + public override bool CanUseItem(Player player) + { + return radianceSlots >= 1; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + for (int x = 0; x < Main.projectile.Length; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.active && projectile.owner == player.whoAmI && projectile.type == ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType()) + { + projectile.Kill(); + } + } + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, radianceSlots); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 50); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/RadiantResolution.png b/Items/Weapons/Summon/RadiantResolution.png new file mode 100644 index 0000000000000000000000000000000000000000..16ce3953f477b434b8375371fb837ab59fa1a15f GIT binary patch literal 1156 zcmV-~1bh35P)Px(K1oDDRA_$mHiB%g@0JIEUpH+XC zoQMa{95?+oGzCxw1cUi{urK=^`Eefr2fN+_V7OvQ0FcS#0BG%K1mMisp-6HsJlzlg zeDdWmPzD6&JqATi*-tul)eu`^%W!v*WA-l?xrhcuSc9ID}$rpQ*yk8h~eQSsPhI9vKS(*48%w(ErZn$o>gIpOpQ24h;hSH-GZ& z6F`Bi>m6N%;Q^qKEfsUp`#aVH@M@2peN{IqyFRzMzC5allD(+Aj&(k3$DYXbzO@wa zlau5v!!LGN*SB>xSnY%R&6gv>yS6k20B!f1FX_Y&H-LoTRBdXm3ZSr_xdh#8>9e~J zu6WXF5B+gAvY*JEK5421Hzqq8?lWHW+;5TN6M|AeX3^{&WebJlXn zwXQVJO^;>)I6wU7wBut>aL#)&t~Xt_)HspcUpcG3lT_!)!FbofeD-wjKlN~30C48& zNKx}l2+kyt+|W`9z{P=E*6x@p?}`3-$K!fYNsh#IMlXH*&79^OdxCduS8alvV(;{) zk^NL3s{WIgmE1b=>+|C!%_|}3Q$*}p_mwp#cEg;?-K|30%3pH#Xo^)ra3;C2Cvq+k z-@4b`{)E+bV^R*PuFCAjjb!aFWhNyAUHM{9u_baMAp(!Dt_=Xby>e53WtmiEOV`Vi zA78orUeitp+M2a1nCWEI-4p5BmVF>WyZaW6$SoUt;Ze4%()TyH9 z3<<&6pNVTv1bt@@zH>a^nRu~sNlI()) + if (projectile.active && projectile.owner == player.whoAmI && projectile.minion && projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType()) { minionCount += projectile.minionSlots; } @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Summon for (int x = 0; x < Main.projectile.Length; x++) { Projectile projectile2 = Main.projectile[x]; - if (projectile2.active && projectile2.owner == player.whoAmI && projectile2.type == ModContent.ProjectileType()) + if (projectile2.active && projectile2.owner == player.whoAmI && projectile2.type == ModContent.ProjectileType() && projectile2.type != ModContent.ProjectileType()) { projectile2.Kill(); } diff --git a/NPCs/Abyss/Flounder.cs b/NPCs/Abyss/Flounder.cs index 06dd60e888..bed92986a0 100644 --- a/NPCs/Abyss/Flounder.cs +++ b/NPCs/Abyss/Flounder.cs @@ -286,6 +286,7 @@ namespace CalamityMod.NPCs.Abyss { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Frogfish.cs b/NPCs/Abyss/Frogfish.cs index 017429266d..6232b8dbec 100644 --- a/NPCs/Abyss/Frogfish.cs +++ b/NPCs/Abyss/Frogfish.cs @@ -255,6 +255,7 @@ namespace CalamityMod.NPCs.Abyss { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Gnasher.cs b/NPCs/Abyss/Gnasher.cs index 66bcd7bc69..87bad3c278 100644 --- a/NPCs/Abyss/Gnasher.cs +++ b/NPCs/Abyss/Gnasher.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Banners; using CalamityMod.World; using Terraria; using Terraria.ID; @@ -113,6 +114,7 @@ namespace CalamityMod.NPCs.Abyss { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.TurtleShell); } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Trasher.cs b/NPCs/Abyss/Trasher.cs index 16d84e4d1f..e05bb83557 100644 --- a/NPCs/Abyss/Trasher.cs +++ b/NPCs/Abyss/Trasher.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Pets; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Pets; using CalamityMod.Items.Placeables.Banners; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -366,6 +367,7 @@ namespace CalamityMod.NPCs.Abyss { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Gatligator); } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs new file mode 100644 index 0000000000..0d6f3dfe1b --- /dev/null +++ b/NPCs/AcidRain/AcidEel.cs @@ -0,0 +1,106 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.Banners; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Buffs.StatDebuffs; +namespace CalamityMod.NPCs.AcidRain +{ + public class AcidEel : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acid Eel"); + Main.npcFrameCount[npc.type] = 6; + } + + public override void SetDefaults() + { + npc.width = 72; + npc.height = 18; + npc.defense = 4; + npc.damage = 58; + npc.LifeMaxNERB(Main.expertMode ? 500 : 455, 500); + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(0, 0, 3, 32); + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.aiStyle = -1; + aiType = -1; + npc.lavaImmune = false; + npc.noGravity = true; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + public override void AI() + { + npc.TargetClosest(false); + + if (npc.wet) + { + npc.ai[1] += 1f; + if (npc.ai[1] % 150f == 0f || npc.direction == 0) + { + npc.direction = (Main.player[npc.target].position.X > npc.position.X).ToDirectionInt(); + } + npc.velocity.X += npc.direction * 0.3f; + + if (npc.collideX) + npc.direction *= -1; + + npc.spriteDirection = npc.direction; + + npc.velocity.Y += (Main.player[npc.target].position.Y > npc.position.Y).ToDirectionInt() * 0.075f; + npc.velocity = Vector2.Clamp(npc.velocity, new Vector2(-15f, -3f), new Vector2(15f, 3f)); + npc.rotation = npc.velocity.X * 0.02f; + } + else + { + npc.rotation = npc.rotation.AngleLerp(0f, 0.1f); + npc.velocity.X *= 0.95f; + if (npc.velocity.Y < 14f) + npc.velocity.Y += 0.15f; + } + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 5) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 8; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/AcidEelGore"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/AcidEelGore2"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/AcidEelGore3"), npc.scale); + for (int k = 0; k < 20; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/NPCs/AcidRain/AcidEel.png b/NPCs/AcidRain/AcidEel.png new file mode 100644 index 0000000000000000000000000000000000000000..1f913c9b1ecfa541f23a6db758b73b5452ecc9ec GIT binary patch literal 2828 zcmV+n3-k1eP)Px<#z{m$RCt{2o!xI7R~g2islPW{+wo@{+l`adjuJs=8zCI2MQ)%HAR&aD3J6kf z5O9M~B`QGt0llbN6|Rr~A<+w>Dh(16qEcI>fkI;>T(^NHsvYuSd+pec9oupIl{m}A z*~iOycaG1QnO*yW^SiNkcIM3Po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ug$K6;RZO+~TZ zX73Soxnw(w(Urlgde2J5$Xu4g-D){w=1r&6*@i9)w>P;g?~3dyo3AGo2B;&1XG!Kn zH>Okt+f}IVA5^OLyi*(zV~smv^YrP$@O{SAOEvF{DObjXoYjN#!= 5) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); + } + } + } +} diff --git a/NPCs/AcidRain/BloodwormFleeing.png b/NPCs/AcidRain/BloodwormFleeing.png new file mode 100644 index 0000000000000000000000000000000000000000..daf475a2dadabb76d1fc583b028b67003ef5d890 GIT binary patch literal 1330 zcmV-21Px(>`6pHRA_h5-9<7%1~LepqGS?Z4%bCIAB(L?bM zs3Cf=2Mvng!FKWJsfbV%1gT&MMJ>4*OA|ty8r_CwlU>_JrL^&2=+eF(rq4F-WT)?D zcji^o{hnrLcV@mj@65cPnR&dy_Ezr5r?fnPujj7-FwndcfU)I80Jazkm94tR_jLpC z%k&fgBmEx$kRE?8@WY{9y8t+w%?9$TcHj-RxB38|O`Zkdfdy6P(5w3Zh{s|cKrWvT z6qG)xz7O<_>p%Vgz}q7u031!HeSprcy&k}Yne&0)+jFou`5gc^E*4bH9V-9*Pd)-* zbofZXi8Tk_yDvWvz=fIf{@NCAoKjA<_0oJ6KmiVf7}3)tkl7bF-(Jn>}5A1sheJJcZigis7u4!IJ%4UPlqOExQChi9s&^oXN_o-VIH;5t?Q^22 zTwb)-2bJ=oJyNZd7wz>yrMzf=Ro*Bsx}&smc`B$530 z*6xQ@MlNaxBANd(3!|G0`hS;}^*5M12eNMnlYKs*%(GQ%4odYwS&VGW!MfJM`ocP? zhRy{!XBIXRcJ4X&tR+&_Go%k<+mis~uVsCJFTa=uTymo5L9bp~4&ZFEn9P7By&@r^ggKwb@He09XUAksA8lQ zzYuUBq$-gSSYMSz(sHuB4Y+%zE|C$s>~o@iswd3!&9O1Z4ov6C`k9)3@8pgXMICz% z0A~j!9U+o-y4!FBV((hc{Imlf68-Q(hB4kARZI8RxyJ?T4@1@*vqL6Cq zgnB~>F9(); + npc.dontTakeDamageFromHostiles = true; + } + + public override void AI() + { + if (npc.collideY) + { + if (npc.ai[0] == 0f) + { + npc.ai[0] = Main.rand.NextBool(2).ToDirectionInt(); + npc.netUpdate = true; + } + if (npc.collideX) + { + npc.ai[0] *= -1; + } + } + float xSpeed = 3f; + npc.velocity.X = xSpeed * npc.ai[0]; + npc.spriteDirection = (int)npc.ai[0]; + bool flee = false; + for (int i = 0; i < Main.player.Length; i++) + { + Player player = Main.player[i]; + if (player.active && !player.dead && Vector2.Distance(player.Center, npc.Center) <= 220f) + { + flee = true; + break; + } + } + int timeBeforeFlee = 60; + if (flee && npc.ai[1] < timeBeforeFlee) + { + npc.ai[1] += 1f; + } + if (npc.ai[1] == timeBeforeFlee && Main.netMode != NetmodeID.MultiplayerClient) + { + npc.position.Y += 16f; + npc.Transform(ModContent.NPCType()); + npc.netUpdate = true; + return; + } + } + + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 6) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); + } + } + public override void OnCatchNPC(Player player, Item item) + { + try + { + + } + catch + { + return; + } + } + } +} diff --git a/NPCs/AcidRain/BloodwormNormal.png b/NPCs/AcidRain/BloodwormNormal.png new file mode 100644 index 0000000000000000000000000000000000000000..b33cd58a7e8ee887a74b6c1b81ee63c8015b8753 GIT binary patch literal 665 zcmV;K0%rY*P)Px#Cs0gOMF0Q*ekm!_w4n0rXM}1&%VZ%i~7swn?YH$baW&G0{{R3?eZnP z0000DbW%=J0RR90|NsC0|NsC0|1AVTtpET52T4RhR9J=Wn9*{BAQVIc!GQYz|64cP z3#bt9)l6qH%|3KmJdT>~5ycImURA5ozKn4RSDzs%d0~QtbGE{=8!CHm241hb%9DsH0*TsL~%mMg~ zgaJ$mHG>8*vZ(l7YL}~K03m=>7gGiTBm~yX3Wk8g&S6MI zt(9PXEg(J&TttRmOd4wNn>tr#91hjn6OjQGSt)h^l4e=Ulu=|r=};OAm=Z8nOkVFe zZJHoLE{Opg24b9wiVS$Ps%~nKmz7JjWw3!jOZ8vMpawrbs*ZQSR`H!fdGQamgB;p! z>semB8uegNVY}3V4t)LRJ5z$9!ghl~9jcj735FmltT!lS0cHn91^(UDK@F}|AllJE z4gO`Ww7Um(cG_xiKVhKGyA8Aw#NqvV>#&ha0oF^dlBNu5@Xh%FBIq=66HU}400000NkvXXu0mjf{ZAjv literal 0 HcmV?d00001 diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs new file mode 100644 index 0000000000..976cbd4d12 --- /dev/null +++ b/NPCs/AcidRain/NuclearToad.cs @@ -0,0 +1,128 @@ +using CalamityMod.Dusts; +using CalamityMod.Projectiles.Enemy; +using CalamityMod.Items.Placeables.Banners; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Buffs.StatDebuffs; +namespace CalamityMod.NPCs.AcidRain +{ + public class NuclearToad : ModNPC + { + public const float ExplodeDistance = 185f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Nuclear Toad"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.width = 62; + npc.height = 34; + npc.defense = 4; + npc.damage = 75; + npc.lifeMax = 255; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(0, 0, 5, 0); + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.lavaImmune = false; + npc.noGravity = true; + npc.noTileCollide = false; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 302; + } + public override void AI() + { + npc.TargetClosest(false); + Player player = Main.player[npc.target]; + // Hover on the top of the water + if (npc.wet) + { + if (npc.velocity.Y > 2f) + { + npc.velocity.Y *= 0.9f; + } + npc.velocity.Y -= 0.16f; + if (npc.velocity.Y < -4f) + { + npc.velocity.Y = -4f; + } + } + else + { + if (npc.velocity.Y < -2f) + { + npc.velocity.Y *= 0.9f; + } + npc.velocity.Y += 0.16f; + if (npc.velocity.Y > 3f) + { + npc.velocity.Y = 3f; + } + npc.ai[0] = 5f; + } + if (npc.Distance(player.Center) < ExplodeDistance) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < 7; i++) + { + float angle = Main.rand.NextFloat(MathHelper.TwoPi); + Projectile.NewProjectile(npc.Center, angle.ToRotationVector2() * Main.rand.NextFloat(6f, 9f), ModContent.ProjectileType(), 27, 1f); + } + } + npc.life = 0; + npc.HitEffect(); + npc.netUpdate = true; + npc.active = false; + } + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 4) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 8; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/NuclearToadGore1"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/NuclearToadGore2"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/NuclearToadGore3"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/NuclearToadGore4"), npc.scale); + for (int i = 0; i < 25; i++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, Main.rand.NextFloat(-2f, 2f), -1f, 0, default, 1f); + } + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + } +} diff --git a/NPCs/AcidRain/NuclearToad.png b/NPCs/AcidRain/NuclearToad.png new file mode 100644 index 0000000000000000000000000000000000000000..2aa70fa1f173e40dc1c1f7e0f10a27c5f94ae2bd GIT binary patch literal 1904 zcmYk7d0Z0s62KwSvJ_j7mGG#%2whz@57eG`l_y@IJ}r}i^2{{U_1L`Ebytv{nBtMN zmiLu;Mw$l-+5st^@w8S7^GH-GFOrA5f4u!;zVn;kd}ikNoB3mY^YU<#I|4ld0087% zoE?26+D0O6hovQaxkTNOC?MX)$sW+eQd^W52Se;ob^t&N>8R+6l*E>ab`HP;0ATvQ z0GT&yZ~(v|DHlgObi(CNWfvord?C!I&nr((yXLkR_yk7OW9*eH8;N)BOA%4-f$ok( zn*1>n;MaoP}5F?8SjxfOKyRGS__segqdAz4KG;Q$WKJ~uio@cO=X(YVWupQKC@3- z2}?aX4xi_CcAGCCLxoo_Io)_>%X$ah+Eq&;IjAse<*TguLtS}t5!8yLX9CI#1Y~R8qq_3+&grQzlm|QSO7(|q z_8tJMUhrQ2b+U%~1%KO${eYb~lDB$K`Etpt77sjqDrGf3@W@LkwWxB{g?hT@jiQ>4 zIKv97AmP=r%$e?!Az9&(+P@O$rmtVItT^(&t<2@-g3)gT~w+gU39ne?Ffm z9q%;zkR7hyW8--GGfGDLS( z!@n|>PcqV3h{+e(o1Weu&Z9mOgaYAo%i`(;@aIxaqYxr&>5s45yxa5#+bY(3R{eY4 z{f=lgZL2zUve97wAf=!P5`Iw$W% z{7Tj2HBZ#qEId^Vso6-5){Qr>)4#?ngx2ZC*2|gvRW^{79hvN#al#2JqFrX?X#Nolg0tZCfaKoy~NZ&*FBtr+Js6g1KNdwVM zT2~vgPu$-O-9JA}AV~QBpZxnCLIlm$R^l*YvJt%ebQu|qeOmsX-(`87I!@!C9ncW^U(wBAcK@3-x0N*{J4LU=I5SLAiP`l$+;Mi&^jjS}%_wraE zuS(Y4YvDb>pMb;U6PR6a5VBjH4h|jO6*p8Q8NQWo57XMq7RDlyo#d{kwxI`ROC3I7?w} zR_d5i1W#d4M&>-PRY!zhIHHZ=$+BYt?8v|eQ1Qvn?^)-%{m(c*Bq^|kDD7cSl5UZTXE zBPP;6SKNw=_*j$~&}96|<#WQn5A`Z&i^$rV9aV~E4M)ELY@D38U?Yx~-!@Gyqe)=^ zUfKy2w=Eb(Q~c?5m8o2Y2}=$yl0IlOsUyO=yh&Z#`j)n(p8`9*M~euE@)IeGo6-fU zHwmTOeRdhuA zud>kKX?LR5A=)K=9G08axX$jVy_uOqUc9sB**7>96RtGZ%%Wj5l-@VS1zw;#*jQ zulNdqp*q#;+`c(~&4fkW0&RV|%K3CHaf2=Uhgn|EaE9g=c`o)uUq)4kC;atzy=K<3qy&e zdBpx$stB}}oI(UqieO^MBXe*pe|tT;&fRT`346vwXr8hy7m=?g5SrgU{K^>R^%x3i zEjI>mYE>UbknjO)8FG7}u~Fdlwk=bbyE>=pG=K#1jPqb(v{F69Z!_^HNRF20o{RqD b$9qz9m9|~QPsl5hEeUWr=i%67kIDES?|i5X literal 0 HcmV?d00001 diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs new file mode 100644 index 0000000000..ce739cf600 --- /dev/null +++ b/NPCs/AcidRain/Orthocera.cs @@ -0,0 +1,167 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Projectiles.Enemy; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using CalamityMod.Buffs.StatDebuffs; +namespace CalamityMod.NPCs.AcidRain +{ + public class Orthocera : ModNPC + { + public const float MaxSpeed = 10.5f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Orthocera"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.width = 62; + npc.height = 34; + npc.defense = 10; + npc.damage = 60; + npc.lifeMax = 380; + npc.knockBackResist = 0f; + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.value = Item.buyPrice(0, 0, 4, 20); + npc.lavaImmune = false; + npc.noGravity = true; + npc.noTileCollide = false; + npc.HitSound = SoundID.NPCHit41; + npc.DeathSound = SoundID.NPCDeath13; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 500; + } + public override void AI() + { + npc.TargetClosest(false); + npc.ai[1] += 1f; + if (npc.target >= 0 && npc.target < 255) + { + Player player = Main.player[npc.target]; + // Swim + if (npc.ai[1] % 250f < 180f) + { + if (npc.wet) + { + // Reset so we can jum again. + npc.ai[3] = 0f; + + // Swim towards the player if we're not too close. + // If we're close, simply resume our current movement. + if (npc.Distance(player.Center) > 150f) + { + npc.velocity = (npc.velocity * 17f + npc.DirectionTo(player.Center) * MaxSpeed) / 18f; + npc.ai[0] = 12f; + } + // Variable for X movement later. + // It seems to slow down for some dumb reason in the jump phase without this value + npc.ai[2] = npc.velocity.X; + + // Make sure the value isn't 0 since we're relying on multiplication + if (npc.ai[2] == 0f) + npc.ai[2] = 0.1f; + + if (Math.Abs(npc.ai[2]) < 7f) + npc.ai[2] = Math.Abs(npc.ai[2]) * 7f; + if (Math.Abs(npc.ai[2]) > 16f) + npc.ai[2] = Math.Abs(npc.ai[2]) * 16f; + npc.ai[2] = Math.Abs(npc.ai[2]) * (player.Center.X - npc.Center.X > 0).ToDirectionInt(); + } + else + { + if (npc.ai[0] <= 0f) + npc.velocity.Y += 0.2f; + else + npc.ai[0] -= 1f; + } + npc.direction = npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt(); + } + // And jump/shoot + else if (npc.ai[1] % 220f > 180f) + { + if (npc.ai[1] % 220f < 200f) + { + npc.velocity.Y -= 0.05f; + } + else + { + npc.velocity.Y += 0.05f; + } + if (npc.ai[1] % 220f == 219f) + npc.ai[3] = 1f; + if (!npc.wet) + npc.velocity.X = npc.ai[2]; + } + // Don't jump mid-air + if (npc.ai[1] % 220f > 180f && npc.ai[3] == 1f) + npc.ai[1] = 0f; + npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver4 + MathHelper.PiOver2 + MathHelper.Pi; + + if (npc.spriteDirection == -1) + npc.rotation -= MathHelper.PiOver2; + // If sitting on land, slow down and, if in the middle of a jump, release a stream of acid. + if (!npc.wet) + { + npc.velocity.X *= 0.92f; + // Spit out a stream of acid based on our rotation + if (npc.ai[1] % 220f == 195f) + { + float rotation = npc.rotation - MathHelper.Pi - MathHelper.PiOver2 - MathHelper.PiOver4; + if (npc.spriteDirection == -1) + rotation += MathHelper.PiOver2; + + Projectile.NewProjectile(npc.Center, rotation.ToRotationVector2() * 12f, ModContent.ProjectileType(), 27, 2f); + } + } + // Prevent yeeting into the sky at the speed of light + npc.velocity = Vector2.Clamp(npc.velocity, new Vector2(-MaxSpeed), new Vector2(MaxSpeed)); + } + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 6) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/OrthoceraGore"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/OrthoceraGore2"), npc.scale); + for (int k = 0; k < 10; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default, 1f); + } + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/NPCs/AcidRain/Orthocera.png b/NPCs/AcidRain/Orthocera.png new file mode 100644 index 0000000000000000000000000000000000000000..f835bc06a691b22976abf6ae8a3943a03e7631e3 GIT binary patch literal 3182 zcmX9>2|QHo9)2xp>Q48wGHJw3(=O-`%3AV-kL$;8>6J8 z2V&${#itd4I)#)gi5~A|H<9~RE*2+ay>?XmEy>0zEa4jqP0|c=+1Schr(^Jcdd%D` zdL|r(zx_=5b|Uig4*AMss@V!^YkQ1c=R7{4$8>jf@{jz_)^pUV-#FZ!-z0M5G?;Xs z5CP&r{=WeQ&aAHhSdo8?vv(M??`nxK(Vsa;ST_9bP$YI!Qg2-sG<+Y+LxQvC57fY9 zljl;(R&9{8U=$)XvqEupn#}-FGy2K^P$IHH6ox}d67gN`2>iYq$zF;Cp!>!w3MeS~ zX>A6$#wT0r48+&jUI2GCeSHK#x0nq#cwVc(zkAT+)_wXhV!r$FT`)OQbOA(7ZxX-n zGWjKx;_#j=+g9>m^1&7>z2}^I0pcvG;2)h}&y^pAbI+2{+TL6OQU5gwGXA)`3qb!m z&pW*@ykDC?_izEB3t`~tgmEfao5`Q+5mzWM{6Nvk(d88k%+#_#N0RFLV(X`QTh6|N zCevr_4*Z40AI&`JzZKeqOr!#0s)2iWpu@<5SL*WXuCCWv$vCe!&fmDGexByXk z)-6Mx3#dIDo7ik@dT%9Z@QIYI;=`?K`)Iq36qrS+yA{m4j(bpS6_7Ld;^W!Yob5x~mc598>e_#jgP`#Cu$oO2S~32=D>16mPba%NnExe9)KW}1JGRK0fy2-z+j*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KEuOj19&!~WiU!N{X(B938=Hl3$f!<(<5yF`!xZIEg`P%_gLip*ki>u z>BUJrAaS&ptq;}5m{OeZ!h-)qozH4(Hy(4b>IVB|T5y%)Z# z8iABjjtNSmngxCJHmzE}H4$;)KoYA#54QaIQle~5<7vU`Gp_Oc=onYh<7!1mUvErB z->`~|d#TYXwhoPBs0l#uf2*I~L;7MD{l|PqMh4U?jSZ*3LAd%?&2}QohNR+mMig~= z!d|BL96@cys~ph+sYV<=RK<~IwDo&t;m7d#Z17LZl80i)Y+cHz-<#Gk)^-bCaj-0- z-H}*>k-UpXJ;OJr=&*>8yxfF~%VtXTsof?xC?l<2obpTF8R52qgt7Nh&$VQ2%Xc>A zU+WXHQ>%gxh+ZSwK@IM4C6>Zdl#=gy!hn7tfT6Alt{8hK`u~Ex1Oxy8 literal 0 HcmV?d00001 diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs new file mode 100644 index 0000000000..b48b1be021 --- /dev/null +++ b/NPCs/AcidRain/Skyfin.cs @@ -0,0 +1,150 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.Banners; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Buffs.StatDebuffs; +namespace CalamityMod.NPCs.AcidRain +{ + public class Skyfin : ModNPC + { + public const float DiveDelay = 120f; + public const float DiveTime = 90f; + public const float TotalTime = DiveDelay + DiveTime; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Skyfin"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.width = 46; + npc.height = 22; + npc.defense = 6; + npc.damage = 62; + npc.lifeMax = 280; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(0, 0, 3, 65); + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.lavaImmune = false; + npc.noGravity = true; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 333; + } + public override void AI() + { + npc.TargetClosest(false); + Player player = Main.player[npc.target]; + npc.ai[0] += 1f; + if (npc.ai[1] > 0f) + npc.ai[1] -= 1f; + if (npc.wet) + { + // Swim around, moving towards the player + bool canSwimToPlayer = Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height); + if (canSwimToPlayer) + { + if (npc.ai[0] % 55f == 54f) + { + npc.velocity = Vector2.UnitX * (player.Center.X - npc.Center.X > 0).ToDirectionInt() * 27f; + } + if ((Math.Abs(player.Center.Y - npc.Center.Y) > 50f && player.wet) || (!player.wet && npc.ai[1] <= 0f)) + { + npc.velocity.Y = (player.Center.Y - npc.Center.Y > 0).ToDirectionInt() * 6f; + } + if (Math.Abs(npc.velocity.X) < 6f) + npc.velocity.X *= 1.04f; + } + else if (!canSwimToPlayer && Math.Abs(npc.velocity.Y) < 4f) + { + npc.velocity.Y *= 0.97f; + } + // Turn around if we hit a tile on the X axis + if (!canSwimToPlayer && npc.collideX) + { + npc.velocity.X *= -1f; + } + + // Check if we can dive + if (player.Center.Y < npc.Top.Y - 10f && + npc.ai[1] <= 0f) + { + npc.ai[1] = TotalTime; + npc.ai[2] = (player.Center.X - npc.Center.X > 0).ToDirectionInt() * 10f; + } + } + else + { + // Dive upward in an attempt to hit to the player + if (npc.ai[1] > TotalTime - DiveTime) + { + npc.velocity.X = npc.ai[2]; + if (npc.ai[1] > TotalTime - DiveTime * 0.5f) + npc.velocity.Y -= 0.135f; + else + npc.velocity.Y += 0.2f; + } + else + { + // Don't fall too fast because of wings + npc.velocity.Y += 0.1f; + } + } + npc.direction = npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt(); + // If sitting on land, rotate in a way that looks like we're stuck on the ground + if (!npc.wet) + { + npc.velocity.X *= 0.92f; + } + npc.rotation = npc.velocity.ToRotation() + + (npc.direction > 0).ToInt() * MathHelper.Pi; + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 5) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 8; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SkyfinGore"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SkyfinGore2"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SkyfinGore3"), npc.scale); + for (int k = 0; k < 20; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/NPCs/AcidRain/Skyfin.png b/NPCs/AcidRain/Skyfin.png new file mode 100644 index 0000000000000000000000000000000000000000..42c3aa3d2a5292a6bf53fbcd9f5429483cbc9f9f GIT binary patch literal 1707 zcmV;c22}ZpP)Bboed z-8k{4UsHbnYid!QCf2&SPQ`q0a)6(IvbtiykC$($w4tsgeF6PAK2gc~>-3cS9$WuA z28#i>`-gpfd)}Y_PP_D5^UoHvsBc$8K4uK{jIR8w(vIK${v(RX_ZTb=;OaH2oaOG` zeBeGGKE2~UC5uYTU@UR>_;U0km&Au)~nTdr^7!$&V%*7KJZyH7C7jJ`*&d4RAW z#u6A9Ti%=1?mhm+eXjbnXSvY7v6V|Iw}1)XbgmEgKe+eOUAl1fruzhw;s7-Z5M6X) ze3!EXW;2Y%$#XxubgXnR3$kUGt+-!FTJh7o`~Kw2Xi)mC$=-?z#9=X3=A$d|-0+`UjOP-|y&+LHr#%{g3-sWzZ}@ zwxG6RKz^Q_G{$fpvoyYA#UwGh?(}n)b?Upi|j{0ZL;G>AaX{S}+z5o;~2zxxgGUCuh(sKxr&_(J(SH zg58R=OYkix8H45k@^jGF!pIl8Q}->uF$RkP=xf=w@-@z2TMhTEX9&>OQn}_68Dv+! z?`|R%sN@kxd9}3(Zdfq@;kt;`1|&wAG4}1i2jr`XNcE^))I2~IV>G?acPzE8E=gn1 zJV10&ES_W4B_2yKXkB%QiBYu)+`tZCa{wivY%$EP(kzx*T|&LV+Jt$4+(nro=zO6n zldp;-sZMA|v^L?(oEd;ndI9|Ejms4>`8qD9R+o;Rto|^{+q2CKng^&oX9lG%jU8F) znii~0FoR|RHnp$g=b%?s2+MaZvR+r2J{4xYDfif=XnX-)hxjCC&>TR`WueW|O~)`b&R{VBHKy9So{Yh^ z0BH3L0csY?{dzVG`o>#?8q_|(+(Z{J)L86NF#r$mJyq%6I7cls`pb7LwHCVs2F(M6 z=z@J2==41iPg9i!7Q4i%k~x5(suJ?&ax$K`y5y@WbrxW1Rq35irlFJZqQ#d~s?xv# zYN8ALm~i3eax&iJp&QP2YTQI|0D0A(N_^2y!sB-E8Hdmb)#x)VAkqv#X}=Y!E^$at zUH2i{g%wfo$#}f0V4$4`7`juI^2fUFQJ$nxuo^Y6*rj3sN+-w0_7ubp-eMvvC^^0Y+M2$Y7-5vbk-@U^Y}lHpD!GZvlB(); + } + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 450; + } + public override void AI() + { + npc.TargetClosest(false); + if (npc.ai[0] > 0) + npc.ai[0]--; + if (!npc.wet) + { + if (npc.ai[0] > 0) + npc.ai[0]--; + npc.rotation += npc.velocity.X * 0.1f; + if (npc.velocity.Y == 0f) + { + npc.velocity.X *= 0.99f; + if (Math.Abs(npc.velocity.X) < 0.01f) + { + npc.velocity.X = 0f; + } + } + npc.velocity.Y += 0.3f; + if (npc.velocity.Y > 13f) + { + npc.velocity.Y = 13f; + } + } + else + { + Player player = Main.player[npc.target]; + if (npc.velocity.Length() < MinSpeedLungePrompt) + { + npc.TargetClosest(true); + npc.velocity = npc.DirectionTo(player.Center) * 24f; + npc.velocity.X *= 1.6f; + npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2; + } + else + { + npc.velocity.X += npc.direction * 0.02f; + npc.rotation = npc.velocity.X * 0.4f; + if (Math.Abs(npc.velocity.Y) < MinYDriftSpeed) + { + npc.velocity.Y *= 0.9925f; + } + else if (Math.Abs(npc.velocity.X) < 2f) + { + npc.velocity = npc.DirectionTo(player.Center) * new Vector2(36f, 9f); + } + } + } + } + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (npc.ai[0] <= 0f) + { + Projectile.NewProjectile(npc.Center + Utils.NextVector2Unit(Main.rand) * npc.Size * 0.7f, + -npc.velocity.RotatedByRandom(MathHelper.ToRadians(10f)), ModContent.ProjectileType(), + 24, 3f); + npc.ai[0] = Main.rand.Next(50, 65); + npc.netUpdate = true; + } + } + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 4) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/TrilobiteGore"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/TrilobiteGore2"), npc.scale); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/TrilobiteGore3"), npc.scale); + for (int k = 0; k < 30; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/NPCs/AcidRain/Trilobite.png b/NPCs/AcidRain/Trilobite.png new file mode 100644 index 0000000000000000000000000000000000000000..7d2f8b1eb74625f2c97240b165678caea02816d9 GIT binary patch literal 3235 zcmaJ^d05g}+x`)iX1S(i;{uYVVx=>chJc#mUP&%xE})eXlVhb+E}&BCWTsXm?qZ>n zktw;SqGct93#L|Rnr4a{E+L`e`ZCvdeeXN(`^WtCoa;L0JkRyq=f3ZA&aD%!j*1FD zDF6VV=uh(#Ga`2;uk(^RSEJ>H zVzu1*%K%P5a)=GZ`+B-YqTSCvGY+@Z?A??|y=c2GI9&6vbB7(bcjl=E8mgc8DT z3rt9}(JCXTXv#kgVVmnBBT_mtA@_fk)ZC2e5zxzqfS?zhK`1Qx1A2%#^`vxB68!R= zL2LhT?^`#(CVU(UJg8Yl00H=zQUw6qELPMZRFgFTv))+f2Fjl;NDy$x>pTF28_tz1 zOLY`=1d1<!;mIVShN729q1&B4< zFi9x)#mn5!KH4Q_UX<0YP)IGfgav?O11s>VyjGXBZ_*mnU|s7UMH2}XkPSfHR%H+n z4k2eS^)(7@$+42D+IDcR_4@I#HTN@c()7Dwc|g}|0Sq)Qb^3$i3yo+4{N-)HvuE#5 zZJHt-BJK0egn$4xF~+=Vby@BlK#9A_@#tq^buPC|<{t~mkcgi=V=a2C=POh0sza8L=}sv= z3Dvh3Y=%b$UsMImuGJZeZ`0E1Zy)KdXHFXp2qU;U$|8|LlhIE)S_q%$$hce` z)oSNz=ABq%CVbuUV%)%;q*eV>bn@DHi}k>qIkgvwx!8LF>LI_P2E%tO)s`p#+ZVf& z%4;f)t0M4s)|#uzCNb+7@bkVwXgg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0zw?7Xh7f&|l{oYqH7WyYr)Bb*+ z2PS8E&yZ_p5NBL#M$%yk4UA6CqVEa|UTy0fFqMgl3!(o&afvpgDaX1&M*`pX?R=q( z=?eVSRo%NE)J1rY@Us_QGn2C;W`bXtRcrm93;d1k|7#IK%D2^>=Zdve4*Au}$kJ=B zlsIacouTTRy7v~CF^ZelQJHMtRNlzm);DYn7fGTR>*~ppE&guvPx5aJ??%}NV|H9_ z=-6pN?R=ycxvseXTwYjmMgx5u9KY252UcX!TfeMH`E=|>pSB8>ok-V~ZvJYBMKj~0 zbOb&&`wa1xM>2!yu3;x~N+T5=5cP(c>iqiBq9k2e3*HH;v#(%g= zKtSK7i_$bXIjR5Ur~iQDf1G&ad*c{V@=bNd^{Z!k+gq5ixb-sgg1tjL@974x~`mp$xJ&UNzGC((e%J| z_HF%+g{WOE8SFpR}NDz}k_uZ$$*`-aXEIzR6BvyWVzcgRSf%Ea9zL{yIl@iTFk zgBP0|Gje#Krtzd7V@x%scK_adlk#Yy%@4Xsxm)!#(SBRVnsUN}i=Dncb!M_(2jFb) KYFBC-aN}Pp2_lmK literal 0 HcmV?d00001 diff --git a/NPCs/AcidRain/WaterLeech.cs b/NPCs/AcidRain/WaterLeech.cs new file mode 100644 index 0000000000..497a8fcd6b --- /dev/null +++ b/NPCs/AcidRain/WaterLeech.cs @@ -0,0 +1,141 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.Banners; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Buffs.StatDebuffs; +namespace CalamityMod.NPCs.AcidRain +{ + public class WaterLeech : ModNPC + { + public const float SwimIntertia = 24f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Water Leech"); + Main.npcFrameCount[npc.type] = 4; + } + + public override void SetDefaults() + { + npc.width = 26; + npc.height = 14; + npc.defense = 10; + npc.damage = 55; + npc.lifeMax = 75; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(0, 0, 2, 5); + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.lavaImmune = false; + npc.noGravity = true; + npc.noTileCollide = false; + npc.HitSound = SoundID.NPCHit33; + npc.DeathSound = SoundID.NPCDeath1; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = 100; + } + public override void AI() + { + npc.TargetClosest(false); + Player player = Main.player[npc.target]; + npc.direction = npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt(); + // Latch onto player + if (npc.ai[0] == 1f) + { + if (!player.active || player.dead) + { + // Revert back to swimming around after successfully devouring the player + npc.ai[0] = 0f; + return; + } + // Stick to player and make them bleed + if (npc.ai[1] > 0f) + { + npc.position = player.position; + npc.ai[1] -= 1f; + player.AddBuff(BuffID.Bleeding, 180); + } + // Die + else + { + for (int i = 0; i < 25; i++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, Main.rand.NextFloat(-2f, 2f), -1f, 0, default, 1f); + } + npc.life = 0; + npc.HitEffect(); + npc.netUpdate = true; + npc.active = false; + } + return; + } + if (!npc.wet) + { + npc.velocity.X *= 0.97f; + npc.velocity.Y += 0.5f; + npc.ai[2] += 1f; + if (npc.ai[2] >= 300f) + { + npc.life = 0; + npc.HitEffect(); + npc.netUpdate = true; + npc.active = false; + } + } + else if (player.wet) + { + float speed = player.wet ? 23f : 15f; + if (npc.Distance(player.Center) < 26f) + { + npc.ai[0] = 1f; + npc.ai[1] = 300f; + } + npc.velocity = (npc.velocity * (SwimIntertia - 1f) + npc.DirectionTo(player.Center) * speed) / SwimIntertia; + } + else if (!player.wet) + { + npc.velocity *= 0.9f; + } + npc.dontTakeDamage = !player.wet; + } + public override void FindFrame(int frameHeight) + { + npc.frameCounter++; + if (npc.frameCounter >= 4) + { + npc.frameCounter = 0; + npc.frame.Y += frameHeight; + if (npc.frame.Y >= Main.npcFrameCount[npc.type] * frameHeight) + { + npc.frame.Y = 0; + } + } + } + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.playerSafe || !spawnInfo.player.Calamity().ZoneSulphur || !Main.raining) + { + return 0f; + } + return 0.115f; + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 8; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f); + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } +} diff --git a/NPCs/AcidRain/WaterLeech.png b/NPCs/AcidRain/WaterLeech.png new file mode 100644 index 0000000000000000000000000000000000000000..17bc7c88b03f2d927a63ed7d9e499726c4fe5548 GIT binary patch literal 610 zcmV-o0-gPdP)Px%97#k$R9J=Wn88a_K^(_FiWDqL*n*qHf+cMjd9p(o5 z@Ne*#$8I5rhZRx~6N8mhkSHUKNIFEY9$r6}`R$t>--0ufyw7F#&HU!Q_hshI_xBsf ziJgvi2VO4^)U(8Qw)>#0G%3<=S}KmD4y^R`w!Cre+YbQt4^{z>in?qakH&8P`*#Gu z;rDWCT;+N4#?@B^05fWR=ale3lyUeqqtL-r7Afu3bt5|B775Dt!HB*=Tnu z5yI^ZO#v4!8H!JeCLZi6;xP1}Hyr5j+dZiJ#1VG5PiCpE09 w^iEsD`afqls~R@^$%!?f%^Eh?>DKw<7{{Rcg)RaMX#fBK07*qoM6N<$f{b?~Hvj+t literal 0 HcmV?d00001 diff --git a/NPCs/AcidRain/WaterLeechGlow.png b/NPCs/AcidRain/WaterLeechGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..48aaa585d2cdb2cb81d5737dc50ca1cc7be22518 GIT binary patch literal 366 zcmV-!0g?WRP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0Ru@yK~z{r?U%s~ z!Y~X)8+Kq3)?fkl;Kl&l*nCWFhpjrU+PXglZSbV3HCp>$MA-MbR$bh^*DYROYsT%cXy#|cv33o~tUn_}YiMpX z7}&$+NXm({{~&R?Hz66?8%ZYP9~OyYq{S~sNUbsD3Fny^ZH;Mq15!M6G5%>{ZvX%Q M07*qoM6N<$f)QquQvd(} literal 0 HcmV?d00001 diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index 964cf9b76c..dd5ee4f390 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Items.Materials; +using CalamityMod.Items.Accessories; using CalamityMod.Items.Placeables.Banners; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -127,6 +128,10 @@ namespace CalamityMod.NPCs.Astral { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); } + if (CalamityWorld.downedAstrageldon && Main.rand.NextBool(7)) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); + } } } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3131b0aa76..e5dbe8a7ab 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3473,6 +3473,30 @@ namespace CalamityMod.NPCs } } + if (modPlayer.hallowedRune) + { + if (isSummon && npc.damage > 0) + { + switch (Main.rand.Next(3)) + { + case 0: + player.AddBuff(ModContent.BuffType(), 120); + break; + + case 1: + player.AddBuff(ModContent.BuffType(), 120); + break; + + case 2: + player.AddBuff(ModContent.BuffType(), 120); + break; + + default: + break; + } + } + } + if (modPlayer.bloodflareSet) { if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life < npc.lifeMax * 0.5) && diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 9d190fe3e4..ff809e9659 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -10,6 +10,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -1073,6 +1074,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Blight Spewer DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); diff --git a/Projectiles/Enemy/NuclearToadGoo.cs b/Projectiles/Enemy/NuclearToadGoo.cs new file mode 100644 index 0000000000..443a006389 --- /dev/null +++ b/Projectiles/Enemy/NuclearToadGoo.cs @@ -0,0 +1,51 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Enemy +{ + public class NuclearToadGoo : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Goop"); + Main.projFrames[projectile.type] = 3; + } + + public override void SetDefaults() + { + projectile.width = 18; + projectile.height = 18; + projectile.hostile = true; + projectile.timeLeft = 600; + projectile.tileCollide = true; + projectile.ignoreWater = false; + } + public override void AI() + { + if (projectile.localAI[0] == 0f) + { + projectile.frame = Main.rand.Next(3); + projectile.localAI[0] = 1f; + } + if (projectile.velocity.Y < 10f) + projectile.velocity.Y += 0.175f; + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 4; i++) + { + int idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + } + } + } +} diff --git a/Projectiles/Enemy/NuclearToadGoo.png b/Projectiles/Enemy/NuclearToadGoo.png new file mode 100644 index 0000000000000000000000000000000000000000..988e3482b13f3e790c9dc8ea800ffe1fe8593ed5 GIT binary patch literal 591 zcmV-V0Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0pv+UK~z{r&6dF{ z1W_EvXSKBlt2Q?&X%9|XTolQ{0fm&|#$TZ=u_rmmUbn=F99--{Imp35qFe|k2c$M3 zML2A!weLIg6>mIa+TWCKz4^X3O>aK^-h1C(#B$ZqYQtNGYT-3EjU{wk#ZpiBws@Mr zIJ-InFO{6ns_+z0ge3Ld4qRc+`Gvg`#hAKFr{Fr-!pbyUj%Z}O51rfd_>UyINcJ2* z1KCn;9b++~C`ktAF7d*$n(!bynSTKY|50~qWcIP zzs#mg*)2!px^HGvrtFp@`hS^CqRzHac+kw2zeAG9p6G{jwfr)h$+$SXjBzM6LPt+Z zo^U-OnT+Mz2*|{Uj1w_`6q#y%cggUHD3UP|^<<>vS54nXf6XKLTdjW9g65I@t(HWU dN{Gm^J^&`p9nu^gLA3w?002ovPDHLkV1j*43Jw4O literal 0 HcmV?d00001 diff --git a/Projectiles/Enemy/OrthoceraStream.cs b/Projectiles/Enemy/OrthoceraStream.cs new file mode 100644 index 0000000000..b62d66ee44 --- /dev/null +++ b/Projectiles/Enemy/OrthoceraStream.cs @@ -0,0 +1,63 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Enemy +{ + public class OrthoceraStream : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acid Stream"); + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 32; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.penetrate = 3; + projectile.extraUpdates = 2; + projectile.tileCollide = false; + } + + public override void AI() + { + projectile.ai[1]++; + if (projectile.ai[1] >= 4f) + { + projectile.tileCollide = true; + } + projectile.scale -= 0.002f; + if (projectile.scale <= 0f) + { + projectile.Kill(); + } + if (projectile.ai[0] <= 3f) + { + projectile.ai[0] += 1f; + return; + } + projectile.velocity.Y = projectile.velocity.Y + 0.075f; + for (int i = 0; i < 3; i++) + { + Vector2 positionDelta = projectile.velocity / 3f * i; + int spawnDelta = 14; + int dustIdx = Dust.NewDust(new Vector2(projectile.position.X + spawnDelta, projectile.position.Y + spawnDelta), projectile.width - spawnDelta * 2, projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 1f); + Dust dust = Main.dust[dustIdx]; + dust.noGravity = true; + dust.velocity *= 0.1f; + dust.velocity += projectile.velocity * 0.5f; + dust.position -= positionDelta; + } + if (Main.rand.NextBool(8)) + { + int spawnDelta = 16; + int dustIdx = Dust.NewDust(new Vector2(projectile.position.X + spawnDelta, projectile.position.Y + spawnDelta), projectile.width - spawnDelta * 2, projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 0.5f); + Main.dust[dustIdx].velocity *= 0.25f; + Main.dust[dustIdx].velocity += projectile.velocity * 0.5f; + } + } + } +} diff --git a/Projectiles/Enemy/OrthoceraStream.png b/Projectiles/Enemy/OrthoceraStream.png new file mode 100644 index 0000000000000000000000000000000000000000..2f776c6c064d002f028c0505f183c4eeea58a3fb GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_r*vAk26?e?JY5_^A`ZVjXUNFFz`?vA^Zz;H lHhz_aThA^(o7sQ@4lp`wVYY3xl?0j3;OXk;vd$@?2>?6iF-`yg literal 0 HcmV?d00001 diff --git a/Projectiles/Enemy/TrilobiteSpike.cs b/Projectiles/Enemy/TrilobiteSpike.cs new file mode 100644 index 0000000000..e9b64c31ee --- /dev/null +++ b/Projectiles/Enemy/TrilobiteSpike.cs @@ -0,0 +1,47 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Enemy +{ + public class TrilobiteSpike : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spike"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 22; + projectile.hostile = true; + projectile.timeLeft = 600; + projectile.tileCollide = true; + projectile.ignoreWater = false; + } + public override void AI() + { + if (projectile.velocity.Y < 10f) + projectile.velocity.Y += 0.25f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 2; i++) + { + int idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + idx = Dust.NewDust(projectile.position, 8, 8, (int)CalamityDusts.SulfurousSeaAcid, 0, 0, 0, default, 0.75f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + } + } + } +} diff --git a/Projectiles/Enemy/TrilobiteSpike.png b/Projectiles/Enemy/TrilobiteSpike.png new file mode 100644 index 0000000000000000000000000000000000000000..d91935f3d49e4021950bcb96b510b5ca4c41c744 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^Ahr|-8<6aKa#jsUF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}2EbxddW?8eR=R!PlNHjv*HQ$tev?(pwn}YQG%(_g~>w)ImX= z@+a5W1dbkHQR`&rF_?Vg$IpXbzTb~OpjNc$Q-klHuOF2=l}3`rAcoRdiXlb1x1uML@+XjmU0`6=euX1UIs(G)*_P$sx8Yl+ey-Vt@8v!>e*2Q`lk${!8t$+a%Nr@&KQdX} zuGw(cNtf9tUc8^ko|bcKyMU^Vf6QaX%Sl3)9_(@6)43t$#GzxX%j!4%VVQmAU%PD1 krTOvq9Yi*&85uAzRGWJ(E1zQ21N1h7r>mdKI;Vst0Af6V&Hw-a literal 0 HcmV?d00001 diff --git a/Projectiles/Environment/AcidDrop.cs b/Projectiles/Environment/AcidDrop.cs new file mode 100644 index 0000000000..20cb99f6d2 --- /dev/null +++ b/Projectiles/Environment/AcidDrop.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Environment +{ + public class AcidDrop : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acid"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 20; + projectile.hostile = true; + projectile.tileCollide = true; + projectile.ignoreWater = false; + projectile.timeLeft = 360; + } + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + // Water drip + for (int i = 0; i < 4; i++) + { + int idx = Dust.NewDust(projectile.position - projectile.velocity, 2, 2, 154, 0f, 0f, 0, new Color(112, 150, 42, 127), 1f); + Dust dust = Main.dust[idx]; + dust.position.X -= 2f; + Main.dust[idx].alpha = 38; + Main.dust[idx].velocity *= 0.1f; + Main.dust[idx].velocity -= projectile.velocity * 0.025f; + Main.dust[idx].scale = 0.75f; + } + return true; + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + // 1 to 3 seconds of poisoned + target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(1, 4)); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, new Color(255, 255, 255, 127), ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Environment/AcidDrop.png b/Projectiles/Environment/AcidDrop.png new file mode 100644 index 0000000000000000000000000000000000000000..f5e4db998faf3ce301248a5f7bbba67271759ef1 GIT binary patch literal 262 zcmV+h0r~!kP)(b#d4Tm z$+i*hN0_lNn|ik%feC?Wb~9AJQ_n_pKYdso0=7}y43c(VJ--j;lWikB<;1(Cfb*X2 zlFul9gK;j$@Pe5Ocg+Foq1;B8$uOI5y?PH50@KGYtcAM{BtW)}0NW}$D`0}<-2eap M07*qoM6N<$f*!nVX#fBK literal 0 HcmV?d00001 diff --git a/Projectiles/Environment/HotSteam.cs b/Projectiles/Environment/HotSteam.cs new file mode 100644 index 0000000000..fd57ffbdff --- /dev/null +++ b/Projectiles/Environment/HotSteam.cs @@ -0,0 +1,38 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Environment +{ + public class HotSteam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Steam"); + } + + public override void SetDefaults() + { + projectile.width = 40; + projectile.height = 40; + projectile.hostile = true; + projectile.tileCollide = true; + projectile.ignoreWater = false; + projectile.timeLeft = 30; + } + public override void AI() + { + for (int i = 0; i < 6; i++) + { + Dust dust = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, 4); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi); + dust.alpha = 127; + } + } + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Poisoned, 180); + } + } +} diff --git a/Projectiles/Environment/HotSteam.png b/Projectiles/Environment/HotSteam.png new file mode 100644 index 0000000000000000000000000000000000000000..3c8f498e7b5d6be4a208d079e9c36406652b97e5 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^Od!m`1|*BN@u~nR#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!AdjbuV~9j}vI8>@4+Db`1LI=#$Gd>y44$rj JF6*2UngBoO894v| literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/AcidGunStream.cs b/Projectiles/Magic/AcidGunStream.cs new file mode 100644 index 0000000000..f23905b6a5 --- /dev/null +++ b/Projectiles/Magic/AcidGunStream.cs @@ -0,0 +1,63 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Magic +{ + public class AcidGunStream : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Acid Stream"); + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 32; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.penetrate = 3; + projectile.extraUpdates = 2; + projectile.tileCollide = false; + } + + public override void AI() + { + projectile.ai[1]++; + if (projectile.ai[1] >= 4f) + { + projectile.tileCollide = true; + } + projectile.scale -= 0.002f; + if (projectile.scale <= 0f) + { + projectile.Kill(); + } + if (projectile.ai[0] <= 3f) + { + projectile.ai[0] += 1f; + return; + } + projectile.velocity.Y = projectile.velocity.Y + 0.075f; + for (int i = 0; i < 3; i++) + { + Vector2 positionDelta = projectile.velocity / 3f * i; + int spawnDelta = 14; + int dustIdx = Dust.NewDust(new Vector2(projectile.position.X + spawnDelta, projectile.position.Y + spawnDelta), projectile.width - spawnDelta * 2, projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 1f); + Dust dust = Main.dust[dustIdx]; + dust.noGravity = true; + dust.velocity *= 0.1f; + dust.velocity += projectile.velocity * 0.5f; + dust.position -= positionDelta; + } + if (Main.rand.NextBool(8)) + { + int spawnDelta = 16; + int dustIdx = Dust.NewDust(new Vector2(projectile.position.X + spawnDelta, projectile.position.Y + spawnDelta), projectile.width - spawnDelta * 2, projectile.height - spawnDelta * 2, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 0.5f); + Main.dust[dustIdx].velocity *= 0.25f; + Main.dust[dustIdx].velocity += projectile.velocity * 0.5f; + } + } + } +} diff --git a/Projectiles/Magic/AcidGunStream.png b/Projectiles/Magic/AcidGunStream.png new file mode 100644 index 0000000000000000000000000000000000000000..2f776c6c064d002f028c0505f183c4eeea58a3fb GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_r*vAk26?e?JY5_^A`ZVjXUNFFz`?vA^Zz;H lHhz_aThA^(o7sQ@4lp`wVYY3xl?0j3;OXk;vd$@?2>?6iF-`yg literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs new file mode 100644 index 0000000000..39ed20b136 --- /dev/null +++ b/Projectiles/Magic/EternityBook.cs @@ -0,0 +1,84 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class EternityBook : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Visage"); + Main.projFrames[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 26; + projectile.height = 32; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.magic = true; + projectile.ignoreWater = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + + projectile.Center = player.Center + 19f * player.direction * Vector2.UnitX; + + if (player.channel && !player.noItems && !player.CCed) + { + projectile.ai[0]++; + if (projectile.ai[0] == 1f) + { + NPC target = projectile.Center.ClosestNPCAt(4400f); + + if (target != null) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ProvidenceHolyRay")); + int hex = Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 0f, player.whoAmI, target.whoAmI); + Main.projectile[hex].localAI[1] = projectile.whoAmI; + for (int i = 0; i < 5f; i++) + { + float theta = MathHelper.TwoPi / 5f * i; + int idx = Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, target.whoAmI, theta); + Main.projectile[idx].frame = i % 2; + Main.projectile[idx].localAI[1] = projectile.whoAmI; + } + for (int i = 0; i < 10f; i++) + { + float theta = MathHelper.TwoPi / 10f * i; + int idx = Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, target.whoAmI, theta); + Main.projectile[idx].localAI[1] = projectile.whoAmI; + } + } + } + projectile.frameCounter++; + if (projectile.frameCounter > (int)MathHelper.Lerp(10f, 1f, MathHelper.Clamp(projectile.ai[0] / 200f, 0f, 1f))) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + } + else projectile.Kill(); + + projectile.spriteDirection = projectile.direction = player.direction; + projectile.timeLeft = 2; + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (projectile.direction * projectile.velocity).ToRotation(); + } + public override bool CanDamage() => false; + } +} diff --git a/Projectiles/Magic/EternityBook.png b/Projectiles/Magic/EternityBook.png new file mode 100644 index 0000000000000000000000000000000000000000..1127e8d453d0b33d8704ef08bf63d36472328aac GIT binary patch literal 787 zcmeAS@N?(olHy`uVBq!ia0vp^VnBR>gAGVBvre1@q!^2X+?^QKos)UVz`%6Y)5S5Q zV$R!HzS+WoB5m_IJ%v9oM@{VVRMgXo*wC~?;Co)|5A`ec58QNqh_i^6Uz)1dqIY$w z^ipoeF0ox)SNf+Vb$KZoE-W)XvPYo>N_9^!;I)&8;U!#XL^Q z^~DQ*oN*}s&A!R-c~oKJPp6yA3(O*FK1rT`lE%2gY#ZZ@{X3Z)-X3;mFw_2?WNaKW zcOTz@-*>M&Op=_PUtaf0hT+~vSBAPR%&X$%q9rA-)zz~ltp92H?O12(o7P_&SvSN~ zaUEE@cIiCk`Exd|pIu?x{3NSJv0kp>>o2#Q12?7n8FuV{Ret*L-sfR$^TnqBJ)m11 zQzW_my7`)0vwG6Jwli9ku4OqeyIjA~&wPfIer-KlOV(@O%9Cj_wuwfIYS-NR`nzIn z?cFmi%jzpOem*6&|Nbv#l{?3;87Hj!bAZcWzfJSYNf(TdoZk?8dtwTY!@dBv1#zp7 zoLf-vbCT(Y+oxm?RE1Ssh)kSx`bJI1y2QU}7uIfDeA?pF0%L`s=))f2nU9P()}D(^ zmrVN-TNrRG-zm`O$)A5qCk6>?{j1@QuuDvxWhbmPFM{Dg(r*s#u(rSyCq^U1nG?Ew zJk*{TRjOUNp4E1@(s0S4mNmELo$;$?*gtFc#)B^n7f!JM(&N4F*yf+w3?b6Dbvy0~ zGd+md#!>R;P=)I+AB|n=SNLZJG=NM|5}w4lQ^rZyh$q`+rGcWe`TPxO_I1Lio&ile zdyMZvl}pK;AKzQ}&hJmYJAsq+L`#a39>fV6Kc(2ucP0Lpy%@hMJ5isCaT z_?&PBspFc!d9o!2H2$)p#LzcLFe#GkCiC KxvX= Main.projectile.Length || projectile.localAI[0] < 0) + { + projectile.Kill(); + return; + } + + Projectile book = Main.projectile[(int)projectile.localAI[1]]; + + if (!book.active) + { + projectile.Kill(); + return; + } + + float angle = projectile.velocity.ToRotation() + MathHelper.PiOver2; + float pulse = (float)Math.Sin(projectile.localAI[0] * 3f); + float radius = 8f; + Vector2 offset = angle.ToRotationVector2() * pulse * radius; + Dust dust = Dust.NewDustPerfect(projectile.Center + offset, 132, Vector2.Zero); + dust.noGravity = true; + dust = Dust.NewDustPerfect(projectile.Center - offset, 133, Vector2.Zero); + dust.noGravity = true; + } + } +} \ No newline at end of file diff --git a/Projectiles/Magic/EternityCircle.png b/Projectiles/Magic/EternityCircle.png new file mode 100644 index 0000000000000000000000000000000000000000..c6616b4227425d4299b2790605c4f910a9924122 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=7>k44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv|~9KvjTf@|*`QvnLeW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wKyfio7sn8e>&buq|NmdlrgGp&0~-f7 Y(B@bcmig(aYe8B)UHx3vIVCg!03Zr7TL1t6 literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/EternityCrystal.cs b/Projectiles/Magic/EternityCrystal.cs new file mode 100644 index 0000000000..2ff624e32f --- /dev/null +++ b/Projectiles/Magic/EternityCrystal.cs @@ -0,0 +1,172 @@ +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class EternityCrystal : ModProjectile + { + public float Radius = 480f; + public float DegreesToSpin = 2f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crystal"); + Main.projFrames[projectile.type] = 2; + } + + public override void SetDefaults() + { + projectile.width = 34; + projectile.height = 36; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = EternityHex.trueTimeLeft; + projectile.alpha = 0; + projectile.magic = true; + } + + public override void AI() + { + if (projectile.localAI[1] >= Main.projectile.Length || projectile.localAI[0] < 0) + { + DeathDust(); + projectile.Kill(); + return; + } + + Projectile book = Main.projectile[(int)projectile.localAI[1]]; + + if (!book.active) + { + DeathDust(); + projectile.Kill(); + return; + } + + if (projectile.ai[0] >= Main.npc.Length || projectile.ai[0] < 0) + { + DeathDust(); + projectile.Kill(); + return; + } + + if (!Main.npc[(int)projectile.ai[0]].active) + { + DeathDust(); + projectile.Kill(); + return; + } + + projectile.localAI[0] += 1f; + if (projectile.timeLeft == 1) + { + projectile.velocity = projectile.DirectionTo(Main.npc[(int)projectile.ai[0]].Center) * 2f; + projectile.timeLeft = 1000; + } + if (projectile.timeLeft < 920 && projectile.timeLeft > EternityHex.trueTimeLeft || + CalamityUtils.CountProjectiles(ModContent.ProjectileType()) > 10) + { + projectile.Kill(); + } + else + { + projectile.damage = 0; + projectile.rotation = projectile.AngleTo(Main.npc[(int)projectile.ai[0]].Center) - MathHelper.PiOver2; + projectile.position = Main.npc[(int)projectile.ai[0]].Center + projectile.ai[1].ToRotationVector2() * Radius; + projectile.ai[1] -= MathHelper.ToRadians(DegreesToSpin); + + if (projectile.timeLeft > 920) + { + Radius *= 0.95f; + if (projectile.alpha < 255) + { + projectile.alpha += 3; + } + DegreesToSpin *= 1.035f; + } + } + if (projectile.Hitbox.Intersects(Main.npc[(int)projectile.ai[0]].Hitbox)) + { + int damage = (int)(Eternity.ExplosionDamage * Main.rand.NextFloat(0.9f, 1.1f)); + Main.player[projectile.owner].addDPS(damage); + Main.npc[(int)projectile.ai[0]].StrikeNPC(damage, 0f, 0, false); + Vector2 randomCirclePointVector = Vector2.One.RotatedBy(projectile.rotation); + float lerpStart = Main.rand.Next(12, 17); + float lerpEnd = Main.rand.Next(3, 7); + NPC target = Main.npc[(int)projectile.ai[0]]; + Main.PlaySound(ModLoader.GetMod("CalamityMod").GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LargeWeaponFire"), (int)target.Center.X, (int)target.Center.Y); + for (float i = 0; i < 9f; ++i) + { + for (int j = 0; j < 2; ++j) + { + Vector2 randomCirclePointRotated = randomCirclePointVector.RotatedBy((j == 0 ? 1 : -1) * MathHelper.TwoPi / 18f); + for (float k = 0f; k < 20f; ++k) + { + Vector2 randomCirclePointLerped = Vector2.Lerp(randomCirclePointVector, randomCirclePointRotated, k / 20f); + float lerpMultiplier = MathHelper.Lerp(lerpStart, lerpEnd, k / 20f) * 4f; + int dustIndex = Dust.NewDust(new Vector2(target.Center.X, target.Center.Y), 0, 0, + Main.rand.Next(132, 133 + 1), + 0f, 0f, 100, default, 1.3f); + Main.dust[dustIndex].velocity *= 0.1f; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].color = Utils.SelectRandom(Main.rand, new Color[] + { + new Color(61, 141, 235), + new Color(229, 52, 220), + }); + Main.dust[dustIndex].velocity += randomCirclePointLerped * lerpMultiplier; + } + } + + randomCirclePointVector = randomCirclePointVector.RotatedBy(MathHelper.TwoPi / 9f); + } + projectile.Kill(); + } + } + public void DeathDust() + { + for (int i = 0; i < 20; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, Eternity.dustID, newColor: new Color(245, 112, 218)); + dust.velocity = Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(2f, 6f); + dust.noGravity = true; + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + //Variables/parameters to be used in the spriteBatch.Draw method later. + Color colorAtCenter = Lighting.GetColor((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16); + Texture2D myTexture = Main.projectileTexture[projectile.type]; + Rectangle frame = myTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame); + Color alphaFromCenter = projectile.GetAlpha(colorAtCenter); + Vector2 origin = frame.Size() / 2f; + //This is for wrapping back so that we don't just blip back to 0 after going above pi/2 + const float maxTheta = 60f; + const float pixelOutwardMin = 5f; + const float pixelOutwardMax = 10f - pixelOutwardMin; + float angleWrapped = projectile.localAI[0]; + + //The modulo operator is used so that we never go below 0 or above pi/2 in the given calculations + float theta = MathHelper.Pi * angleWrapped / maxTheta; + + //Cos(0)/2 + 1/2 is 1, Cos(pi)/2 + 1/2 is 0. So, we can use this cosine to iterate down from 1 to 0 in strength + //in a wave pattern + float rotationFactor = ((float)Math.Cos(theta) * 0.5f + 0.5f) * pixelOutwardMax + pixelOutwardMin; + + //Iterate through 2pi in 2 operations. We want to show two of the transparent crystals right next to the main one + for (float i = 0f; i < 2f; i += 1f) + { + double angle = MathHelper.TwoPi / 2f * i + MathHelper.PiOver2; + Vector2 drawPosition = projectile.Center + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition + + Vector2.UnitY.RotatedBy(angle).RotatedBy(projectile.rotation) * rotationFactor; + Main.spriteBatch.Draw(myTexture, drawPosition, new Rectangle?(frame), + alphaFromCenter * 0.6f, projectile.rotation, origin, + projectile.scale, SpriteEffects.None, 0f); + } + return true; + } + } +} \ No newline at end of file diff --git a/Projectiles/Magic/EternityCrystal.png b/Projectiles/Magic/EternityCrystal.png new file mode 100644 index 0000000000000000000000000000000000000000..1c799ffbc2b574e82ad0d7cc5db2613dc799ae15 GIT binary patch literal 974 zcmV;<12O!GP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D17k@F%A7?M(!vOW!i5wCA-y1Ip%j%B1GZ?D1a3;hg=9o! zL7CM;(;z5(B$0zfWY)-#Eex^L=6vUV)7;}+#zkjlf`0JlJ7;mn?|z9Io zPYZOx;tV*~<~Uho%X}jtoYHM1#$I=!Jew;}uSR-iMQP30lx;MaG4b|&Fh-KA?PsC- zGBy-WR5#&dz05@|^5&tUq0Mosp&?Y)R_^vcYJ?8>>Tra{&%~k z65mBky4`1>iQhHRF`@Is>zYE@UbjO_4opEgw|T1}iQhHxiL&zaC8*C^jXR8A*W_xv zjER5f7nHd2feDWPLJjepl9oQe|8)I0^-Q%X=Iak{3E zt7$3WE+e6DRTw(wE%Qy0?DA_z&5rp+i(dn(zQ}zLv#!a~al>+Rx37MCqvj6}907*qoM6N<$f_9eF4FCWD literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs new file mode 100644 index 0000000000..d760974a89 --- /dev/null +++ b/Projectiles/Magic/EternityHex.cs @@ -0,0 +1,183 @@ +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class EternityHex : ModProjectile + { + public const float bossLifeMaxDamageMult = 1f / 350f; + public const float normalEnemyLifeMaxDamageMult = 1f / 100f; + public const int trueTimeLeft = 310; + public const int extraUpdateCount = 1; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eternity"); + } + + public override void SetDefaults() + { + projectile.width = 4; + projectile.height = 4; + projectile.tileCollide = false; + projectile.timeLeft = int.MaxValue; //Killed manually + projectile.extraUpdates = extraUpdateCount; + } + public override void AI() + { + if (projectile.ai[0] >= Main.npc.Length || projectile.ai[0] < 0) + { + DeathDust(); + projectile.Kill(); + return; + } + + NPC target = Main.npc[(int)projectile.ai[0]]; + + if (!target.active) + { + DeathDust(); + projectile.Kill(); + return; + } + + if (projectile.localAI[1] >= Main.projectile.Length || projectile.localAI[0] < 0) + { + DeathDust(); + projectile.Kill(); + return; + } + + Projectile book = Main.projectile[(int)projectile.localAI[1]]; + + if (!book.active) + { + DeathDust(); + projectile.Kill(); + return; + } + + projectile.localAI[0] += 1f; + //Infinity loop in dust + for (int i = 0; i < 3; i++) + { + projectile.ai[1] += MathHelper.TwoPi / 175f; + + //Causes the lemniscate to smoothen out and look better + float scale = 2f / (3f - (float)Math.Cos(2 * projectile.ai[1])); + float outwardMultiplier = MathHelper.Clamp(projectile.localAI[0] / 2f + 20f, 20f, 230f); + Vector2 additiveVector = new Vector2(scale * (float)Math.Cos(projectile.ai[1]), scale * (float)Math.Sin(2f * projectile.ai[1]) / 2f); + + projectile.Center = target.Center + additiveVector * outwardMultiplier; + + float timeRatio = MathHelper.Clamp(projectile.localAI[0] / trueTimeLeft, 0f, 1f); + Color dustColor = Color.Lerp(new Color(245, 112, 218), new Color(28, 13, 118), timeRatio); + int dustIndex = Dust.NewDust(projectile.Center, 0, 0, Eternity.dustID, newColor: dustColor); + Main.dust[dustIndex].velocity = Vector2.Zero; + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].scale = MathHelper.Clamp(timeRatio * 1.5f, 0.6f, 1.5f); + } + if (projectile.localAI[0] < trueTimeLeft * 2 - 40) + { + float range = projectile.localAI[0] / (trueTimeLeft * 2f - 40); + float random = Main.rand.NextFloat(); + if (random <= (range * 0.6f + 0.4f)) + { + for (int iterative = 0; iterative < 12; iterative++) + { + //For where on the imaginary circle the dust appears + float randTwoPi = Main.rand.NextFloat() * MathHelper.TwoPi; + //For determining the circle of the radius and the velocity + float rand01 = Main.rand.NextFloat(); + Vector2 spawnPosition = target.Center + randTwoPi.ToRotationVector2() * (70f + 530f * rand01); + Vector2 velocity = (randTwoPi - 3f * MathHelper.Pi / 8f).ToRotationVector2() * (10f + 9f * Main.rand.NextFloat() + 4f * rand01); + Dust swirlingDust = Dust.NewDustPerfect(spawnPosition, Eternity.dustID, new Vector2?(velocity), 0, Main.rand.NextBool(3) ? Eternity.blueColor : Eternity.pinkColor, 1.4f); + swirlingDust.scale = 0.8f; + swirlingDust.fadeIn = 0.95f + rand01 * 0.3f; + swirlingDust.noGravity = true; + } + } + if (random <= (range * 0.6f + 0.4f) / 30f) + { + if (!target.immortal && + !target.dontTakeDamage) + { + int damage = 2; + //To give a bit of variety in how damage is calculated, I decided to incorporate width and height + damage += (int)Math.Sqrt(target.width * target.height) * 10; //Leviathan damage from this calculation = floor(sqrt(850, 450)) * 10 = 6184 damage + damage += (int)(target.boss ? target.lifeMax * bossLifeMaxDamageMult : target.lifeMax * normalEnemyLifeMaxDamageMult); + damage += target.damage * 5; + //The same damage value on each hit could cause the bugs channel to go apeshit lol + damage = (int)(damage * Main.rand.NextFloat(0.9f, 1.1f)); + damage = (int)MathHelper.Clamp(damage, 1f, Eternity.BaseDamage * 3); + RegisterDPS(damage); + + target.StrikeNPC(damage, 0f, 0, false); + } + } + //This is where most of the damage comes from. Be careful when messing with this + if ((int)projectile.localAI[0] % 30 == 0 && + CalamityUtils.CountProjectiles(ModContent.ProjectileType()) < Eternity.MaxHomers) + { + int homerCount = 6; + int trueMeleeID = ModContent.ProjectileType(); + int trueMeleeDamage = Eternity.BaseDamage; + float angleVariance = MathHelper.TwoPi / homerCount; + float spinOffsetAngle = MathHelper.Pi / (2f * homerCount); + Vector2 posVec = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 10f; + + for (int i = 0; i < homerCount; ++i) + { + posVec = posVec.RotatedBy(angleVariance); + Vector2 velocity = new Vector2(posVec.X, posVec.Y).RotatedBy(spinOffsetAngle); + velocity = Vector2.Normalize(velocity) * 10f; + Projectile.NewProjectile(target.Center + posVec * 4f, velocity, trueMeleeID, trueMeleeDamage, 0f, projectile.owner, projectile.ai[0]); + } + } + } + else if (projectile.localAI[0] < trueTimeLeft * 2) + { + if (Main.rand.NextBool(3)) + { + int damage = 4000; + damage = (int)(damage * Main.rand.NextFloat(0.9f, 1.1f)); + RegisterDPS(damage); + target.StrikeNPC(damage, 0f, 0, false); + int totalProjectiles = Main.rand.Next(8, 14) * 2; + float spread = MathHelper.ToRadians(Main.rand.Next(24, 36)); + double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; // Where the projectiles start spawning at, don't change this + double deltaAngle = spread / totalProjectiles; // Angle between each projectile + double offsetAngle; + float velocity = Main.rand.NextFloat(6f, 26f); + + for (int i = 0; i < 6; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + Dust.NewDustPerfect(target.Center, Eternity.dustID, -velocity * ((float)offsetAngle).ToRotationVector2(), 0, Eternity.pinkColor); + Dust.NewDustPerfect(target.Center, Eternity.dustID, velocity * ((float)offsetAngle).ToRotationVector2(), 0, Eternity.blueColor); + } + } + } + else + { + projectile.Kill(); + } + } + public void DeathDust() + { + for (int i = 0; i < 44; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, Eternity.dustID, newColor: new Color(245, 112, 218)); + dust.velocity = Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(2f, 6f); + dust.noGravity = true; + } + } + //So that the player can gauge the DPS of this weapon effectively (StrikeNPC alone will not register the DPS to the player. I have to do this myself) + private void RegisterDPS(int damage) + { + Main.player[projectile.owner].addDPS(damage); + } + } +} \ No newline at end of file diff --git a/Projectiles/Magic/EternityHex.png b/Projectiles/Magic/EternityHex.png new file mode 100644 index 0000000000000000000000000000000000000000..c6616b4227425d4299b2790605c4f910a9924122 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=7>k44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv|~9KvjTf@|*`QvnLeW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wKyfio7sn8e>&buq|NmdlrgGp&0~-f7 Y(B@bcmig(aYe8B)UHx3vIVCg!03Zr7TL1t6 literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/EternityHoming.cs b/Projectiles/Magic/EternityHoming.cs new file mode 100644 index 0000000000..8e92df58a8 --- /dev/null +++ b/Projectiles/Magic/EternityHoming.cs @@ -0,0 +1,63 @@ +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class EternityHoming : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eternity"); + } + + public override void SetDefaults() + { + projectile.width = 2; + projectile.height = 2; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 120; + projectile.alpha = 255; + projectile.magic = true; + } + + public override void AI() + { + NPC target = null; + float distance = 4400f; + for (int index = 0; index < Main.npc.Length; index++) + { + if (Main.npc[index].CanBeChasedBy(null, false)) + { + if (Main.npc[index].boss && Vector2.Distance(projectile.Center, Main.npc[index].Center) <= 4400f) + { + target = Main.npc[index]; + break; + } + if (Vector2.Distance(projectile.Center, Main.npc[index].Center) < distance) + { + distance = Vector2.Distance(projectile.Center, Main.npc[index].Center); + target = Main.npc[index]; + } + } + } + if (target != null) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(target.Center) * 10f) / 8f; + } + projectile.ai[0] += 0.18f; + float angle = projectile.velocity.ToRotation() + MathHelper.PiOver2; + float pulse = (float)Math.Sin(projectile.ai[0]); + float radius = 10f; + Vector2 offset = angle.ToRotationVector2() * pulse * radius; + Dust dust = Dust.NewDustPerfect(projectile.Center + offset, Eternity.dustID, Vector2.Zero, 0, Eternity.pinkColor); + dust.noGravity = true; + dust = Dust.NewDustPerfect(projectile.Center - offset, Eternity.dustID, Vector2.Zero, 0, Eternity.blueColor); + dust.noGravity = true; + } + } +} \ No newline at end of file diff --git a/Projectiles/Magic/EternityHoming.png b/Projectiles/Magic/EternityHoming.png new file mode 100644 index 0000000000000000000000000000000000000000..c6616b4227425d4299b2790605c4f910a9924122 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=7>k44ofy`glX(f`uqAoByDx`7I;J!Gca%qgD@k*tT_@uLG}_)Usv|~9KvjTf@|*`QvnLeW`;zRIOpf) zrskCZxeN@>MX8A;sVNHOnI#zt?w-B@DSD~wKyfio7sn8e>&buq|NmdlrgGp&0~-f7 Y(B@bcmig(aYe8B)UHx3vIVCg!03Zr7TL1t6 literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/MiasmaGas.cs b/Projectiles/Magic/MiasmaGas.cs new file mode 100644 index 0000000000..b1e7b012fd --- /dev/null +++ b/Projectiles/Magic/MiasmaGas.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Magic +{ + public class MiasmaGas : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gas"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 3; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 44; + projectile.height = 28; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.timeLeft = 600; + projectile.penetrate = 10; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 3; + projectile.magic = true; + } + + public override void AI() + { + if (projectile.localAI[0] == 0f) + { + projectile.alpha = Main.rand.Next(35, 75); + projectile.localAI[0] = 1f; + } + projectile.ai[0] += 1f; + if (projectile.ai[0] >= 360f) + { + projectile.ai[1] = 1f; + } + if (projectile.ai[1] == 1f) + { + projectile.velocity *= 0.9865f; + } + projectile.rotation += projectile.velocity.X * 0.0003f; + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.ai[1] = 1f; + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 25; i++) + { + Dust dust = Dust.NewDustDirect(projectile.position, 48, 30, 189, 0f, 0f); + dust.velocity = projectile.velocity.RotatedByRandom(MathHelper.ToRadians(39f)); + dust.alpha = 127; + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Magic/MiasmaGas.png b/Projectiles/Magic/MiasmaGas.png new file mode 100644 index 0000000000000000000000000000000000000000..153a63122d8350d2b9fcb0730dbd8d2d60b3c067 GIT binary patch literal 544 zcmV+*0^j|KP)#cz8A#s&67^ut z189a_AU%oV6R@0@IWMy2zDxTDR{+!&W;}q_Q}4%kO{h2o#A&VC!VCbdr(P!KW$x>E zy(TPKyH@@QB(11=pSK)!N%AbY2x$_zCs0aTQAM5WI{>QDv#SEjdreUKS>CFT&6oH_ z^n7^Q?!$;g{t1ZlNh_*2S6!(9BL@*8QMCvaOJz|gs7v4 z6^DRpU$>kP2Q9~wI;-2Y)1u)x;h-+$pMdPAvZ@Irjw2 ze<7*JNu9UWz@+4Ke}(-Q@-9zyfYHgwb@Ix(7LLNtvF+QzG?3i+!kh<69}ntYX0#?^ zyOSkx&Lwfa><>= 255) + { + projectile.Kill(); + } + } + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Dust dust = Dust.NewDustDirect(projectile.position, 10, 10, (int)CalamityDusts.SulfurousSeaAcid); + dust.noGravity = true; + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Magic/VitriolicViperFang.png b/Projectiles/Magic/VitriolicViperFang.png new file mode 100644 index 0000000000000000000000000000000000000000..b370b7816ae1df07b0c9bf5e74aeabddf9891593 GIT binary patch literal 418 zcmV;T0bTxyP)Px$TuDShR7i>KmcL5_F&KuQXh8?N7H_CMt0JhQOEV-zh&n@;!OK36-)3B=h;{0RX#u$A2!6nBaeb5mgu`m71F{fnoHC~KrBqy-lZ};Pjwin(~LAP3QdhMP2 z+c@YnHNlqA7XrH)?g%84NW8FRSHryrCl?<81m(Cdd#@f{83ZDC1hq!XnkpK-;oH5A zGozdkC~M4kl`BCVfW@4r0J={Dw*)`g<=bczY^>!Kz|CCPx$BuPX;R5*>bls!vAQ5eU6C$&K##d3NF?!&Wlx8xM}yx$A0Y?{v+H>6MfKIJ-R8_IOyXXcg3*CIG9^MZ-P1 zgPs;pJt>m6x0kOEjEEBx^SRQvia#a(r12h?W20%=wW 0).ToDirectionInt() * MathHelper.ToRadians(8f); + } + if (projectile.timeLeft % 12 == 11) + { + for (int i = 0; i < (projectile.ai[0] == 1f ? 3 : 1); i++) + { + Dust dust = Dust.NewDustDirect(projectile.position, 10, 10, 27); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi); + dust.noGravity = true; + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + CalamityUtils.ModifyHitNPCSticky(projectile, 8, true); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (targetHitbox.Width > 8 && targetHitbox.Height > 8) + { + targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); + } + return null; + } + } +} diff --git a/Projectiles/Ranged/EmesisGore.png b/Projectiles/Ranged/EmesisGore.png new file mode 100644 index 0000000000000000000000000000000000000000..85ceeb45846605849275f5bbb0d7e0add5e19833 GIT binary patch literal 253 zcmV6}HT!L8INCJwTBd9?mX4E{3 z_zFwksV>~&gLAT8ZxdvB0Y0Zw(5R~bw-3*t-CD{Z_s`6Q`YAxZxCV;f$KzxI_P09V z{OUTS3Gp~S+yU$5JUBbO0E4?Xu(I5eBxHNryWqZR1n3_$L8m>Fj!s74`*n~g#2sQ= zF&pKqotu{hFdSYc3ae!oj6Z5njmCeZ*v|V`k+$>?gH<+?zvJDd00000NkvXXu0mjf D(co$J literal 0 HcmV?d00001 diff --git a/Projectiles/Ranged/ToxicArrow.cs b/Projectiles/Ranged/ToxicArrow.cs new file mode 100644 index 0000000000..d3c2b49446 --- /dev/null +++ b/Projectiles/Ranged/ToxicArrow.cs @@ -0,0 +1,56 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Ranged +{ + public class ToxicArrow : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Toxic Arrow"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 32; + projectile.friendly = true; + projectile.ranged = true; + projectile.arrow = true; + projectile.penetrate = 1; + projectile.timeLeft = 240; + } + + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 32; + projectile.position = projectile.position - projectile.Size / 2f; + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 92); + int count = Main.rand.Next(6, 15); + for (int i = 0; i < count; i++) + { + int idx = Dust.NewDust(projectile.Center - projectile.velocity / 2f, 0, 0, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 2f); + Main.dust[idx].velocity *= 2f; + Main.dust[idx].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } +} diff --git a/Projectiles/Ranged/ToxicArrow.png b/Projectiles/Ranged/ToxicArrow.png new file mode 100644 index 0000000000000000000000000000000000000000..a791e861f1d18dd1cf2df386b9c7bd6fbb8a3e6f GIT binary patch literal 428 zcmV;d0aN~oP)a6a$=Xd#X&ON^nsx^N`HgN_FsN~S`GeB$STckVXgb|Jp zU2+afcW;2j2QMORez=!Ltdyi|Yy`A+zk>SYU?l9;r4d7KZ+8}E!S&feiV%PXrnT)9+CcX?$ss(<*Lx;f?Ub$$(jsfn|Z zpv(`xAEFPt`XB$X?4iAP5D7MSzJQ^@fj$vScMP8%EyzC#!}V@Vx86x3hMCLP!20&v z9B$9w1fTZbfb+vw!K3F-!1TqLG(Uz=t>v(I>mF!-+ypOMTVO70fbq#Gu=M!8B;sFw zTyGcuwz2UVT&Rvj#4^%}WpB;3X9Z!j9**)HrpIH~q))Ys##k0$YqwSAj`B!%V&ZSw WQ*g+?Fk)N)0000= 8) + projectile.Kill(); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 8; i++) + { + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid); + } + } + } +} diff --git a/Projectiles/Rogue/Corrocloud1.png b/Projectiles/Rogue/Corrocloud1.png new file mode 100644 index 0000000000000000000000000000000000000000..6f588c2551efb6396e15869950efeb97acf13c45 GIT binary patch literal 1543 zcmV+i2Kf1jP)Px)!AV3xRCt{2oK0w4RTRg6FOzoCWSS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yA|Sa~XQKXnY>$#WID=wM30Oia);f z2>{_iKAnu^+I|rKF3O57xF&E%u@EfB&R{mqsU(}6?z`90BLiGi-1Sb&ZTSuyc&qsw zr;x|+%v^$LoI5{PAH{_WRe6r%!UJ(=x5%)KV~@w<@wm^+mw}Xi9;YZR<(UNc6pM$_ zgsC6PD<`lFy= 8) + projectile.Kill(); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 8; i++) + { + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid); + } + } + } +} diff --git a/Projectiles/Rogue/Corrocloud2.png b/Projectiles/Rogue/Corrocloud2.png new file mode 100644 index 0000000000000000000000000000000000000000..761490cc8d2c18fb11423a61cac58ae25ed82d70 GIT binary patch literal 1511 zcmVPx)p-DtRRCt{2n?YzCRT#(rli8SL6O&@2#)1Khh~Oolg`lJr^i-kV>P-c~n@7Qu z2T#5CCMfF7+$_|S9;y@yR>?(_9x6nrTa%PD&2F+B}B6XWU8 z2mm@;ySehBEfAh!00{s*J~?9!7DjXRwy&?}j^mNow7`BRSMF+o@)e(1SOfq(@$6Fo zfVdSU05J91ECAr#Qr&uipDy1A06b{k&z09=GY0lLW(-K>r75n-f_s1en*hLb7hWoK zfwLdYq<@*uLoL9&!TPKSN3n}*KeqsM_q8m~M*ns5(QfZpuNR);XvK_1dH+(OM3%2@ z+ywyCCnl}+!%;k0pNatB_UbJ&x)+L#Zt~Za-_3PSO-BIGyt8GkSN@ZW@Ci0~Y8n90 zyt9=6!0GuH0Ce{`$HMK^TRbnP^p}+z)*lW>G0BwIrvL!W*0yzCCL9~h);0jQQWBnG zLghvADJ7*TRurZB4DA+ugzF@v!gwSG0Ce^{)>*0c^tf>fcX#aHpM1=Gzwrn_Ku#j^ z`C*@1q_>jr`)6LPM*#58pJo+G<>jq1JDtqWTK(`@mrGokIXDRxH@P$q0JwT-H31Hk zpNDDT^7{D9!lHE*>GH!8I*2bnUdok!edE{M@zqPK*>3_NI0-pwUA(vWGJtMH{njhL zk9`pUpD&h3_sILY-QEeLk6nJ4xO}mz9$SLP(l3{tBN@clqV=M)m8j zz6s#K4e|*lDSDq1Djh#*p3yrSrUmG&%IjnLSsD8vYysb>Cvr?krKJ2dm-NBoV-o;? zo%X|?eNPwzA-)Jf`HCg|#z4l$Cd}wxeayW`zj)9}Ms9R(`S01^1#atKDJDrBzIruyj z%cWavZ8UTB%2UjBaMAU1<=vupj{uQAnMju?uS2&eDSrh*d_Gy?a*5>ly2YX{k*Hf# z6h%>-{BOG=d^^j-nU7r&0y1pugM_CTY5HGA2!@S)kZ{)35~=8|Pv&#S(k-$js=uS$ zM-~T5v#8bEQBI^Ec0~qQ&JL~4j&dShqboun$@W=S#w`+8Zc%1c`^}<~@DvkYR<++O zDhXFH@%d!+$BLpT%8}umo!+_dE&w2zOXrdCwCV}Ryt27(KGQArQNtX6d*vHz^>9|1 z7eD;~05DrK3fFHwN&sv2g{@^IrY(`J!{dr3XXJFo1hS z;#-M?Hy``lqQwnX-8(h1oI}yI)iGIf`QF+qx{j8Fr?@Ns)DU^5A<-+!! literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/Corrocloud3.cs b/Projectiles/Rogue/Corrocloud3.cs new file mode 100644 index 0000000000..20a2041dba --- /dev/null +++ b/Projectiles/Rogue/Corrocloud3.cs @@ -0,0 +1,57 @@ +using CalamityMod.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class Corrocloud3 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Corrocloud"); + Main.projFrames[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 32; + projectile.friendly = true; + projectile.penetrate = 4; + projectile.timeLeft = 600; + projectile.Calamity().rogue = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 8; + } + + public override void AI() + { + projectile.velocity *= 0.99f; + projectile.ai[0] += 1f; + if (projectile.ai[0] % 7f == 6f) + { + projectile.frame++; + } + if (projectile.frame >= 8) + projectile.Kill(); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.CursedInferno, 120); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 8; i++) + { + Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid); + } + } + } +} diff --git a/Projectiles/Rogue/Corrocloud3.png b/Projectiles/Rogue/Corrocloud3.png new file mode 100644 index 0000000000000000000000000000000000000000..13d7443906173a0cbce327969595d4263134d2a7 GIT binary patch literal 1635 zcmV-p2AuhcP)Px*9Z5t%RCt{2n@?yIR~*MbV`4TYCMLC^iHAfzw4#LuT0tmQsPxi;y|vIoTiRps zR0=)y(39X%N)J-7-t^Xhy_6P`AP5pz1VyCyXAk{DjMbQ|i6)sI-u^Z_zkP3KcGoa( z<$YjbXXnkl`Mx*v=J)-*w-5-tXhdlR-ar0fTNV8J`!Cktx3zWFHgGByrQN%G09adi z8r#Z^PwtEWO2wtb{_fp9QRO(GUU_bcyY&yEbnHMM0Ds>s#{fIuei?vcNBa`xFP$pI z03Uoi4#4zm8GxnB_oW4_t?G|rL6nLT;j<%e0`T*dIbgFT1Zj~=m(BL->WcOJ{wdZ- z-@#nscirbwZhqlk017-qdqyj)%aVD#W{1od~VAj(9sY)8dsiE^t?SFIKMqqzKJ z8Gze!%Q3*d6NdnpIrGT;Ub>}@IF#6mC%2m~rN$Neqgd$QGZ+EfnYx}BgL?}*%t&O0 z=(_#-_~pMAt>^de?R0qZ$aAUSYVnHo_uLc*0)fsaHLlKz%Q3j{XRLO`)h@;k^hK3&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ToxicantTwisterProjectile.cs b/Projectiles/Rogue/ToxicantTwisterProjectile.cs new file mode 100644 index 0000000000..d6a0533f7d --- /dev/null +++ b/Projectiles/Rogue/ToxicantTwisterProjectile.cs @@ -0,0 +1,69 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ToxicantTwisterProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Toxicant Twister"); + } + + public override void SetDefaults() + { + projectile.width = 42; + projectile.height = 46; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.penetrate = 5; + projectile.aiStyle = 3; + projectile.timeLeft = 180; + aiType = ProjectileID.WoodenBoomerang; + projectile.Calamity().rogue = true; + } + public override void AI() + { + if (projectile.Calamity().stealthStrike) + { + if (projectile.timeLeft % 18f == 0f) + { + for (int i = 0; i < 2; i++) + { + Projectile.NewProjectile(projectile.Center, + (-1f * projectile.velocity).RotatedByRandom(0.1f) * 0.6f, + ModContent.ProjectileType(), projectile.damage, 0f, projectile.owner); + } + } + projectile.rotation += 0.125f * (projectile.velocity.X > 0).ToDirectionInt(); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[projectile.owner] = 4; + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); + for (int k = 0; k < 10; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, + projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid, + projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); + for (int k = 0; k < 10; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, + projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid, + projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + } + } +} diff --git a/Projectiles/Rogue/ToxicantTwisterProjectile.png b/Projectiles/Rogue/ToxicantTwisterProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..f54ead37b4a1fd475f4c0f00b16ad6ef2c9995dd GIT binary patch literal 1157 zcmV;01bX|4P)Px(KS@MER9J=GnN4q7MHGgg$%h>$PMkPtlGY?mDIro}QFfIIMMYv)sX{_x#exmu zPxL>qL1M?I3y|1UDyvE$S{6k@C{m$PlmJPKo9_?DiG!WQm&M#S&P;sczy=NPCcZQF zIQO|{-gC~_5X+=;dKqy{mxlTcz)E=+fXQn!LI`pC^-3h>MbsvC_ufGAngSq+W_&D+3foukV+iy()aDTcU0YnG0O}|LQ zO)3vSRNDZ~PB<8%MzNWSW3MpS7XiHc%7pXAZY>8hO>NNl_*2+L@vOy7znoZ<}Ezu7q2LR|kp9Y|^Xm_;;OSi7N_dGjqN#A@s z?~IG^y+<xe91AYh^${=n+?3IHG7 z7OZ~Zx}ck zL*ISB(R3k^R4$h;j#__QSSmFom!x2ccJ!n>4Zyj)t)fib-ubPo?yf)Pb3nsy-x;wP zYbG9-PfFV58dr{&{(tr8%VS4%r*r3$2wWKHvGwEXft{#Vox0U`3EzkP^=J{JzJeio zA~X3hbX18imzyr|>a|_~im@9!`Sk_>?_d8JfXRuhv+iInW4qPTp4JE8#ag*(T}(_q zNTN++Mm>!*n6sHhL{zbh-00Xtpy9&>uO3}5*PV4lGHGu}!4N(3&P#F!-MLRhJ(D^D zxq_d$l1N5v?FL|V!`2kx5za3P6LXdM-&ZEq(ED$+<4AgqrJ5nR5vB z_gQjVyEXe14(+aASh6vc>B<^_TIcx)ppdo%zna|yPF7=bi%-9P3^b}X)wPVj4!}1* z{Q?9;^t2dtcDH|aG?3{s0M)u3uT*OhG-6Zrsk&J8Tp}sS9V8LFG-6L^+Du!xndwxC zOl8p$*SV=Al9JyUv?BS#GkdLAg_1KL4AI0G^{W~`gGheA-%9Ga6vI>f6`eEZK5=EVKbGB?eQIn5k`HTM zzk5|H)+K@=`j2|+<4USqO^1!Sfi6pAV`tOJV4FL824Fvqz5X5>`^AmsXH!uvunPZg X)q%k0&^uSZ00000NkvXXu0mjfyYenP literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/BloodBreath.cs b/Projectiles/Summon/BloodBreath.cs new file mode 100644 index 0000000000..bf4e0858d3 --- /dev/null +++ b/Projectiles/Summon/BloodBreath.cs @@ -0,0 +1,80 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class BloodBreath : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fire"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 6; + projectile.height = 6; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.penetrate = 2; + projectile.extraUpdates = 3; + projectile.timeLeft = 40; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 9; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.77f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.08f / 255f); + if (projectile.ai[0] > 7f) + { + float dustScale = 1f; + if (projectile.ai[0] == 8f) + { + dustScale = 0.25f; + } + else if (projectile.ai[0] == 9f) + { + dustScale = 0.5f; + } + else if (projectile.ai[0] == 10f) + { + dustScale = 0.75f; + } + projectile.ai[0] += 1f; + if (Main.rand.NextBool(2)) + { + for (int i = 0; i < 1; i++) + { + int idx = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 5, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); + Dust dust = Main.dust[idx]; + if (Main.rand.NextBool(3)) + { + dust.noGravity = true; + dust.scale *= 3f; + dust.velocity.X *= 2f; + dust.velocity.Y *= 2f; + } + else + { + dust.scale *= 1.5f; + } + dust.velocity.X *= 1.2f; + dust.velocity.Y *= 1.2f; + dust.scale *= dustScale; + } + } + } + else + { + projectile.ai[0] += 1f; + } + projectile.rotation += 0.3f * projectile.direction; + } + } +} diff --git a/Projectiles/Summon/BloodBreath.png b/Projectiles/Summon/BloodBreath.png new file mode 100644 index 0000000000000000000000000000000000000000..a3192f94614dc2f6790aa57e1c0aa31cc0d6ee18 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^Y#_`5A|IT2?*ZZ@dAqwX{0G4WdzViJif|TqL>4nJ z@ErkR#;MwT(m+A>5>H=O_6KY%{Dx*XIN1&Zg+x7F978y+C;$2X-=5j*z>x;#3(iao Y`*N8%pC){&2P$CjboFyt=akR{0HAOs6#xJL literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/BloodSpit.cs b/Projectiles/Summon/BloodSpit.cs new file mode 100644 index 0000000000..e9601a6e31 --- /dev/null +++ b/Projectiles/Summon/BloodSpit.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class BloodSpit : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spit"); + Main.projFrames[projectile.type] = 3; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.timeLeft = 150; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 6; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.77f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.08f / 255f); + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 15; i++) + { + Dust dust = Dust.NewDustDirect(projectile.position + projectile.velocity, projectile.width, projectile.height, 5, projectile.velocity.X * 0.1f, projectile.velocity.Y * 0.1f); + dust.velocity = Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 2f); + dust.noGravity = true; + } + Main.player[projectile.owner].HealEffect(1, false); + Main.player[projectile.owner].statLife += 1; + if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2) + { + Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2; + } + } + } +} diff --git a/Projectiles/Summon/BloodSpit.png b/Projectiles/Summon/BloodSpit.png new file mode 100644 index 0000000000000000000000000000000000000000..06cd860ae2e68581bf65bf61500eea8b21d11984 GIT binary patch literal 639 zcmV-_0)YLAP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0u)I^K~zXfy;jLe z13?g-c1+?D69_0G;z1O}t6l{01H1^HytrNb1HZyQ@Z!$|yeQs+;EIX?_l&s2sO{97 zt}!-=sn+0wH`UcW^QOAGt7p{q*px>|4RpgY+KfNEu>sqHs{pZL2u+vl)EJz~b)d*T z?VZCHE5}+nq_Dzpq z{pB(0^|c>kW5`#=*oJVrk!BU|>>9wh`>XGcZxr#NSOVEM!}1v8C+zwTfw74~9*%pA zRlqEx<`?8K+I4Ni{WPmmw0F_BIR7+j2E8GEi@RbblT<{i9jktzELTjuJbT0-c-2JH z57laAu_ApHpfbKPi4MlWehIdeFTlzb!#qO+002ovPDHLkV1hm&DiZ(z literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/CryogenShieldIce.cs b/Projectiles/Summon/CryogenShieldIce.cs new file mode 100644 index 0000000000..359e61a201 --- /dev/null +++ b/Projectiles/Summon/CryogenShieldIce.cs @@ -0,0 +1,36 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class CryogenShieldIce : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Icicle"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 28; + projectile.height = 60; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = false; + projectile.tileCollide = false; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + + projectile.ai[1] += MathHelper.ToRadians(2f); + projectile.rotation = projectile.ai[1] + MathHelper.PiOver2; + + projectile.Center = player.Center + projectile.ai[1].ToRotationVector2() * 230f; + } + } +} diff --git a/Projectiles/Summon/CryogenShieldIce.png b/Projectiles/Summon/CryogenShieldIce.png new file mode 100644 index 0000000000000000000000000000000000000000..8d93534e6c3f3e4c7aa024e67d4bfca9af097352 GIT binary patch literal 834 zcmV-I1HJr-P)Px%{7FPXR9J=0m`z9&VHn4MV;@qst8SZ!p=PFp29jo7`XD+)MMTgc$PNjGr!IYf z9Xqs81mUruE)pGtgs`AfnGhKz9g=7(X*X<0Meg60MOrkMKy)13YOLTKWL@jj=Rry0x-}O6JjHm z1%pfIRAFQTkoDTHm%%5jJaPhnWM5BCUIw4A?c`hv|y%{O-d zxX^Oe(@TAXkx(N5tD_|V%%&$i2X;UBV!M|rB2sy&-^0Yqrx}1lw;y^AtgfvC;Opl& zkj+F+FDsgN*u2a;p&{NCtuF&$=EszLXnV*dOO;IEU7+1tY?UA z$4&vTs;0?v;I5;Gm$i_P=08docxU_K@5npby;Ox)j~)YA@0^}F<@7lJgc6nFol|ns zR>?^qQT@HI$F;xyOe1oV35o2(*y-!8{f2H`2B5UM!2p>1{R@DC0&^)X`_Sg$Ql5z< zItRL9w)V8;VJbejXf4n|Sh;CGpw6M?4c_}KX+@*zpLufb`21R+X&>4e(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.providenceStabber = false; + } + if (modPlayer.providenceStabber) + { + projectile.timeLeft = 2; + } + } + + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + if (potentialTarget != null) + { + projectile.ai[0] += 1f; + // Alternate between normal charge and slower charge/knife summon + if (projectile.ai[0] % 160f < 100f) + { + if (projectile.ai[0] % 90f < 30f) + { + projectile.velocity *= 0.99f; + projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(potentialTarget.Center) + MathHelper.PiOver2, 0.15f); + } + else if (projectile.ai[0] % 90f == 30f) + { + projectile.velocity = projectile.DirectionTo(potentialTarget.Center) * 20f; + } + + else if (projectile.ai[0] % 90f < 60f) + { + projectile.velocity *= 0.99f; + projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(potentialTarget.Center) + MathHelper.PiOver2, 0.15f); + } + else if (projectile.ai[0] % 90f == 60f) + { + projectile.velocity = projectile.DirectionTo(potentialTarget.Center) * 16f; + for (int i = 0; i < 3; i++) + { + float angle = MathHelper.Lerp(-0.3f, 0.3f, i / 3f); + Projectile.NewProjectile(projectile.Center, projectile.velocity.RotatedBy(angle), ModContent.ProjectileType(), (int)(projectile.damage * 0.6), 1f, projectile.owner); + } + } + else projectile.velocity *= 0.99f; + } + else + { + float angleMax = MathHelper.ToRadians(23f); + if (projectile.ai[0] % 160f == 120f) + { + float angleStart = Main.rand.NextFloat(MathHelper.TwoPi); + for (int i = 0; i < 30; i++) + { + float angle = MathHelper.TwoPi / 30f * i + angleStart; + Dust dust = Dust.NewDustPerfect(projectile.Center + angle.ToRotationVector2() * 10f, (int)CalamityDusts.ProfanedFire); + dust.velocity = angle.ToRotationVector2() * 5f * MathHelper.Lerp(1f, 0f, (i % 6f) / 6f); + } + Vector2 positionDelta = Utils.RandomVector2(Main.rand, -12f, 12f); + + while (positionDelta == Vector2.Zero) + positionDelta = Utils.RandomVector2(Main.rand, -12f, 12f); + + projectile.Center = potentialTarget.Center + positionDelta; + projectile.rotation = projectile.AngleTo(potentialTarget.Center) + MathHelper.PiOver2; + projectile.rotation += angleMax; + projectile.velocity = Vector2.Zero; + } + if (projectile.ai[0] % 160f > 120f) + { + projectile.rotation -= angleMax * 2f / 40f; + } + } + } + else + { + projectile.rotation = projectile.rotation.AngleTowards(projectile.ai[1], 0.05f); + Vector2 destination = player.Center + new Vector2(0f, -120f).RotatedBy(projectile.ai[1]); + projectile.velocity = (destination - projectile.Center) / 40f; + } + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + } + } +} diff --git a/Projectiles/Summon/DazzlingStabber.png b/Projectiles/Summon/DazzlingStabber.png new file mode 100644 index 0000000000000000000000000000000000000000..0a22d893bf07ab572040e9735f46f7d0a88b014e GIT binary patch literal 1497 zcmV;~1t$85P)Px)lSxEDRCt{2oNa6rMHt6_TX`!6@HoL<+tgEOZ7RmJLDH1e079(Rs>H;ENK8l+ zO*Ci%Bz`c45Bf<+d`*;)7)S_TNH8j~p-_#4N`e-_fWM`zi+ zTibFw%KX3F&d%&J`QI}$H}{)fEi&kZ>Q?}$nm-qSrk2Y#Kxur21+cB*Bmjxd{b}Rm zWa?<5G|8_*I(Z;g06jWI zDH|ZK?0KcW#u;U9XYFVA+5l5?ax8$@v?)q`R!5yZ`o`eM2mpoA*#N948w74TsBz7k z)nx+!G#Q9LBjEfDP0T&e&DCL6}E&*Y# z4388SDzC>|F9J}vQp~U8I~$bx&vw-VnctD@tqhgXS;{C$jkYBVm4@rL?e+|?y6SPI z+<3GFfcD;g<$hKj0Wj$J>g-eJfgDA0^z3;{IH>*nuxGv0lpMwEuo(_zm5Y1&x;iGd*?Oh@r(1c0{gqzyN7P*Rxh89>e#nWK0#VmZ$PVLFnM&Z5)B zYTVuDy&Ag}oi09MyZglakxrz-b0j65t$TBUczxDcK^E7E20wiVz~=9-Spb{A5a0RS zPNc$jBxV2op17Es@13j59TtFf-v?>q==*I#`;Id1y_3f-01%nwTn;BdK^ru3Saz(dD-0e&1(C zOP{q)%Kq_b?*L1F2=si`92x1az@tu*Nw>Z^uszW8`m79@NPeu9~!ksAz{aQC}JzFG=EXRBB{%0GG;fFm1r0FYNa)dI+Wy)kVZeRisytzyqG?~P>&ft2Ml zU+xRkkv@*fYiEj!=v~VF8BRG>zbSnjeH;-l5wE}hqRt~(j+Z#OOV3vIag;nGR^iC9 zI<>-amfUwJP)GVW8n`hXxVaL@Q6^7Y@|Hgus3UzGbvFC~q&b^#>N827)mzG(O@t;x z@(syPDSSs#hU6QPKjAVYKP5x*4apy~49Pbn-;n(A%aD9S@(sx!zwRKCzwU`R041e& z1F&XgktfODvh#ukaQb8~0Goeq^Nbh1qvrLCVorsO4BO9MH*@^DR2!MY8_EO+{Uzory00000NkvXXu0mjfKT_aT literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/DazzlingStabberKnife.cs b/Projectiles/Summon/DazzlingStabberKnife.cs new file mode 100644 index 0000000000..1a91201342 --- /dev/null +++ b/Projectiles/Summon/DazzlingStabberKnife.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class DazzlingStabberKnife : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bullet"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 24; + projectile.friendly = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 8; + } + public override void AI() + { + Lighting.AddLight(projectile.Center, Color.White.ToVector3()); + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + NPC potentialTarget = projectile.Center.MinionHoming(750f, Main.player[projectile.owner]); + if (potentialTarget != null) + { + if (projectile.Distance(potentialTarget.Center) > 70f) + { + projectile.velocity = (projectile.velocity * 19f + projectile.DirectionTo(potentialTarget.Center) * 17f) / 20f; + } + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); + return false; + } + } +} diff --git a/Projectiles/Summon/DazzlingStabberKnife.png b/Projectiles/Summon/DazzlingStabberKnife.png new file mode 100644 index 0000000000000000000000000000000000000000..35d51ec4d171702ed066f0efcd1ce5c6b87288c2 GIT binary patch literal 408 zcmV;J0cZY+P)Px$Qb|NXR5*>T(y>d_aTv$(*Ds_lr8v8#^Nyh4T5OFVxv4D)ba4tL(AD}U+8WF` z2&CO1Xp08Xp$Hs28XP1!JqeC}1epl&bNJqu_&P-NyU+AI51)tk_rv$eoYVZHr{G8a zy@0FL@eJ19zD#@<&M*F}Mq)A3o(HXZ1$-O71u8`j>enBD-qHIZ5u-kT=@qd4JP;=4 z)(U7`yOIT>lEj#8@@5ru_VUDVuhjs*UBaKN zumhTnJK)_`AUyO2Y^$alCtsB!X7$R&BAHa%;MKEbu(+}s=J`fqD^GlK|1OwpH4{T; zx102@w>}Mt81-Ud7Oa2x2yQng5>iwtB52mae|7uef~IbS8{OPL0JX8v4EjHh%MnL< zC#Rw6=YKUuQuP0S##qFxwb9FgaQv$n^x2>v4)F}K!(xPtik0C20000 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + Player player = Main.player[projectile.owner]; + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] = 1; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + bool canExplode = projectile.Center.ClosestNPCAt(MinExplodeDistance) != null; + if (player.HasMinionAttackTargetNPC) + { + canExplode = Main.npc[player.MinionAttackTargetNPC].Distance(projectile.Center) < MinExplodeDistance; + } + if (canExplode) + projectile.ai[0]++; + if (projectile.ai[0] >= ExplodeWaitTime) + { + if (Main.myPlayer == projectile.owner) + { + // Goop projectiles + for (int i = 0; i < 3; i++) + { + Projectile.NewProjectile(projectile.Center, + new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, + new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); + } + // Normally I would do something like mod.ProjectileType($"FrogGore1 + i") in a loop, but I suppose I'll let it go. + Projectile.NewProjectile(projectile.Center, + new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, + new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); + Projectile.NewProjectile(projectile.Center, + new Vector2(0f, -Main.rand.NextFloat(6f, 10f)).RotatedByRandom(ExplosionAngleVariance), + ModContent.ProjectileType(), projectile.damage, 3f, projectile.owner); + } + // WoF vomit sound. + Main.PlaySound(SoundID.NPCKilled, projectile.Center, 13); + projectile.Kill(); + } + projectile.velocity.Y += 0.5f; + + if (projectile.velocity.Y > 10f) + { + projectile.velocity.Y = 10f; + } + } + + public override bool CanDamage() => false; + // Don't die on tile collision + public override bool OnTileCollide(Vector2 oldVelocity) => false; + } +} diff --git a/Projectiles/Summon/EXPLODINGFROG.png b/Projectiles/Summon/EXPLODINGFROG.png new file mode 100644 index 0000000000000000000000000000000000000000..5bf153c3d9c56c5b1d5c580c4d143b7e9b2ce5d1 GIT binary patch literal 1250 zcmeAS@N?(olHy`uVBq!ia0vp^IzZgR!3HGRXL!E{QjEnx?oJHr&dI!FU|^Z!>Eakt zG3V{9gV{2nGRN(Ox8+7%*15aHbSr1?Qa7RK0{%yC94(8c&8sqabg~40Vp#af;MX5(1|He{x2`mw@0rW|;N+oq0l%lNu4gRxR&4xT^<}H;B?FVUuy$r&Yn;@z$aEA;Ho&Jf)Ayy*3|Xt@J_9;q_a?Xwa8xd-UIi7E3f z??it;_UTFZ!q*EQ|1EtVKl^pssdcKlC#04bB=kLA>dkxh=@(TU_1%B+*DG|!?I|<9 z^6!vgr2cG69nVv9wypLM+9b9xg-`b8+`4|r!fL(c<_|4?eS6!PQ~&?VmU^}0$qWDe zbltox!u!JW-}&+^3fC(wuhbR22xK_sZ5-Or_r|YYuYG^?OaF>pe*_tR{yFWCTe@L= z?h^a!nd_EH-3a+()nm_OB&5!%uA6eZtYX5Umc8y(XQh(9U0Bi6SQ~BXeJ>^^JYhSTQF8qGZk0I0N#_f4iKcCp1ve4i|$z66|pW2Y~0SxJO}2N|9w37_QHR=ziTn*gdf^J<&3t`UN?x&+(|gm+*k|Hz`cIt=DBUnQ zPoy;4ZsxhWX=@7}f7_~cAYgyw)ZTrO_pLdCT(7J>I$`5v-g_Lcs@YbGm2E1k-(iRON`P2lad zM>mS{&RSo&9NqfBeoFibm3Flwp}hw-woVpdzVhq4PC$0elB%BRX-;py&yVK5#&lNj z`Hd@U7v`M>dOl`x-dR&9wJZOuY21-@TBX^uJ)aeP7i35iS99LIYEqf+QA<^}dyQ8DdruSu0=HSIE;-*)%b3pHzyk{w%ntxOY7@7#K%<*~;qsmAEr zuYOu6{1-oD!M(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.endoHydra = false; + } + if (modPlayer.endoHydra) + { + projectile.timeLeft = 2; + } + } + + Vector2 returnLocation = player.Center; + returnLocation.X -= (18 + player.width / 2) * player.direction; + returnLocation.Y -= 25f; + + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + if (potentialTarget != null) + { + if (projectile.ai[0] != potentialTarget.whoAmI) + { + projectile.ai[0] = potentialTarget.whoAmI; + Main.PlaySound(SoundID.Zombie, projectile.Center, 53); // Ethereal whisper indicating a new target has been spotted. + } + } + + projectile.frameCounter++; + if (projectile.frameCounter > (projectile.ai[0] == -1 ? 8 : 6)) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + projectile.Center = Vector2.Lerp(projectile.Center, returnLocation, 0.25f); + projectile.direction = projectile.spriteDirection = player.direction; + Lighting.AddLight(projectile.Center - Vector2.UnitY * 21f, 0.25f, 0.865f, 0.825f); + } + + public override bool CanDamage() => false; + } +} diff --git a/Projectiles/Summon/EndoHydraBody.png b/Projectiles/Summon/EndoHydraBody.png new file mode 100644 index 0000000000000000000000000000000000000000..8f492194577dd48cc82a98f97a035b9a14dbdbf1 GIT binary patch literal 5104 zcmY+Ic{o&k*vAhlvX)3O$eK(NB1}?Qhb&=)EIp0ov1S(!hEfx!>lYfHz>58dY&Ir~k3rel7E>)CBCGs!Uhq>F!xZYEv~e;b*1nmIoX;C~%E z91u6;X$OnLwVjN$6=tX=nI$EA^oTn>8tArt#CPqVL+{1wK~(BQ)} zmcPGNw?}DO3}-Q3ldG_1{dT;MD*JuBJ==1*$H%gLQ_i!XynyH2%)|Sh9S2Y!ZslC< ztn-CbeA|;cH)5vIPHhMkAHt8Xxe)vvB1=do;$()>|D_zXR_H*8w9+B9q3TQDLig5z zk0HGP(9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^-;Ki6$Vtw*H>XkRP8SPhe6K!H6YRw^!0pZ$5_<4#Ln(o#Wdf4ereWm71Pct)VR zATg>^4Ml_aH%OVNxYMas<+ohn!^6V=3=9q0sXOk9qNZ<}+RI%h+EyfJ)g)z^ErK4b zX#m|fF+XCpcH{r~R2h_RE4P@^D=Y;4i}r=AD0+!<2J$DDI?W%X%6vDSrYP`ypDDm! zlec4YL5^0sLxp30^zE zaGc;GsGPg~3ptsc*Qa(drfzB_+nO0<9lDA%^H%IpYr2x()rS*fJGgL5M;#1>81j9@ zYNLuINx$Ht?K|(e!)B8_PY1^$Y~aHLK|~KZK;ywiS6$dNB-afrK+L%2*;m@Qf%vxu zIG@luvv$k4!cj?~+n%gX{a*wbeW*8{FS-+P`*`N@s(QkZ8s8I6OkxTzT5>x@~@x&Xju7>&jXklKmA8N+6UaVQ4)(xIM^=lxv7=#MblHuYBsr1 zN>>$Ba#&^-Z-6iyq4QuI$7qVDzNWf4F%}28J29*~C-V}>>GX7Q43U^R z^@26mp#Xu_hx$oYfjXPmq~*N}n9HuMb0{!$k~-+66YEm;K)HAIgpSy*Y(+=b?$;sD z4G!CE0@m>4e_= Main.projectile.Length) + { + projectile.Kill(); + return; + } + Projectile body = Main.projectile[(int)projectile.ai[0]]; + if (!body.active) + { + projectile.Kill(); + return; + } + + if (projectile.localAI[0] == 0f) + { + int totalHeads = CalamityUtils.CountProjectiles(projectile.type); + DeltaPosition = new Vector2(Main.rand.NextFloat(-72f - 8f * totalHeads, 72f + 8f * totalHeads), -Main.rand.NextFloat(8f, 84f + 4f * totalHeads)); + projectile.netUpdate = true; + + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] = 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + Vector2 bodyTop = body.Center + new Vector2(body.spriteDirection == 1 ? 12 : -14, -50f) + DeltaPosition; + + // Beam shooting + if (body.ai[0] != -1) + { + if (Main.npc[(int)body.ai[0]].active && + Main.npc[(int)body.ai[0]].CanBeChasedBy(null, false) && + projectile.Distance(Main.npc[(int)body.ai[0]].Center) < EndoHydraBody.DistanceToCheck && + Collision.CanHit(projectile.Center, projectile.width, projectile.height, Main.npc[(int)body.ai[0]].Center, Main.npc[(int)body.ai[0]].width, Main.npc[(int)body.ai[0]].height) && + Main.myPlayer == projectile.owner) + { + if (projectile.timeLeft % 40f == 24f) + { + Projectile.NewProjectile(projectile.Center, + 6f * projectile.DirectionTo(Main.npc[(int)body.ai[0]].Center), + ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); + } + + if (projectile.timeLeft % 40f >= 33f) + projectile.frame = Main.projFrames[projectile.type] - 1; + else if (projectile.timeLeft % 40f >= 27f) + projectile.frame = Main.projFrames[projectile.type] - 2; + else if (projectile.timeLeft % 40f >= 22f) + projectile.frame = Main.projFrames[projectile.type] - 3; + else if (projectile.timeLeft % 40f >= 17f) + projectile.frame = Main.projFrames[projectile.type] - 4; + + projectile.direction = projectile.spriteDirection = (Main.npc[(int)body.ai[0]].Center.X - projectile.Center.X > 0).ToDirectionInt(); + bodyTop.X -= 48f * (Main.npc[(int)body.ai[0]].Center.X - projectile.Center.X > 0).ToDirectionInt(); + } + else + { + projectile.direction = projectile.spriteDirection = (player.Center.X - projectile.Center.X > 0).ToDirectionInt(); + projectile.frame = 0; + } + } + else + { + projectile.direction = projectile.spriteDirection = (player.Center.X - projectile.Center.X > 0).ToDirectionInt(); + projectile.frame = 0; + } + + if (projectile.Distance(bodyTop) > 28f) + { + projectile.velocity += new Vector2(Math.Sign(bodyTop.X - projectile.Center.X), Math.Sign(bodyTop.Y - projectile.Center.Y)) * new Vector2(0.015f, 0.025f) * Main.rand.NextFloat(0.98f, 1.02f); + if (Math.Abs(projectile.velocity.X) > 2.5f) + { + projectile.velocity.X = 2.5f * Math.Sign(projectile.velocity.X); + } + if (Math.Abs(projectile.velocity.Y) > 1.6f) + { + projectile.velocity.Y = 1.6f * Math.Sign(projectile.velocity.Y); + } + projectile.velocity += (bodyTop - projectile.Center) / 10f; + } + else projectile.velocity *= 0.98f; + projectile.Center = new Vector2(projectile.Center.X, MathHelper.Clamp(projectile.Center.Y, 1f, bodyTop.Y - 8f)); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Dust.NewDust(projectile.position, projectile.width, projectile.height, 67); + } + } + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.ai[0] < 0 || projectile.ai[0] >= Main.projectile.Length) + { + return; + } + Projectile body = Main.projectile[(int)projectile.ai[0]]; + if (!body.active) + { + return; + } + + Texture2D chain = ModContent.GetTexture("CalamityMod/Projectiles/Summon/EndoHydraChain"); + Vector2 start = projectile.Center + (projectile.spriteDirection == 1).ToInt() * 10 * Vector2.UnitX; + Vector2 end = body.Center - projectile.DirectionTo(body.Center) * 20f; + Vector2 bodyTop = body.Center + new Vector2(body.spriteDirection == 1 ? 12 : -12, -32f); + + for (int i = 0; i <= (int)projectile.Distance(end) / 10 + 1; i++) + { + float ratio = i / (projectile.Distance(end) / 10 + 1); + Vector2 positionAtPoint = start + (bodyTop - start) * ratio; + if (projectile.Distance(positionAtPoint) > 9) + { + float angleAtPoint = (start - positionAtPoint).ToRotation(); + if (i < (int)projectile.Distance(end) / 10 + 1) + { + float nextRatio = (i + 1f) / (projectile.Distance(end) / 10 + 1); + Vector2 nextPositionAtPoint = start + (bodyTop - start) * nextRatio; + + angleAtPoint = (nextPositionAtPoint - positionAtPoint).ToRotation(); + } + angleAtPoint += MathHelper.PiOver2; + spriteBatch.Draw(chain, + positionAtPoint - Main.screenPosition, + null, + Color.Lerp(Color.White, Color.Transparent, 0.6f), + angleAtPoint, + chain.Size() / 2f, + 1f, + SpriteEffects.None, + 0f); + } + } + } + public override bool CanDamage() => false; + } +} diff --git a/Projectiles/Summon/EndoHydraHead.png b/Projectiles/Summon/EndoHydraHead.png new file mode 100644 index 0000000000000000000000000000000000000000..e2dae669760bd91480d523fd7b09ff88394a23b3 GIT binary patch literal 1632 zcmV-m2A}zfP);KH600001b5ch_0Itp) z=>Px*8c9S!RCt{2oX>9?MHI(BCJwRe#Q7nbq`ef{stC0L^#E!?qDUN&IB?~_0WL@& zB+mQ^oQseuapoW3fVlJk7a|afK;-WNl;>f|N!eRHt-j{jVUH{N(z4JNQ z-u13M-jr-@pwF0Qi?mFT3HyhJ&moEX(SX&3WipceP+72)V3M7s~ z5|^u-^vsreK^u{}t`xZa*&P7B|MDgPyED&4j_)?MfNm6%wq>=Q+$)eO=DLu!QK?jc z?wIJt&9?#AE(LY^$^G8}Xzl$H`M&N?=9MBEX;ac)cm?!m)r$Y^H$Mq(_~#!0EFA|? zW@GKX^L*(~1V>c!3IO(eL9pt$j^~;L^9`>6V9%M$lR?QHbvkGE*b+_lo4bA8-z#8| zHk(n{IkCs%@py{O!2ZCn^ZjYbeNUVwH|q2Uda@K}GAgACr2uf+ABdw;sfO*$t<<2( z6i)#mX+CFT{ee>{OPREa6i0!{si`1OAJ%>C2WSQ292%`mzl!8ufuZ>WmP6BcR0Ck~ zTq`(FWtk-#eac6u)k^@aR`bl?RU8EbJvOrPKXDGt)oU}(>uW{E-Xlxh59p}iaBLzD zO)YE#;tObpMtlU}>aEx5{l56f-XlwZvyRSQev7^`;iNSHP1sBWnXf(zZ}omvWe+(Kwv_ zfy{jcpBEYwUFRpt!7ZL19Rb}LSkK&7lU$N7a(z>Gq=ji1c?@Lb^6^eR)B5}^rXiP&%1d0QvhaPdJBN9{Y?PY?!MpG9~cV-B2h+4 z-g-_y6uK+AhUnl{r_4x2K!&xUu|daQ*hqKz|_r3TOx3LgII`xfAIh zq#rog3$x5&oiAN^FLLm9H3_UA>>e;17-u(F+04~1qVc@KUW2^S^^FV>e zLL>9Yo~@q;;J@ZS&J|vyoOxMz1uPOg0qzxm5&8ouo&X<++$-Sm6rGX##7VKnR%5?* zI(0uVs#Pd+3&C||g|4jFC7iHXO5|RF)E=4TLZ(Gr$)l&i9$m7sOY%(OUiPe=22Lw6 zJ_;nL+fJv(^17^*w$}3kGGEa94fX6h;T*l@UIAAWij=fu?j(N{m-mT7lzAsyr7rHJ zC}a7^7P(iz)dtSo#mstINr-bHt?TIPIj&QjHW0z8^E!%Hj*a%rggE77<*w}IXpwsb zPPGARM?a0Vy8Lh{h%SILF5NErnBHty(%NoDSS=RVn&a%eu ea^~@PvgLoGW;rF}9#pIV0000 5f) + { + for (int i = 0; i < 3; i++) + { + Vector2 spawnPosition = projectile.position; + spawnPosition -= projectile.velocity * i * 0.25f; + int idx = Dust.NewDust(spawnPosition, 1, 1, 113, 0f, 0f, 0, default, 1.25f); + Main.dust[idx].position = spawnPosition; + Main.dust[idx].scale = Main.rand.NextFloat(0.71f, 0.93f); + Main.dust[idx].velocity *= 0.1f; + Main.dust[idx].noGravity = true; + } + } + } + } +} diff --git a/Projectiles/Summon/EndoRay.png b/Projectiles/Summon/EndoRay.png new file mode 100644 index 0000000000000000000000000000000000000000..15e877573779272f931ab67d818cf9f2b8911a17 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=*pj^6T^Rm@;DWu&Cj&(|3p^r= z85sBugD~Uq{1qucLG}_)Usv`AZ0utE^0#a@0p%D(JY5_^IIbuE`TyUZ*(f2&fw_g1 Y;aDFttLt^E7eILiPgg&ebxsLQ0Jwf72LJ#7 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/FrogGore1.cs b/Projectiles/Summon/FrogGore1.cs new file mode 100644 index 0000000000..566a576086 --- /dev/null +++ b/Projectiles/Summon/FrogGore1.cs @@ -0,0 +1,48 @@ +using CalamityMod.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class FrogGore1 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gore from a not frog of the explosive variety"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 14; + projectile.height = 14; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + projectile.timeLeft = 360; + projectile.alpha = 255; + } + + public override void AI() + { + projectile.ai[0] += 1f; + if (projectile.ai[0] < 10f) + { + projectile.alpha = 255 - (int)(255 * projectile.ai[0] / 10f); + } + projectile.velocity.Y += 0.2f; + projectile.rotation += projectile.velocity.X * 0.03f; + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.rand.Next(4, 8 + 1); i++) + { + Dust.NewDustPerfect(projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + (int)CalamityDusts.SulfurousSeaAcid, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + } + } +} diff --git a/Projectiles/Summon/FrogGore1.png b/Projectiles/Summon/FrogGore1.png new file mode 100644 index 0000000000000000000000000000000000000000..3a189598306192c6e31ada138ccbd9b6d4fcd73e GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}M?75|Lo_C? zowShaP=H9=er@4yS2kwBgDDdaim6BN{9-WwA(RyPK~hX7>4PYbT?1Qpf@wztt7KEc z=8lI^Wd~34KKi!3_}~8zvKHg)=Q4b2-+f5o{#MsV%mD_ibrVC&vp6-w7&foS z<>5PS{nhi|Yz-!Vtp>;NWj%iXxg1uPvpv|6mti!s<661%)C7$1cc9+*x1OZa0gKIfJB>>pN3F-xtEav5TtyO zO9xrCW0yDMYQ`(Yj68GpZ|VnH(x|vTLU{FAgXtH~u^Jex{B8v_DecCA7!OrZ4sLN>MR2Ka}(D(`R$$&=>}WxLeleCFkDg1$vOd M)78&qol`;+0At8&ZU6uP literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/FrogGore3.cs b/Projectiles/Summon/FrogGore3.cs new file mode 100644 index 0000000000..dbe53db248 --- /dev/null +++ b/Projectiles/Summon/FrogGore3.cs @@ -0,0 +1,48 @@ +using CalamityMod.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class FrogGore3 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gore from a not frog of the explosive variety"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 14; + projectile.height = 16; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + projectile.timeLeft = 360; + projectile.alpha = 255; + } + + public override void AI() + { + projectile.ai[0] += 1f; + if (projectile.ai[0] < 10f) + { + projectile.alpha = 255 - (int)(255 * projectile.ai[0] / 10f); + } + projectile.velocity.Y += 0.2f; + projectile.rotation += projectile.velocity.X * 0.03f; + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.rand.Next(4, 8 + 1); i++) + { + Dust.NewDustPerfect(projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + (int)CalamityDusts.SulfurousSeaAcid, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + } + } +} diff --git a/Projectiles/Summon/FrogGore3.png b/Projectiles/Summon/FrogGore3.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce32f907c3d8dc7d67a986daefb1d695f7dc329 GIT binary patch literal 260 zcmV+f0sH=mP)Px#zDYzuR49?HkTD9vKoCXWNLaB+EDUKDQrO$rcmhvgZ{q3oTd;`ExN1j*J zaR@+hd)6N8HC;}{123b9ifY+hR_iSQIu51!Gk;^7T>w*hX8Z!>XE84~l>N{E0000< KMNUMnLSTXPx$9Z5t%R5*>jlf6m}cDt|82_Sm~Z_&bc#l4$M{CTL(m8!5#t7>03HVcU?;X zc-~0p?&iGV?|J}Ok< zp8HY|M}q6(jRv?lKLTJQ_XxmAq4D!%S~M&zn>x!oFmXOccHQvhdz0}06NHJ0Ba`5^ zy7=pWv(q{Nw(}(Tw_X*9A%QCF?*dS&G{qI|WDK83d@6t-NQVD|0{9rd0#IxDLQgrf zF2002ovPDHLkV1kZ6 BlgI!7 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/FrogGore5.cs b/Projectiles/Summon/FrogGore5.cs new file mode 100644 index 0000000000..6363b6cbcb --- /dev/null +++ b/Projectiles/Summon/FrogGore5.cs @@ -0,0 +1,48 @@ +using CalamityMod.Dusts; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class FrogGore5 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gore from a not frog of the explosive variety"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 14; + projectile.height = 16; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + projectile.timeLeft = 360; + projectile.alpha = 255; + } + + public override void AI() + { + projectile.ai[0] += 1f; + if (projectile.ai[0] < 10f) + { + projectile.alpha = 255 - (int)(255 * projectile.ai[0] / 10f); + } + projectile.velocity.Y += 0.2f; + projectile.rotation += projectile.velocity.X * 0.03f; + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.rand.Next(4, 8 + 1); i++) + { + Dust.NewDustPerfect(projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + (int)CalamityDusts.SulfurousSeaAcid, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + } + } +} diff --git a/Projectiles/Summon/FrogGore5.png b/Projectiles/Summon/FrogGore5.png new file mode 100644 index 0000000000000000000000000000000000000000..ce765e0ff13888aa73fbecfe887e2899daf412e7 GIT binary patch literal 254 zcmVPx#xJg7oR49?H(6LH_VHAh)-z%92nL|nt2q9t6&=QDCqpn^;OBdvYw0I3I4GpeA zq+$eLeGupn)bKj^6$UQi_e=-Q{~Vrk!cFfsTI1^{4enQMH`qPIET+m?xlqcnmJDlB~54`u>~zQavbzTns|{q7Bl; zdxY-U>c&>5vT@*b`V9tm5Arc+HvYaEVVrz!wP0t1B?c`j;mIs_$p8QV07*qoM6N<$ Eg7?a4p#T5? literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs new file mode 100644 index 0000000000..ff0e9cd6b9 --- /dev/null +++ b/Projectiles/Summon/IgneousBlade.cs @@ -0,0 +1,121 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class IgneousBlade : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Igneous Blade"); + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 52; + projectile.height = 86; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 1f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 7; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(projectile.localAI[1]); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + projectile.localAI[1] = reader.ReadSingle(); + } + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] = 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + bool isProperProjectile = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.igneousExaltation = false; + } + if (modPlayer.igneousExaltation) + { + projectile.timeLeft = 2; + } + } + + // Orbiting. 1 = Shooting + if (projectile.localAI[1] == 0f) + { + const float outwardPosition = 180f; + projectile.Center = player.Center + projectile.ai[0].ToRotationVector2() * outwardPosition; + projectile.rotation = projectile.ai[0] + MathHelper.PiOver2 + MathHelper.PiOver4; + projectile.ai[0] -= MathHelper.ToRadians(4f); + } + else + { + projectile.ai[0]--; + if (projectile.ai[0] == 1) + projectile.Kill(); + } + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.localAI[1] == 1f) + { + projectile.ai[0] = 50; + for (int i = 0; i < 3; i++) + { + Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(16f)); + Projectile.NewProjectile(spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 18f, ModContent.ProjectileType(), + projectile.damage, projectile.knockBack, projectile.owner); + } + for (int i = 0; i < Main.rand.Next(28, 41); i++) + { + Dust.NewDustPerfect( + projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + 6, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + projectile.netUpdate = true; + } + } + public override void Kill(int timeLeft) + { + for (int j = 0; j < 40; j++) + { + Dust dust = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, 6); + dust.velocity = Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f) * Main.rand.NextBool(2).ToDirectionInt(); + dust.noGravity = true; + } + } + } +} diff --git a/Projectiles/Summon/IgneousBlade.png b/Projectiles/Summon/IgneousBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..81d7df8b2cd839e54d6fabef798f7372ad893067 GIT binary patch literal 790 zcmV+x1L^#UP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0;@?xK~!i%?U})9 z6G0rtlh$muO-hoAtu3J*a?w){-lUg;hu%c+U5Za2K7e;0z>7B@z=PmLLBWGTC~0e3 zunF!q+r%1YzTHoE$BetduwladVE8g2OP1gNzq8p%v7peXZz5}z6=cu?|}@%wl0;f;r9 zC&>NNW8|G;19{8&iF{qWLdI7ZN!~qgevfBmXS9eh>z<#V9w%Rp4v=xH61l=ic5C6? zme+!Aoo|+0^n7O+U_Py$pI_tEW-rRnjV;Gq0{Tx;re7&$?qa|Hf5VfwUbknrDx{y6hpVZg@vtzn-jsHJ-+#=J`Z5 z*bF~UXj)u5I45!KU~Y};(3zJ{MG`;SdsKUxmGC0Nf`9flvBn9_i#sBccSQC)_ijG4 zKO?;$+zqC2*D2$ig25%`w#UQp3emj! zpA)ghiE5mP^&Q_O)_2U=v;4f=^^(Y4Fqt>&YnaFWa{`UUu=lNT5;Hy)-MY-@~07*qoM6N<$f+MYfp8x;= literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/IgneousBladeStrike.cs b/Projectiles/Summon/IgneousBladeStrike.cs new file mode 100644 index 0000000000..5f185bd8d4 --- /dev/null +++ b/Projectiles/Summon/IgneousBladeStrike.cs @@ -0,0 +1,46 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class IgneousBladeStrike : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blade"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 86; + projectile.height = 36; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 4; + projectile.timeLeft = 360; + projectile.alpha = 127; + } + + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2 + MathHelper.PiOver4; + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.rand.Next(28, 41); i++) + { + Dust.NewDustPerfect( + projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + 6, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + Main.PlaySound(SoundID.Item14, projectile.Center); + } + } +} diff --git a/Projectiles/Summon/IgneousBladeStrike.png b/Projectiles/Summon/IgneousBladeStrike.png new file mode 100644 index 0000000000000000000000000000000000000000..81d7df8b2cd839e54d6fabef798f7372ad893067 GIT binary patch literal 790 zcmV+x1L^#UP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0;@?xK~!i%?U})9 z6G0rtlh$muO-hoAtu3J*a?w){-lUg;hu%c+U5Za2K7e;0z>7B@z=PmLLBWGTC~0e3 zunF!q+r%1YzTHoE$BetduwladVE8g2OP1gNzq8p%v7peXZz5}z6=cu?|}@%wl0;f;r9 zC&>NNW8|G;19{8&iF{qWLdI7ZN!~qgevfBmXS9eh>z<#V9w%Rp4v=xH61l=ic5C6? zme+!Aoo|+0^n7O+U_Py$pI_tEW-rRnjV;Gq0{Tx;re7&$?qa|Hf5VfwUbknrDx{y6hpVZg@vtzn-jsHJ-+#=J`Z5 z*bF~UXj)u5I45!KU~Y};(3zJ{MG`;SdsKUxmGC0Nf`9flvBn9_i#sBccSQC)_ijG4 zKO?;$+zqC2*D2$ig25%`w#UQp3emj! zpA)ghiE5mP^&Q_O)_2U=v;4f=^^(Y4Fqt>&YnaFWa{`UUu=lNT5;Hy)-MY-@~07*qoM6N<$f+MYfp8x;= literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MK2FlaskSummon.cs b/Projectiles/Summon/MK2FlaskSummon.cs new file mode 100644 index 0000000000..77583f5e91 --- /dev/null +++ b/Projectiles/Summon/MK2FlaskSummon.cs @@ -0,0 +1,47 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MK2FlaskSummon : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Flask"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 26; + projectile.height = 26; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + projectile.timeLeft = 240; + } + + public override void AI() + { + projectile.velocity.Y += 0.2f; + projectile.rotation += 0.1f * (projectile.velocity.X > 0).ToDirectionInt(); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.rand.Next(18, 21); i++) + { + Dust.NewDustPerfect(projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(10f), + (int)CalamityDusts.Plague, + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(1f, 4f)); + } + Main.PlaySound(SoundID.Item107, projectile.Center); + int idx = Projectile.NewProjectile(projectile.Center, Vector2.UnitY * 6f, ModContent.ProjectileType(), projectile.damage, 4f, projectile.owner); + Main.projectile[idx].ai[1] = CalamityUtils.CountProjectiles(ModContent.ProjectileType()); + } + public override bool CanDamage() => false; + } +} diff --git a/Projectiles/Summon/MK2FlaskSummon.png b/Projectiles/Summon/MK2FlaskSummon.png new file mode 100644 index 0000000000000000000000000000000000000000..191e5f6570eb78b7fa5478956e1dc99d2db4b6dd GIT binary patch literal 622 zcmV-!0+IcRP)Px%C`m*?R7i=%md{I6Q545Nud#I0(HY*P4m1oHnu8!}wGmPV`i0`gF!}=ugjTNF z=&BYjf?B(9;VKB+ND$F3Xc5$iAmc9-eNFnv!4}Pw#PnR;cN*_Fh7jDot9Q@2_rCk# z-0ykM;*_eZkIAEVG#+V+SO9je0Kj_jK+B8Hoc2ZkDyuwjqyLsR-rN5MK-T>VK)&$9 z1Gs+gCID|=ywT=AZ@2)!U`Ggm_754rAW>CETQ>lq^Nj#>_S6EflrDGx(MTA8)y?gS z8widtY)Y?5=HnIs$;$}jE=~hbSiJ+l`a(*}4~%a4`CR}Kp=toKe!eE4Sj_pT zu0G}gJe%v$5_4%)v*N2S0L;$V6*rjQP(FM5NOcAw621Sl2>cJCa`p9g0mn(CX7?XF z1Yqc{>KNlA>A$|nC=me7@frYJ=ciV);nuLWU~K9v00(XAj8ene_7*_veOezi=c8y+ zoy5)TR=j<3t6n}S0wur6SV)AhT>0-ifJve~pXA!)Z9n8{6HX!#okUVD^Sw?a9ie(n zeNO^I>MY|UuYr=k{?x`_C$}%&8MgqOB}d!WoR1P$)h#<-E2Vdj6^R|UEr6Vp)BYJm z;vYNQXaQ`0Ue@yFJA?R1$VAa(i{-~9RIxW6-4jaw5g8*o1QuJZ$86me^#A|>07*qo IM6N<$f{()(=l}o! literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MK2RocketHoming.cs b/Projectiles/Summon/MK2RocketHoming.cs new file mode 100644 index 0000000000..b35947ef92 --- /dev/null +++ b/Projectiles/Summon/MK2RocketHoming.cs @@ -0,0 +1,62 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MK2RocketHoming : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rocket"); + Main.projFrames[projectile.type] = 6; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.extraUpdates = 1; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 600; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + NPC potentialTarget = projectile.Center.MinionHoming(1000f, player); + + if (potentialTarget != null) + { + projectile.velocity = (projectile.velocity * 24f + projectile.DirectionTo(potentialTarget.Center) * 14f) / 25f; + } + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item14, projectile.Center); + } + } +} diff --git a/Projectiles/Summon/MK2RocketHoming.png b/Projectiles/Summon/MK2RocketHoming.png new file mode 100644 index 0000000000000000000000000000000000000000..1a501fcdd35c94b7e16b1ad96c41359f2ea4ce95 GIT binary patch literal 1053 zcmV+&1mgRNP)Px&*GWV{RA_hf1rry;`l(i;z;G3sl0QLP8MFO&4NWiO0f9tgTqs z2wN;zHYD9p8X6LkE=aU2TJcImRQ17iwbh$ekHyT_-gC}%#hKG;lldn%neWWZ{hgUJ zk8kF4(25mR0Nc&< zSy1xZp1*X>h?1ClAfZ#LO^2$~2)g|~>CJ!sl4yt``EIw)cl+MND|6znW<@AmqsHv8 zexCnkT-mRCA|l3%Vh&7xpIw^RrhCtCOZo7#V{1tj03BmL-OP;FTh;-v=4qFw!p6M$ zhO=Yu!Z-j8BV_>WUt0`7VtctFqsVt({Q#h+U=%arHa)+pSLWv|C~xwnKW#{?E?1<_ zsZj@@y?ew3IHubuZL3WbH~>;U{CAYZwZvus>NYF@pd>x+0wnY2sFC&JI{?SKpG8Cz zecHJ*Yr&-tAA0QQRsiY6zbP~^S4CI%17<};)RGWU`z~*9PwAhKlR(jBPTFBM1S%DF!qooai*ry0XSJy z;zG~|xH6b@04{c#t~rtzIIMbaVNE>i>ixAdGG1p6NOZ3QpF|f+XJ~*+W>lM7U@%}^|BVynl zKu99LJ)7?VPkN3^j38w&^}8w<#xS>)%~SO7K_5K1-{ zfQfs*VxS#saXhfKalr0BkHElx9{%8w&_aoPPZV X0_&t{mh+BT00000NkvXXu0mjfZK?LM literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MK2RocketNormal.cs b/Projectiles/Summon/MK2RocketNormal.cs new file mode 100644 index 0000000000..c3dbf12eba --- /dev/null +++ b/Projectiles/Summon/MK2RocketNormal.cs @@ -0,0 +1,56 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MK2RocketNormal : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rocket"); + Main.projFrames[projectile.type] = 3; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.light = 0.5f; + projectile.extraUpdates = 1; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 600; + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item14, projectile.Center); + } + } +} diff --git a/Projectiles/Summon/MK2RocketNormal.png b/Projectiles/Summon/MK2RocketNormal.png new file mode 100644 index 0000000000000000000000000000000000000000..ca373e2a8a28e2143f533db9751b6909b9535b97 GIT binary patch literal 554 zcmV+_0@eMAP)Px$bFSCY30aG}=K#TCzwL>mUdYQbdtLDIzXz&VB*E zgR`H&K?3X7nvVIQk8IXOH6-oGoB;oiYPaOcw!$Q{eZ z{p*H0Zboz+HyD41_Um}z?qx7>x(KeF$bgx*B{20W8_5`$S|P;SXIxs{pTOK=rh58f zowjqwOOahTx0tDWQ?_2&JC3_Ei5d5M#qnoX>{EA>6OS+&paIm zXS1oMTAvrcM)pi!_ue{9n>7v{s&qj6j0>yZ!<%)E8}=a{@3>FqCsY~g7%z@aMQRL- zpe1~zW*^76^QiU5EfIfe9mmyi-2c&W`||?{ projectile.Top.Y) + { + target = null; + } + } + projectile.frame = (target != null).ToInt(); + if (target != null) + { + projectile.ai[0] += 1f; + if (Main.myPlayer == projectile.owner && + projectile.ai[0] % 8f == 0f) + { + float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f); + angle *= Math.Sign(target.Center.X - projectile.Center.X); + Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f, + new Vector2(0f, -Main.rand.NextFloat(14f, 23f)).RotatedBy(angle), + ModContent.ProjectileType(), projectile.damage, 5f, + projectile.owner); + } + } + projectile.velocity.Y += 0.5f; + + if (projectile.velocity.Y > 10f) + { + projectile.velocity.Y = 10f; + } + } + + public override bool CanDamage() => false; + // Don't die on tile collision + public override bool OnTileCollide(Vector2 oldVelocity) => false; + } +} diff --git a/Projectiles/Summon/OldDukeHeadCorpse.png b/Projectiles/Summon/OldDukeHeadCorpse.png new file mode 100644 index 0000000000000000000000000000000000000000..877667a8864d24c64068234ee5ca57515fee15bc GIT binary patch literal 4352 zcmV+b5&!OqP)Px_x=BPqRCt{2U1@Aw)fqj{8GAhA@p#6L?bulx60)$Af@s5%Qe3DAO%;|(&_YY; zCaOp+s)T6OQbb$2s8w4c(G_S@6_rY)4HOYdz%&i35QH@l))2>W?8NJg*NHv-ao?Gl z`^~%a-b_64Hs_D?mU;8$&6)Fk_q*Rc0ZJ(0M8cZt8z7c1Ugm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*yHVEIH&vAy4H1$xvN zRdd_=PC|~ZcKa(s;u`A^&y2Bl#6x{J)(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.plaguebringerMK2 = false; + } + if (modPlayer.plaguebringerMK2) + { + projectile.timeLeft = 2; + } + } + + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + + if (potentialTarget != null) + { + int sign = (potentialTarget.Center.X - projectile.Center.X < 0).ToDirectionInt(); + Vector2 destination = potentialTarget.Center + new Vector2((125f + 40f * projectile.ai[1]) * sign, -160f); + if (projectile.Distance(destination) < 65f) + { + projectile.velocity *= 0.9f; + } + else + { + Vector2 velocity = projectile.DirectionTo(destination) * projectile.Distance(destination) / 36f; + projectile.velocity = velocity; + } + int timeNeeded = (int)MathHelper.Lerp(60f, 10f, MathHelper.Clamp(projectile.localAI[1] / 320f, 0f, 1f)); + if (projectile.ai[0] >= timeNeeded) + { + Projectile.NewProjectile(projectile.Center, + projectile.DirectionTo(potentialTarget.Center) * 14f, + ModContent.ProjectileType(), + projectile.damage / 2, + 3f, + projectile.owner); + Projectile.NewProjectile(projectile.Center, + projectile.DirectionTo(potentialTarget.Center) * 11.5f, + ModContent.ProjectileType(), + projectile.damage / 2, + 3f, + projectile.owner); + projectile.ai[0] = 0; + } + else projectile.ai[0]++; + projectile.localAI[1]++; + projectile.direction = projectile.spriteDirection = -sign; + } + else + { + projectile.localAI[1] = 0; + Vector2 distanceToDestination = player.Center - projectile.Center; + distanceToDestination.X -= 10f * player.direction; + distanceToDestination.X -= projectile.ai[1] * 40 * player.direction; + distanceToDestination.Y -= 10f; + float distance = distanceToDestination.Length(); + if (distance > 10f) + { + float speed = 20f; + if (distance < 50f) + { + speed /= 2f; + } + Vector2 velocity = distanceToDestination.SafeNormalize(projectile.direction * Vector2.UnitX) * speed; + projectile.velocity = (projectile.velocity * 20f + velocity) / 21f; + } + else + { + projectile.direction = player.direction; + projectile.velocity *= 0.9f; + } + projectile.direction = projectile.spriteDirection = player.direction; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + Lighting.AddLight(projectile.Center - Vector2.UnitY * 21f, 0.25f, 0.865f, 0.825f); + } + } +} diff --git a/Projectiles/Summon/PlaguebringerMK2.png b/Projectiles/Summon/PlaguebringerMK2.png new file mode 100644 index 0000000000000000000000000000000000000000..15cce7e35807959f2513922a8aa182946e66f289 GIT binary patch literal 1772 zcmeAS@N?(olHy`uVBq!ia0vp^8bJJngBeKP<(f7DNHG=%xjQkeJ16rJ$YDu$^mSxl z*x1kgCy|wbftew|C&U#f&dnpKX6WE*=kA{p@6nl9Hfi!~DbrcIyns@pU^E1VcL?MM zsHOw+2}4PcU-18t4H$yIv#SDQo3p?pvY3H^?=T269?xHq!oa|k>FMGalHvSz#zViu z20Uz$;oJ89=kAvi*XCqeY4*D@z)mw$Hs15`v5hxw7hiZ9eD+6D=z-HutL~Q1-S#(N zL8U;>?Sh=yz5DpO?()67x9#=R-M4$)6^axj0(?#>O~{bzF=$X;*MEGQtz6GTR$G3f z9?A6zD{2JSSq69{K1{HRKfaOYMu*xRV}VtTJHGw>dx2-6)(du(D|fa&^uOxZboff! z&ed#XA_Z=*6&Ow?Jh=T~p_az3_us7(t3)}x?34C0PQ0Og@cozY1C^YcLmB^8Smi!G zcA_~!?%fhmkedo^UjKWz!JfB?@#qpArp{*vIhZXT?ON3Yv@9%C;-VFYgOS7!vzirL zUF%i}{M!FOX3EV|%{=pTc|dl6_> z)Qzgo3i9WYh0E<{)ibjlQxdU%l<@d`lMj!Z(uMDfEvHRpE;PL0c(i+i!37-&VUFzI zE6VtKq8;m(9NyNS&Bx=j;r|D7E#|V1CsuKR+vd$@?2>_%XLlpo3 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/PowerfulRaven.cs b/Projectiles/Summon/PowerfulRaven.cs new file mode 100644 index 0000000000..9e6f5bed57 --- /dev/null +++ b/Projectiles/Summon/PowerfulRaven.cs @@ -0,0 +1,160 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class PowerfulRaven : ModProjectile + { + public const float DistanceToCheck = 3200f; + public const float TeleportDistance = 2700f; + public const float SeparationAnxietyDistance = 2000f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Super Raven"); + Main.projFrames[projectile.type] = 5; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 24; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 1f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 6; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.ai[0] = -1f; + projectile.localAI[0] = 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + bool isProperProjectile = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.powerfulRaven = false; + } + if (modPlayer.powerfulRaven) + { + projectile.timeLeft = 2; + } + } + + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + + if (potentialTarget != null) + { + projectile.ai[1] += 1f; + if (projectile.Distance(potentialTarget.Center) > TeleportDistance) + { + projectile.Center = potentialTarget.Center + Utils.NextVector2Unit(Main.rand) * potentialTarget.Size * 1.3f; + } + else + { + if (projectile.ai[1] % 45f == 28f || projectile.Distance(potentialTarget.Center) > 450f) + { + if (Main.rand.NextBool(6)) + { + projectile.Center = potentialTarget.Center + Utils.NextVector2Unit(Main.rand) * potentialTarget.Size * 1.3f; + for (int i = 0; i < 40; i++) + { + float angle = MathHelper.TwoPi / 20f * i; + float lerp = MathHelper.Lerp(0f, 1f, (float)Math.Sin(i / 8f * MathHelper.TwoPi) * 0.5f + 0.5f); + Dust dust = Dust.NewDustPerfect(projectile.position, DustID.Fire); + dust.velocity = Vector2.Lerp(Vector2.Zero, angle.ToRotationVector2() * 6f, lerp); + dust.noGravity = true; + } + } + projectile.velocity = (potentialTarget.Center - projectile.Center) / 50f; + if (projectile.velocity.Length() < 34f) + { + projectile.velocity = projectile.velocity.SafeNormalize(Vector2.UnitX) * 34f; + } + for (int i = 0; i < 20; i++) + { + float angle = MathHelper.TwoPi / 20f * i; + Dust dust = Dust.NewDustPerfect(projectile.position + angle.ToRotationVector2().RotatedBy(projectile.rotation) * new Vector2(14f, 21f), DustID.Fire); + dust.velocity = angle.ToRotationVector2().RotatedBy(projectile.rotation) * 2f; + dust.noGravity = true; + } + } + if (projectile.ai[1] % 45f >= 28f) + { + projectile.frame = Main.projFrames[projectile.type] - 1; + Lighting.AddLight(projectile.Center, 1f, 1f, 1f); + } + else + { + projectile.velocity *= 0.95f; + projectile.rotation = projectile.rotation.AngleTowards(0f, 0.3f); + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type] - 1) + { + projectile.frame = 0; + } + } + } + } + else + { + projectile.rotation = projectile.rotation.AngleTowards(0f, 0.2f); + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type] - 1) + { + projectile.frame = 0; + } + if (projectile.Distance(player.Center) > SeparationAnxietyDistance) + { + projectile.Center = player.Center; + projectile.velocity = Utils.NextVector2Unit(Main.rand) * 12f; + } + else if (projectile.Distance(player.Center) > 90f) + { + projectile.velocity = (projectile.velocity * 19f + projectile.DirectionTo(player.Center) * 12f) / 20f; + } + } + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + } + } +} diff --git a/Projectiles/Summon/PowerfulRaven.png b/Projectiles/Summon/PowerfulRaven.png new file mode 100644 index 0000000000000000000000000000000000000000..e94f199700a2565460eeb9fdcfb33e03ad598376 GIT binary patch literal 1537 zcmV+c2LAbpP)Px)yGcYrRCt{2oK0^VMHt6_>zBl_&;KrTLz?b2I z5T61>#l4CmaREeCLIKfI66(5napKsqH_Ku6X*}bd^-Ff!u$kY*nc2-|Gyi>N=K0Tf zJRP_Lk+Re!0Hj4Qv4+a&tDdZHf@#fn5 zTKVqQW&lvlSGD@4-vr?L$_>5#U=M(Lb4OEfx=``}2o*Aw$&4c2c`qQ(aCt_xcwC$f2q&r4gi&zFy@YxqN0pb#H6ox31Bc* z=4*>udB0Hy&RSd)`Qy<&0Dkyr4uH>ozX?G5XkR;Ct1Wu~jm9?M6dA-+#Ki2KBnAXg z=F_EJ0KRX%7I~g1E3roSKR889M3F*H4Nbk%UgY?(xU>S;6=}DQw0aqDVsMIRJX698 zl?ap)<~U(ujvFS@JLSlE0H>VBo}U>-5}Rv@5)u>gte47_$n)zvkASn7kvW#BlqfMQ zFL8?4FngJ1GrreZG|Cbi=A3F6nNcLMUQ3t@H7=>nhSw{(0N}SH-vg)?f&k!&ukwp# zrxTfXbb4*z66WlQjqJj$8AjR9fBx*zKyqUN`y{MpZ({j3SBmT77r` zy+AJu|1|4~{;|v`l14r<7URZ(jm#*LMvQ3V!fbio12}B$kL6R1OJ)>F-9@>(wFwO7 zC*o5Ly9YP2Pl~CCxF(XDN4Ouch#TMaPqg~XyYZ>Vh&Y5c4>-n+*XoDOik%`RHdo%J z%)bxr1NL0~(z@}9jqJAGM3j&g78hR1qKGiy#-rT$KDR!AGdG@w`n}93l6ZzFu`)AN z2H^OlrHw0sbK@-}?xGa)Qvh`R6X(WHLXwJT`G#}jCnWI<(Yf*GBr!z_UO{=ezP<~{ zx$$F?`0Tewy1<}&5`(6o+Z&%2;+BZxxW4`gFp?X8 zIrqk=u80j$!pzm>b8-1qKy%{*ILjP`%(?NYjU%>o5)-#K-XJwa^5g;V@naPcoEsnF z-1v)zbK@@>&W*olI5+;H;oSI(hI8XD8mW1|Hb(V?FRdakEN92!374kI;ZqW=ob$EP z#`Lvhhn&f!@wHy$ik0@AUbo9MB=H!reVckz+%D6kE+k4!7fJwhdhJLT<*oNV)XL`D zIGnF_-V2QSh5>Qc&7IlO!m?LhkeuH6TH|8+S~h1{m@le#Jv{EHzZt#)!ivk;lVWw|S=)F3D`8@H=m#Fa)oFF`m#4{mk6p-& zA`XYc;c%RX=e|B7B>iTa%#7@b=OYs^k`p;sQ1^PEFAh8JH;%D9UXzcPi;?wD+iF#K zW7pTNzg+S>fbDQ)D>I6W93x-eT8*s#sjgb=>#c48XDz!r8{I}XjF7q)c0vyi_5E1i zZmWfOapk|d-_g#K^^^N2}-w3XjB;D+HDCX?fwx>}rd!s{NwRpXw&(&&0Rp02wDV nY?yl*g|zoJW=0W*!x7Ja*|8nf;ZUg-00000NkvXXu0mjfZ^#S@ literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs new file mode 100644 index 0000000000..7fdee99d1b --- /dev/null +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -0,0 +1,126 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class RadiantResolutionAura : ModProjectile + { + public const float DistanceToCheck = 1600f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Radiant Resolution Aura"); + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 66; + projectile.height = 66; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 1f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 2f, 2f, 2f); + bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isCorrectProjectile) + { + if (player.dead) + { + modPlayer.radiantResolution = false; + } + if (modPlayer.radiantResolution) + { + projectile.timeLeft = 2; + } + } + + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] += 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + projectile.minionSlots = projectile.ai[0]; + + projectile.Center = player.Center - Vector2.UnitY * 16f; + + float allocatedSlots = projectile.ai[0]; + projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f); + + int radiantOrbDamage = (int)(139 * Math.Log(allocatedSlots + 1f, 1.414214)) + 655; + int radiantOrbAppearRate = (int)(124 * Math.Pow(0.9, allocatedSlots)); + + if (radiantOrbAppearRate < 7) + radiantOrbAppearRate = 7; + + if (radiantOrbDamage > 10000) + radiantOrbDamage = 10000; + + projectile.ai[1]++; + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + if (potentialTarget != null) + { + if (projectile.ai[1] % 35 == 34) + { + for (int i = 0; i < 3; i++) + { + float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f); + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center).RotatedBy(angle) * 15f, + ModContent.ProjectileType(), radiantOrbDamage / 2, 1f, projectile.owner); + } + } + if (projectile.ai[1] % radiantOrbAppearRate == radiantOrbAppearRate - 1) + { + Projectile.NewProjectile(projectile.Center + Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(100f, 360f), + projectile.DirectionTo(potentialTarget.Center) * 2f, ModContent.ProjectileType(), radiantOrbDamage, 4f, projectile.owner); + for (int i = 0; i < 4; i++) + { + float angle = MathHelper.Lerp(-MathHelper.ToRadians(40f), MathHelper.ToRadians(40f), i / 4f); + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center).RotatedBy(angle) * 19f, + ModContent.ProjectileType(), radiantOrbDamage / 2, 1f, projectile.owner); + } + } + } + } + + public override bool CanDamage() => false; + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D currentTexture = ModContent.GetTexture(Texture); + spriteBatch.Draw(currentTexture, + projectile.Center - Main.screenPosition, + null, + lightColor, + projectile.rotation + MathHelper.PiOver2, + currentTexture.Size() / 2f, + 1f, + SpriteEffects.None, + 0f); + } + } +} diff --git a/Projectiles/Summon/RadiantResolutionAura.png b/Projectiles/Summon/RadiantResolutionAura.png new file mode 100644 index 0000000000000000000000000000000000000000..9a3de1b6ea5a978d5b345e966155ff95df9fa4b8 GIT binary patch literal 1630 zcmV-k2BGPx*7)eAyRCt{2n_X`dWfaGML#YJ` zBJsvAVTc#Tm}m%k;e|$0X%uWRSSYZ(Rkqpf3y?BioO5R9nVsqGG}Ptd`QOaW%kwh( z{Gb1G&U4NLbO_-;pU98-xe$QSasUv#`b9_jv#leoK8M)ev6goh@QhGw#*UB?>>dgL`o^9DP``Ss zt&tl!eMEkkkAX5{>F*GraQa99F!%KzS@k&W^o{Kcq(3sIg(r9IelGpqVCS=!Qp=eZ^%b`T0A0m?0G5=A!@By^ ze*RVZ_vCJ__wtNTw9SZUL{t-u31$cI<2N!lrw+^9T&~IW`xUD~?pJQe+4y97LzNq; zT2p@a6*=owuT?c>=mXad=^NW8)m+V7%~IhRp~$TfwmO(5L`-PR`B1MvgYL!ZGiDt* zF2~Vv;_X;}mKv*>@aFzZ~!7w=;~maaO2K8&=}dpikuIWx~xdxoU6GoGA8FX!UKDy zKKg}G(Q1<2zg$}38KG!<)!4Cr4*(+{y(1THi`p|c<2+|}f~^jw2}veo?Ht)om}!RX zXf57Z4*|M%59lgVa|@OyMdKWbw!xv8KDTm3uiXAmH$`yPXb#f~VxSaTUso{)DL zZn7gB%hLNAEzmY2lF!Dx&vaj7NiN&mj`lu*; z?f4q4yg286G*Y^=G*DUqoc#!SS}n$`{fNbB*K1wt9|2nLN5tTFs5XNgpS=Jur%d;$h@P_9vE%jl;bW!(=x?nr+;BNUzc5;zfS_1}g+C+Hj_RuUPz8kO!8 cJR=nU0lYMP=TZy$ivR!s07*qoM6N<$f_a7?-T(jq literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/RadiantResolutionFire.cs b/Projectiles/Summon/RadiantResolutionFire.cs new file mode 100644 index 0000000000..cdf928db0a --- /dev/null +++ b/Projectiles/Summon/RadiantResolutionFire.cs @@ -0,0 +1,61 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class RadiantResolutionFire : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Fire"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.light = 1f; + projectile.timeLeft = 300; + projectile.minion = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 4; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.ProfanedFire); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi); + dust.noGravity = true; + NPC potentialTarget = projectile.Center.MinionHoming(1750f, player); + if (potentialTarget != null) + { + projectile.velocity = (projectile.velocity * 19f + projectile.DirectionTo(potentialTarget.Center) * 20f) / 20f; + } + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 60; + projectile.position -= projectile.Size / 2f; + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 5; + projectile.Damage(); + Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 14); + for (int i = 0; i < 20; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.ProfanedFire); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(2f, 6f); + dust.noGravity = true; + } + } + } +} diff --git a/Projectiles/Summon/RadiantResolutionFire.png b/Projectiles/Summon/RadiantResolutionFire.png new file mode 100644 index 0000000000000000000000000000000000000000..ead80128fa90d3321c087f258cc1d6b9c550723f GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u_bxCyDx`7I;J! zGcfQS24TkI`72U@g6t)pzOL*K*f|(FVdQ&MBb@01<2^RR910 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/RadiantResolutionOrb.cs b/Projectiles/Summon/RadiantResolutionOrb.cs new file mode 100644 index 0000000000..75964c08f9 --- /dev/null +++ b/Projectiles/Summon/RadiantResolutionOrb.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class RadiantResolutionOrb : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sun"); + Main.projFrames[projectile.type] = 6; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 62; + projectile.height = 64; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.alpha = 255; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 4; + } + + public override void AI() + { + if (projectile.alpha > 0) + { + projectile.alpha -= 9; + if (projectile.alpha < 0) + projectile.alpha = 0; + } + Player player = Main.player[projectile.owner]; + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + if (projectile.ai[0]++ < 30f) + { + projectile.velocity *= 1.01f; + } + else + { + NPC potentialTarget = projectile.Center.MinionHoming(2000f, player); + if (potentialTarget != null) + { + projectile.velocity = (projectile.velocity * 7f + projectile.DirectionTo(potentialTarget.Center) * 19f) / 8f; + } + } + } + } +} diff --git a/Projectiles/Summon/RadiantResolutionOrb.png b/Projectiles/Summon/RadiantResolutionOrb.png new file mode 100644 index 0000000000000000000000000000000000000000..68fa0b73726755ec9461fec9c8a154f57c07c5b1 GIT binary patch literal 4019 zcmY*cdpy(a-~UQSlAI;AxPRo-L2`)MI*e|WWtb&VDmjIgdl{9vOU1(KjtX-~h>fW< z<}`BCYQ-Ej>)<@6hH04N4$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Jdj^V!9dZ*#x#?w_ z9(K8*PiW#2GQt-P6n-}~-)@JDZeB;IdZYO^fWLCyad z`994Ed5r&Bbdb#Nr}g8{lowdk$E-s0a#u*S18DYZQ}d3c2Dsh0v$b_`B#2-3=`Ec-yxk_YwEI13lC;5k6x@i6S41L7sFp9o8&hm~(GND;Vwe$VUVz*oos5@-YM| zPI9nhWnsx4nW3@rsj{S*arV{ID9$>mpw?~&ok+>P6#lUf?3}!s=KI6fo13y+W_%er^7y1dO6F zB8&Fh!?B8*{<_?+`qLZ1($Zjp%0ob0GrUlXQmnkCH`SXjJgj|&bPu*W%O z))csK<4QnVza6F0gKysva+qI4<$CzXC(8b{RANlr-8#Q42&CqZEDOw^oW0T0H5Pk# z*TXd)I|(?a^%EAh^~965jInd?EUtnyGM_U*$8-mEc5I0W;{hAbag<^l^9o60>rrivL4dNLFazh}qFud?S94^w30e~{tsMO|P4C_{AM7`s7Te31tw$J*%W&WJ Xbfb%x7cPN+;eeY95= Main.projectile.Length) + { + projectile.Kill(); + return; + } + + Projectile mother = Main.projectile[(int)projectile.ai[0]]; + + if (!mother.active) + { + projectile.Kill(); + return; + } + + NPC target = projectile.Center.MinionHoming(SkeletalDragonMother.DistanceToCheck * 0.666f, player); + + if (target != null) + { + projectile.ai[1]++; + if (projectile.ai[1] % 55f == 54f && + Main.myPlayer == projectile.owner) + { + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(target.Center) * 19f, ModContent.ProjectileType(), mother.damage, mother.knockBack, mother.owner); + } + } + + // If the mother is dive-bombing + if (mother.ai[1] == 1f) + { + if (target != null) + { + if (projectile.Distance(mother.Center) > 620f) + { + projectile.velocity = (mother.Center - projectile.Center) / 45f; + } + else + { + projectile.velocity = (projectile.velocity * 19f + projectile.DirectionTo(mother.Center) * 16f) / 20f; + } + } + else + { + if (projectile.Distance(mother.Center) > 250f) + { + projectile.velocity = (mother.Center - projectile.Center) / 28f; + } + else + { + projectile.velocity += new Vector2(Math.Sign(mother.Center.X - projectile.Center.X), Math.Sign(mother.Center.Y - projectile.Center.Y)) * new Vector2(0.04f, 0.0225f); + if (projectile.velocity.Length() > 8f) + { + projectile.velocity *= 8f / projectile.velocity.Length(); + } + } + } + } + else + { + if (projectile.Distance(mother.Center) > 250f) + { + projectile.velocity = (mother.Center - projectile.Center) / 28f; + } + else + { + projectile.velocity += new Vector2(Math.Sign(mother.Center.X - projectile.Center.X), Math.Sign(mother.Center.Y - projectile.Center.Y)) * new Vector2(0.04f, 0.0225f); + if (projectile.velocity.Length() > 8f) + { + projectile.velocity *= 8f / projectile.velocity.Length(); + } + } + } + + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + } + } +} diff --git a/Projectiles/Summon/SkeletalDragonChild.png b/Projectiles/Summon/SkeletalDragonChild.png new file mode 100644 index 0000000000000000000000000000000000000000..d199e87b60ad6c7a5018f2def60c78cb0ded87eb GIT binary patch literal 1917 zcmeAS@N?(olHy`uVBq!ia0vp^WNn~YUU}gyL32_CAs|uo_Y2_rK;3yakfsqgbZO1z6fcb=> zB*-uL|HuXm!Qa_cfpN}R;1OBOz`%DHgc*C!nL zH*px{)oUyFEJ~fZUFY;`*6TBZK3en`9n&!7wK#uyOWwupId9WWb0`NSi_Y4(_Pot9 z2VTwq`}7%yJ5Jet%=-G;dvfxO;~qMjPc3}?>(=3aF=`L)FVgw(`Y7Y4nTwt-m?9W4 zIq2vNKHa7jQR@@3CLT-rnJvlj=-U)7wkMMkFGYtOc3^mVW9Ra=oqy!hKZz~Avz<}i zVP)d{r+%Wl&mG?NCwz_V%ys@cla4gT&;Hs|mcQ-0^EhrTRWl(;Qq>T#x7KLgh^PtJ*y-ND|fR@_1Qkx!a+6r^jxoN>hpJQ-FK8{o6hls ze(~=$l~y}@PP>Xf{~7o`#o%D&GvQ~q`~BCQuvjeHU-J3dc~O~Efqx%w2|f7ynLpW! zuiMOWsYcqBe~CVlsXiT#au;Zv{mq|zN+Y=Y$mz9)A*b*8owBfYzLm^*=grSgClefe zd%ZGya_6S~^tsTz@%CO@^J{@s-g^FM9S<9{7=utw>-dWqQLBS&|Me%am< zD7N%tz@_9s^H1M4I=#NafnO{GZtPWMYEYbLO@<_xK*8F&v<1_6;&#AxtQy{w}KUlMB`e`z5A5!(a8qzSW*)yYu@7}3YH~*n9s5ta=^>bP0l+XkKqC2D} literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/SkeletalDragonMother.cs b/Projectiles/Summon/SkeletalDragonMother.cs new file mode 100644 index 0000000000..e63817584b --- /dev/null +++ b/Projectiles/Summon/SkeletalDragonMother.cs @@ -0,0 +1,133 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class SkeletalDragonMother : ModProjectile + { + public const float DistanceToCheck = 1100f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mother"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 92; + projectile.height = 78; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 6; + projectile.minionSlots = 6f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + for (int i = 0; i < 2; i++) + { + Projectile.NewProjectile(projectile.Center + Utils.RandomVector2(Main.rand, -24f, 24f), + Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 4f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, player.whoAmI, projectile.whoAmI); + } + projectile.localAI[0] = 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + bool isProperProjectile = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.dragonFamily = false; + } + if (modPlayer.dragonFamily) + { + projectile.timeLeft = 2; + } + } + + NPC target = projectile.Center.MinionHoming(DistanceToCheck, player); + + if (target != null) + { + projectile.ai[0]++; + + // Arc towards enemy every 60 frames for 30 frames. + float modulo = projectile.ai[0] % 150f; + if ((modulo < 30f) || + (modulo >= 90 && modulo < 120f)) + { + if (projectile.velocity.Length() == 0f) + projectile.velocity = projectile.DirectionTo(target.Center).RotatedByRandom(0.5f) * -7f; + float angleToTarget = projectile.AngleTo(target.Center); + float velocityAngle = projectile.velocity.ToRotation(); + float resultantAngle = velocityAngle.AngleLerp(angleToTarget, 0.08f); + if (projectile.Distance(target.Center) > 70f) + { + projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(resultantAngle); + } + else + { + projectile.velocity = (projectile.velocity * 44f + projectile.DirectionTo(player.Center) * 13f) / 45f; + projectile.ai[0] += 30 - projectile.ai[0] % 30f; + } + projectile.ai[1] = 1f; + } + else + { + projectile.ai[1] = 0f; + } + if ((modulo >= 30f && modulo <= 60f) || (modulo >= 90f && modulo <= 120f)) + { + if (projectile.owner == player.whoAmI && projectile.spriteDirection == (projectile.DirectionTo(target.Center).X > 0).ToDirectionInt()) + { + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(target.Center) * 11.5f, ModContent.ProjectileType(), projectile.damage, 0f, projectile.owner); + } + } + } + else if (projectile.Distance(player.Center) > 175f) + { + projectile.ai[1] = 0f; + projectile.velocity = (projectile.velocity * 24f + projectile.DirectionTo(player.Center) * 13f) / 25f; + } + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + } + } +} diff --git a/Projectiles/Summon/SkeletalDragonMother.png b/Projectiles/Summon/SkeletalDragonMother.png new file mode 100644 index 0000000000000000000000000000000000000000..cebca6800f0216034b13421ef5ab69527b8b865d GIT binary patch literal 3276 zcmeHJ`#%#38z0&YYi_xY$;ePH&Uycf_dU<&`+T0;=kxsV+&)hcDL4S8X{reT0AL3K zeaR|G1pw4=5Dk?kL!G#;5^5>r03QH%2r;iRwj_8T@&*7}%e0hnKmb4kKnkMxsr)v& zwi%lEV;){ah)+&Tc$IxXMb4Q)dwg5NUn%~fe=6`lT!D=?hO25%0CaM2*yjH?0m9b6 zHmX)bX@QX`0KnG1zgSIl?!gHF0CM1fuQ!Dev&3FXoo>?e4>6Y<_-&Jw+5TgYw_Y2E z3wi#7Qc2QrGE2&bn=EYnK3tU1Q@yUI3?C(A*WHqyyOKLOk6I}}Rx`6=4HR##G)=d8 zm<4wXq!WjhQm=w76mPmw7x=k;`Mc8Q`m*ugHLR^=(h#4%*y$1bG^yJXII#NB_s45| zC+$24?>n9s5XhFH>(;-Ih*t&*thfIRaym5Go!)%oc?-VoMm>3tNb+5mBKK0%*Z3oCux4&W_$#y171`mA)W;PQvOs=TQeE2#Mdp$S^xgJUuu@0e>o#ncb(p+Xnp zKQnNa_Z^m*-#8k*nF#E>yMtUqi7t_3^UQy#El*!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(fEpmM+FUFMaWDp!Lma{h56xF|_rbZQIpfJxlcj&R5LhxI)R80nO{k zYwU2|9|gyK{BF1ja>Ja$6DLp0=z$!4a~_fnCc7bY@@IkPMpzy<=jIN@z1E5`tN4Ki z^#Ckz4QsD1WnHX1Oo&1%j!@>Jz-VmhFFK4Q|7Km<_l5yh%(YV79^bz67hZ?TafC+M zTG?=i2TDrm-{s2mwz7#deC=}Ba~#rn`tHwr-`_mR57H5tYQ$F0Lh7fPUjAj5et$~T v-JS(9tpaYiIaO(FU{t@r-!NPMG`D%$bn8#Y@(`*I0{}SS7wpURImY@Em*FFm literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/SummonAstralExplosion.cs b/Projectiles/Summon/SummonAstralExplosion.cs new file mode 100644 index 0000000000..2a1bc90fc7 --- /dev/null +++ b/Projectiles/Summon/SummonAstralExplosion.cs @@ -0,0 +1,50 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class SummonAstralExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 150; + projectile.height = 150; + projectile.friendly = true; + projectile.minion = true; + projectile.penetrate = 3; + projectile.timeLeft = 60; + } + + public override void AI() + { + // Bluish cyan light + Lighting.AddLight(projectile.Center, 66f / 255f, 189f / 255f, 181f / 255f); + float dustCount = 25f; + dustCount *= 0.7f; + projectile.ai[0] += 4f; + int counter = 0; + while (counter < dustCount) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.DustType(), + ModContent.DustType() + }); + Dust dust = Dust.NewDustPerfect(projectile.Center, dustType, Vector2.Zero, 100, default, 1.325f); + dust.noGravity = true; + dust.position += Utils.RandomVector2(Main.rand, -10f, 10f); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1.5f, 5f); + counter++; + } + } + } +} diff --git a/Projectiles/Summon/SummonAstralExplosion.png b/Projectiles/Summon/SummonAstralExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..31ba8e33dc33261d1713b4483e0a1c458cb68c1f GIT binary patch literal 513 zcmeAS@N?(olHy`uVBq!ia0vp^(?FPm4M^HB7Cr(}jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4bwbb978JN-d-|fJYc|cV8fa}mg)YASLT12 v(XjunY{lCgTe~DWM4flmnad literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/YoungDuke.cs b/Projectiles/Summon/YoungDuke.cs new file mode 100644 index 0000000000..fb2948aa31 --- /dev/null +++ b/Projectiles/Summon/YoungDuke.cs @@ -0,0 +1,124 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class YoungDuke : ModProjectile + { + public const float DistanceBeforeCharge = 420f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Young Old Duke"); + Main.projFrames[projectile.type] = 16; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + + // Adjust damage as needed + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = player.allDamage + player.minionDamage - 1f; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] = 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = trueDamage; + } + + bool playerHalfLife = player.statLife <= player.statLifeMax2 * 0.5f; + + // Frames + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + if (playerHalfLife && projectile.frame < Main.projFrames[projectile.type] / 2) + { + projectile.frame += Main.projFrames[projectile.type] / 2; + } + else if (!playerHalfLife && projectile.frame >= Main.projFrames[projectile.type] / 2) + { + projectile.frame -= Main.projFrames[projectile.type] / 2; + } + + bool correctMinion = projectile.type == ModContent.ProjectileType(); + if (correctMinion) + { + if (player.dead) + { + modPlayer.miniOldDuke = false; + } + if (modPlayer.miniOldDuke) + { + projectile.timeLeft = 2; + } + } + NPC potentialTarget = projectile.Center.ClosestNPCAt(1600f); + if (potentialTarget != null) + { + if (projectile.Distance(potentialTarget.Center) < DistanceBeforeCharge) + { + projectile.ai[0] += 1f; + int timePerCharge = playerHalfLife ? 33 : 50; + float chargeSpeed = playerHalfLife ? 22f : 17.5f; + if (projectile.ai[0] >= timePerCharge) + { + projectile.velocity = projectile.DirectionTo(potentialTarget.Center) * chargeSpeed; + projectile.ai[0] = 0f; + } + else + projectile.velocity *= 0.9825f; + } + else + { + float intertia = 0.94f; + float homeSpeed = playerHalfLife ? 33f : 25.75f; + projectile.velocity = Vector2.Lerp(projectile.velocity, + projectile.DirectionTo(potentialTarget.Center) * homeSpeed, + 1f - intertia); + } + } + else if (projectile.Distance(player.Center) > 140f) + { + projectile.velocity = (projectile.velocity * 30f + projectile.DirectionTo(player.Center) * 16f) / 31f; + } + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + } + } +} diff --git a/Projectiles/Summon/YoungDuke.png b/Projectiles/Summon/YoungDuke.png new file mode 100644 index 0000000000000000000000000000000000000000..eb0047828e122337f2d68e537a7f50518d5be95d GIT binary patch literal 7532 zcmeHMc{r2}yPp}xHg=Q2YnfqUL}SmAWvnxkB@KBA*@={G6rpA?BHIkIlq5#cBB_K| z*%={AD!s@ywo=(5DbAz!J?DJixxV*1f1d05&i7pR%ro;`vs`oEzx#Lpe)pu<+u;TH zr1(G}kN}ZjK?2UejdOyB19;@nIMW84z!4<88L0Aw^aAjNGr-i=6a;#Z3H$B^1%Ws~ z_BM`|yD#Dr5|&nzmqG5`XQ{95U}JF5!^$_n6c=_3AL&6$kG7?U-z?8^{JL}MW?@oq zT{`fVe;@zOz`sTYbXfYzKnsA#Bs+(l|KA75VS{@wP*vVgf=dJlB-pxp19yg$`+`6c z3q%W3$Ef2Uucc>=?5nW~Icq?i^VQV)yi*JC|r*UDmh~%br@l z*!eN$Cid12i2F(3YcNVGU(7!t-o1VjVsbvs>iqfhu^{85?e&k-K61li#4-<;l8E(; zwz%`g9K=_Bhv|(McD~K1v*R!4!`HUY-y3w{=F9rWYt*X=RQ2$GkR z2h%bnM2=_{=yrwfeM0XNS)xPU#Dq2oN{OsPW*`fU`#>2MnmXD~zJ9bl!QV6&P`LB0 zopXEpV|+x{g;=zOlLtDxWkzCdym7~E?Z?616Idzq7ro5B#|uUbvp@@tR?3afpY1>n zdnY=DY&YC2RbKtlRbz=tP4Eg`3T&!duyIL)wu}3uixAY|&ez}|6@`n5eH&+k`cdvl zd{t^$icO*sB6FS!dxnR<<;&-anODEd*h0CRwZpGk8f;WIxw9LyNv}&9#eaO?T+cNf zV}J_FH8u7+Wsr&7N`u*~aAYI-Y)!_p>Urm)pF;&eB4*7@T4~BNOJP-%32kT1?NxD#GI@$wM zc~cLsZEs)Ssal+WXQDVHR)Krnj+_1f)6ge_xe_+b?JEnlA$3@*QBBJ9NvdmnoAWc0 z*@*ZL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)#+nCw57d0Qr|YM>`Np)q=j21i%|^Z~ zKf&-Zcpd#Xm{*v+*PeY~N0J2@!ylhD=9cU?Viy(BhML~siw1Ta*y9&=gmxC7EvS#e RoV)*T5iRX3D$P9O{{sMF>M8&L literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/YoungDukeEyes.png b/Projectiles/Summon/YoungDukeEyes.png new file mode 100644 index 0000000000000000000000000000000000000000..5356cc010baab414e1cb15f6d51429182d069f5f GIT binary patch literal 421 zcmeAS@N?(olHy`uVBq!ia0vp^K+IIY!3JbWT{r6oQjEnx?oJHr&dIz4vg18n978JR zyuG`T_mF{z>qT*`Sv&_+4A@v%g^V4}OQmpfaXmZ9)WdjHo`KWS!*2PedD5r3@2~)k zfr5rO9&h^vQ-8nx;5X@SW$@(*D%UU1QMvi<*sc4XMSE=a{hEE1{~iZSH5%=ZzH5E^ zl;>YoEv~|)gdw*io%6JJf#J-6-NSoT!_ zT^h!}^ j * 16 - 300) + { + float yeetSpeed = MathHelper.Clamp(10f - (10f * Math.Abs(Main.LocalPlayer.Bottom.Y - j * 16) / 300f), 0f, 10f); + Main.LocalPlayer.velocity.Y -= yeetSpeed; + Projectile.NewProjectile(i * 16 + 8, j * 16 - 20, 0f, -10f, ModContent.ProjectileType(), 25, 0f); + } + } + } + } +} diff --git a/Tiles/Abyss/SteamGeyser.png b/Tiles/Abyss/SteamGeyser.png new file mode 100644 index 0000000000000000000000000000000000000000..ca6860255cf0a2cb035a08dce00dcedc49ad6973 GIT binary patch literal 949 zcmV;m14{gfP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D14>CmK~!i%?U}u6 zR6!KQcLfauEp!D9QC!3run@t*#2~tbg`kLNVPR#VrLBLIB7$IHkrmOzE?5XLeykrs z3!{Y+h!!jNzCFu&lEch?!F%ldV7Qr0-tOI*d+xn6DVHL-czUkc`f*Dhy?7q=Ud?9q zHsx~kN9Pi?9#kWNEx3P^Z9{8JKTaVAOE;rY5aB@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`=Fj*SZgAH?C=O?U#{*p>oyvRmq5lt1XnwB% diff --git a/World/Abyss.cs b/World/Abyss.cs index 6a63a7044e..ec82a14848 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -1,6 +1,9 @@ using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.FurnitureVoid; using CalamityMod.Walls; +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,7 +14,331 @@ namespace CalamityMod.World { public static void PlaceSulphurSea() { + CalamityWorld.abyssSide = Main.dungeonX < Main.maxTilesX / 2; + int yStart = DetermineYStart(); + // How wide the biome is. + // Note: Change this to suit all world sizes once the biome layout code is complete. + const int biomeWidth = 270; + // How deep the biome goes. + const int yDescent = 80; + + PlaceShallowSea(biomeWidth, yStart, yDescent); + PlaceCavernBlock(biomeWidth, yStart); + PlaceWaterCaverns(biomeWidth, yStart - 20); + PlaceScenery(yStart, yDescent, biomeWidth); + // Empty cavern pockets were becoming a problem. + ReplaceAirWithWater(yStart, biomeWidth); + RemoveWeirdSlopes(yStart, biomeWidth); + + // A copy of old sulf sea code that replaced all sand with sulph sea/abyss gravel. + // Made by Fabsol. + ReplaceRemainingSand(); + } + public static int DetermineYStart() + { + int xCheck = CalamityWorld.abyssSide ? + WorldGen.genRand.Next(95, 120) : + Main.maxTilesX - WorldGen.genRand.Next(95, 120); + int yStart = 1; + while (Main.tile[xCheck, yStart].liquid == 0) + { + yStart++; + if (yStart > Main.worldSurface) + break; + } + return yStart; + } + public static void PlaceShallowSea(int biomeWidth, int yStart, int yDescent) + { + // Create a block + if (CalamityWorld.abyssSide) + { + for (int x = 0; x < biomeWidth; x++) + { + float xRatio = MathHelper.Clamp(x / (float)biomeWidth, 0f, 0.7f); + for (int y = yStart; y < yStart + yDescent; y++) + { + if (1f - ((y - yStart) / (float)yDescent) < xRatio) + { + Main.tile[x, y].type = (ushort)ModContent.TileType(); + Main.tile[x, y].slope(0); + Main.tile[x, y].active(true); + } + else + { + Main.tile[x, y] = new Tile() + { + liquid = 255 + }; + } + } + } + } + else + { + int xCounter = 0; + for (int x = Main.maxTilesX - 1; x >= Main.maxTilesX - biomeWidth; x--) + { + float xRatio = MathHelper.Clamp(xCounter / (float)biomeWidth, 0f, 0.7f); + for (int y = yStart; y < yStart + yDescent; y++) + { + if (1f - ((y - yStart) / (float)yDescent) < xRatio) + { + Main.tile[x, y].type = (ushort)ModContent.TileType(); + Main.tile[x, y].slope(0); + Main.tile[x, y].active(true); + } + else + { + Main.tile[x, y] = new Tile() + { + liquid = 255 + }; + } + } + xCounter++; + } + } + } + public static void PlaceCavernBlock(int biomeWidth, int yStart) + { + if (CalamityWorld.abyssSide) + { + for (int x = 0; x < biomeWidth; x++) + { + for (int y = yStart; y < yStart + 150; y++) + { + if (Main.tile[x, y].liquid == 0) + { + Main.tile[x, y].type = (ushort)ModContent.TileType(); + Main.tile[x, y].slope(0); + Main.tile[x, y].active(true); + } + } + } + } + else + { + for (int x = Main.maxTilesX - biomeWidth; x < Main.maxTilesX; x++) + { + for (int y = yStart; y < yStart + 150; y++) + { + if (Main.tile[x, y].liquid == 0) + { + Main.tile[x, y].type = (ushort)ModContent.TileType(); + Main.tile[x, y].slope(0); + Main.tile[x, y].active(true); + } + } + } + } + } + public static void PlaceWaterCaverns(int biomeWidth, int yStart) + { + // This is used in other vanilla worldgen. However, it does not affect any worldgen after this. + // This is basically the point where TileRunner stops spawning water. + WorldGen.waterLine = 1; + int xStart = CalamityWorld.abyssSide ? biomeWidth / 2 : + Main.maxTilesX - biomeWidth / 2; + for (int c = 0; c < 6; c++) + { + Vector2 startingPosition = new Vector2(xStart, yStart); + while (!Main.tile[(int)startingPosition.X, (int)startingPosition.Y].active()) + { + startingPosition.Y++; + } + float xDirection = WorldGen.genRand.NextFloat(); + float yDirection = 1f - xDirection; + if (c == 0) + { + xDirection = WorldGen.genRand.NextFloat(1f, 2f); + yDirection = 2f; + } + if (WorldGen.genRand.NextBool(2)) + { + xDirection *= -1; + } + if (WorldGen.genRand.NextBool(2)) + { + yDirection *= -1; + } + for (int i = 0; i < 11; i++) + { + startingPosition = WorldGen.digTunnel(startingPosition.X, startingPosition.Y, xDirection, yDirection, WorldGen.genRand.Next(6, 20), WorldGen.genRand.Next(4, 9), false); + xDirection += WorldGen.genRand.NextFloat(-0.5f, 0.5f); + yDirection += WorldGen.genRand.NextFloat(-0.2f, 0.2f); + xDirection = MathHelper.Clamp(xDirection, -4f, 4f); + yDirection = MathHelper.Clamp(yDirection, -1f, 3f); + float xdirection2 = WorldGen.genRand.NextFloat(-0.4f, 0.4f); + float ydirection2 = WorldGen.genRand.NextFloat(-0.2f, 0.2f); + if (WorldGen.genRand.NextBool(2)) + { + xdirection2 *= -1; + } + if (WorldGen.genRand.NextBool(2)) + { + ydirection2 *= -1; + } + Vector2 tunnelVector = WorldGen.digTunnel(startingPosition.X, startingPosition.Y, xdirection2, ydirection2, WorldGen.genRand.Next(30, 50), WorldGen.genRand.Next(3, 6), false); + + // The -2 parameter causes the tile-runner to generate liquids. Water above the lavaLine and lava below. + WorldGen.TileRunner((int)tunnelVector.X, (int)tunnelVector.Y, WorldGen.genRand.Next(20, 28), WorldGen.genRand.Next(15, 18 + 1), -2, false, 0f, 0f, false, true); + } + } + } + public static void PlaceScenery(int yStart, int yDescent, int biomeWidth) + { + if (CalamityWorld.abyssSide) + { + for (int x = 1; x < biomeWidth; x++) + { + for (int y = yStart; y < yStart + yDescent; y++) + { + if (WorldGen.genRand.NextBool(6)) + { + if (!WorldGen.SolidTile(Framing.GetTileSafely(x, y + 1)) || + !WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y + 1)) || + WorldGen.SolidTile(Framing.GetTileSafely(x, y)) || + WorldGen.SolidTile(Framing.GetTileSafely(x, y - 1)) || + WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y)) || + WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y - 1))) + break; + WorldGen.PlaceTile(x, y, ModContent.TileType()); + } + } + } + } + else + { + for (int x = Main.maxTilesX - biomeWidth; x < Main.maxTilesX; x++) + { + for (int y = yStart; y < yStart + yDescent; y++) + { + if (WorldGen.genRand.NextBool(13)) + { + if (!WorldGen.SolidTile(Framing.GetTileSafely(x, y + 1)) || + !WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y + 1)) || + WorldGen.SolidTile(Framing.GetTileSafely(x, y)) || + WorldGen.SolidTile(Framing.GetTileSafely(x, y - 1)) || + WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y)) || + WorldGen.SolidTile(Framing.GetTileSafely(x + 1, y - 1))) + break; + WorldGen.PlaceTile(x, y, ModContent.TileType()); + } + } + } + } + + // Rock pillars in the water + for (int c = 1; c <= 2; c++) + { + int xStart; + if (CalamityWorld.abyssSide) + xStart = (WorldGen.genRand.Next(-5, 5 + 1) + biomeWidth / 2 + (int)(biomeWidth / 2 / 3f * c * 0.7f) - 20); + else + xStart = Main.maxTilesX - (WorldGen.genRand.Next(-5, 5 + 1) + biomeWidth / 2 + (int)(biomeWidth / 2 / 3f * c * 0.7f) - 20); + int dy = -20; + while (!Main.tile[xStart, yStart + dy].active() || + Main.tile[xStart, yStart + dy].type != (ushort)ModContent.TileType()) + { + dy++; + } + // Adjust to make sure we're a bit above water + int ascent = WorldGen.genRand.Next(18, 25 + 1); + switch (c) + { + case 2: + ascent += 24; + break; + case 1: + ascent += 8; + break; + } + + int widthTop = WorldGen.genRand.Next(3, 6 + 1); + int widthBottomAdditive = WorldGen.genRand.Next(13, 20 + 1); + float root = WorldGen.genRand.NextFloat(1.6f, 3.2f); + for (int y = yStart - ascent; y <= yStart; y++) + { + // The root is used to give a less linear scale + float yRatio = (float)Math.Pow(1f - (-(y - yStart) / (float)ascent), 1f / root); + int width = widthTop + (int)(widthBottomAdditive * yRatio); + for (int x = xStart - width / 2; x <= xStart + width / 2; x++) + { + Main.tile[x, y + dy].type = (ushort)ModContent.TileType(); + Main.tile[x, y + dy].slope(0); + Main.tile[x, y + dy].active(true); + } + } + } + } + public static void ReplaceAirWithWater(int yStart, int biomeWidth) + { + if (CalamityWorld.abyssSide) + { + for (int x = 0; x < biomeWidth; x++) + { + for (int y = yStart + 10; y < yStart + 180; y++) + { + if (!Main.tile[x, y].active()) + { + Main.tile[x, y] = new Tile() + { + liquid = 255 + }; + } + } + } + } + else + { + for (int x = Main.maxTilesX - biomeWidth; x < Main.maxTilesX; x++) + { + for (int y = yStart + 10; y < yStart + 180; y++) + { + if (!Main.tile[x, y].active()) + { + Main.tile[x, y] = new Tile() + { + liquid = 255 + }; + } + } + } + } + } + public static void RemoveWeirdSlopes(int yStart, int biomeWidth) + { + if (CalamityWorld.abyssSide) + { + for (int x = 0; x < biomeWidth; x++) + { + for (int y = yStart - 1; y >= yStart - 60; y--) + { + if (Main.tile[x, y].type == ModContent.TileType()) + { + Main.tile[x, y] = new Tile(); + } + } + } + } + else + { + for (int x = Main.maxTilesX - biomeWidth; x < Main.maxTilesX; x++) + { + for (int y = yStart - 1; y >= yStart - 60; y--) + { + if (Main.tile[x, y].type == ModContent.TileType()) + { + Main.tile[x, y] = new Tile(); + } + } + } + } + } + public static void ReplaceRemainingSand() + { int x = Main.maxTilesX; int y = Main.maxTilesY; int genLimit = x / 2; @@ -127,7 +454,6 @@ namespace CalamityMod.World public static void PlaceAbyss() { - int x = Main.maxTilesX; int y = Main.maxTilesY; int genLimit = x / 2; diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 6bc03d305b..435512ba79 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1,6 +1,7 @@ using CalamityMod; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; +using CalamityMod.Events; using CalamityMod.NPCs; using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.AquaticScourge; @@ -101,6 +102,7 @@ namespace CalamityMod.World public static int abyssTiles = 0; public static bool abyssSide = false; public static int abyssChasmBottom = 0; + public static bool rainingAcid; //Astral public static int astralTiles = 0; @@ -227,6 +229,7 @@ namespace CalamityMod.World armageddon = false; ironHeart = false; dragonScalesBought = false; + rainingAcid = false; } #endregion @@ -318,6 +321,8 @@ namespace CalamityMod.World downed.Add("clam"); if (dragonScalesBought) downed.Add("scales"); + if (rainingAcid) + downed.Add("acidRain"); return new TagCompound { @@ -377,6 +382,7 @@ namespace CalamityMod.World bossRushActive = downed.Contains("bossRushActive"); downedCLAM = downed.Contains("clam"); dragonScalesBought = downed.Contains("scales"); + rainingAcid = downed.Contains("acidRain"); abyssChasmBottom = tag.GetInt("abyssChasmBottom"); } @@ -457,6 +463,7 @@ namespace CalamityMod.World downedOldDuke = flags7[1]; downedCLAM = flags7[2]; dragonScalesBought = flags7[3]; + rainingAcid = flags7[4]; } else { @@ -535,6 +542,7 @@ namespace CalamityMod.World flags7[1] = downedOldDuke; flags7[2] = downedCLAM; flags7[3] = dragonScalesBought; + flags7[4] = rainingAcid; writer.Write(flags); writer.Write(flags2); @@ -617,6 +625,7 @@ namespace CalamityMod.World downedOldDuke = flags7[1]; downedCLAM = flags7[2]; dragonScalesBought = flags7[3]; + rainingAcid = flags7[4]; abyssChasmBottom = reader.ReadInt32(); } @@ -701,7 +710,7 @@ namespace CalamityMod.World WorldGenerationMethods.NewJungleTemple(); }); - int JungleTempleIndex2 = tasks.FindIndex(genpass => genpass.Name.Equals("Temple")); + int JungleTempleIndex2 = tasks.FindIndex(genpass => genpass.Name.Equals("Temple")); tasks[JungleTempleIndex2] = new PassLegacy("Temple", delegate (GenerationProgress progress) { progress.Message = "Building the jungle temple (Calamity)"; @@ -718,16 +727,6 @@ namespace CalamityMod.World WorldGenerationMethods.NewJungleTempleLihzahrdAltar(); }); - int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); - if (SulphurIndex != -1) - { - tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress) - { - progress.Message = "Sulphur Sea"; - Abyss.PlaceSulphurSea(); - })); - } - int FinalIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Final Cleanup")); if (FinalIndex != -1) { @@ -781,6 +780,17 @@ namespace CalamityMod.World Abyss.PlaceAbyss(); })); + // Moved to prevent the sulf sea caverns from being swallowed by the abyss opening + int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); + if (SulphurIndex != -1) + { + tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress) + { + progress.Message = "Sulphur Sea"; + Abyss.PlaceSulphurSea(); + })); + } + tasks.Insert(FinalIndex + 4, new PassLegacy("IWannaRock", delegate (GenerationProgress progress) { progress.Message = "I Wanna Rock"; @@ -825,6 +835,21 @@ namespace CalamityMod.World CalamityMod.UpdateServerBoolean(); } + if (rainingAcid) + { + // Makes rain pour at its maximum intensity + // You'll never catch me, Fabs, Not when I shift into MAXIMUM OVERDRIVE!! + Main.raining = true; + Main.cloudBGActive = 1f; + Main.numCloudsTemp = Main.cloudLimit; + Main.numClouds = Main.numCloudsTemp; + Main.windSpeedTemp = 0.72f; + Main.windSpeedSet = Main.windSpeedTemp; + Main.weatherCounter = 600; + Main.maxRaining = 0.89f; + Main.invasionProgressNearInvasion = true; + } + // Boss Rush shit if (bossRushActive) { diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 76d5651965..1d3c744f32 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -4047,7 +4047,7 @@ namespace CalamityMod.World vector2.X = (float)WorldGen.genRand.Next(-1, 2) * 0.1f; vector2.Y = (float)WorldGen.genRand.Next(3, 8) * 0.2f + 0.5f; int num2 = 5; - double num3 = (double)(WorldGen.genRand.Next(5, 7) + 40); //start width + double num3 = (double)(WorldGen.genRand.Next(5, 7) + 20); //start width while (num3 > 0.0) { if (num > 0f) @@ -4074,13 +4074,13 @@ namespace CalamityMod.World { num3 = ocean ? 42.0 : 14.0; //min width } - if (num3 > (ocean ? 60.0 : 40.0)) //max width + if (num3 > (ocean ? 50.0 : 30.0)) //max width { - num3 = ocean ? 60.0 : 40.0; //max width + num3 = ocean ? 50.0 : 30.0; //max width } - if (num == 1f && num3 < (ocean ? 50.0 : 20.0)) + if (num == 1f && num3 < (ocean ? 40.0 : 15.0)) { - num3 = ocean ? 50.0 : 20.0; + num3 = ocean ? 40.0 : 15.0; } } } From d115cd4fbb088214140abc72a6ca8ff40e4ac44e Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Mon, 9 Mar 2020 18:26:55 -0500 Subject: [PATCH 04/40] Oversight fixes --- Projectiles/Summon/CryogenShieldIce.cs | 36 ---------------------- Projectiles/Summon/CryogenShieldIce.png | Bin 834 -> 0 bytes Projectiles/Summon/SkeletalDragonChild.cs | 2 +- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 Projectiles/Summon/CryogenShieldIce.cs delete mode 100644 Projectiles/Summon/CryogenShieldIce.png diff --git a/Projectiles/Summon/CryogenShieldIce.cs b/Projectiles/Summon/CryogenShieldIce.cs deleted file mode 100644 index 359e61a201..0000000000 --- a/Projectiles/Summon/CryogenShieldIce.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class CryogenShieldIce : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Icicle"); - ProjectileID.Sets.MinionShot[projectile.type] = true; - } - - public override void SetDefaults() - { - projectile.friendly = true; - projectile.width = 28; - projectile.height = 60; - projectile.minion = true; - projectile.minionSlots = 0f; - projectile.ignoreWater = false; - projectile.tileCollide = false; - } - - public override void AI() - { - Player player = Main.player[projectile.owner]; - - projectile.ai[1] += MathHelper.ToRadians(2f); - projectile.rotation = projectile.ai[1] + MathHelper.PiOver2; - - projectile.Center = player.Center + projectile.ai[1].ToRotationVector2() * 230f; - } - } -} diff --git a/Projectiles/Summon/CryogenShieldIce.png b/Projectiles/Summon/CryogenShieldIce.png deleted file mode 100644 index 8d93534e6c3f3e4c7aa024e67d4bfca9af097352..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 834 zcmV-I1HJr-P)Px%{7FPXR9J=0m`z9&VHn4MV;@qst8SZ!p=PFp29jo7`XD+)MMTgc$PNjGr!IYf z9Xqs81mUruE)pGtgs`AfnGhKz9g=7(X*X<0Meg60MOrkMKy)13YOLTKWL@jj=Rry0x-}O6JjHm z1%pfIRAFQTkoDTHm%%5jJaPhnWM5BCUIw4A?c`hv|y%{O-d zxX^Oe(@TAXkx(N5tD_|V%%&$i2X;UBV!M|rB2sy&-^0Yqrx}1lw;y^AtgfvC;Opl& zkj+F+FDsgN*u2a;p&{NCtuF&$=EszLXnV*dOO;IEU7+1tY?UA z$4&vTs;0?v;I5;Gm$i_P=08docxU_K@5npby;Ox)j~)YA@0^}F<@7lJgc6nFol|ns zR>?^qQT@HI$F;xyOe1oV35o2(*y-!8{f2H`2B5UM!2p>1{R@DC0&^)X`_Sg$Ql5z< zItRL9w)V8;VJbejXf4n|Sh;CGpw6M?4c_}KX+@*zpLufb`21R+X&>4e()) { projectile.Kill(); return; From fbfd3149e572bc18dae3966c7b5b3748ae2a561b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 9 Mar 2020 20:08:40 -0400 Subject: [PATCH 05/40] umbrella/hat and cleaning up some Dom crap --- Buffs/FuelCellBundleSummon.png | Bin 1467 -> 0 bytes Buffs/Summon/MagicHatBuff.cs | 36 +++ Buffs/Summon/MagicHatBuff.png | Bin 0 -> 509 bytes Items/Weapons/Summon/BensUmbrella.cs | 91 ++++++ Items/Weapons/Summon/BensUmbrella.png | Bin 0 -> 1198 bytes Items/Weapons/Summon/CorvidHarbringerStaff.cs | 4 +- Items/Weapons/Summon/CosmicImmaterializer.cs | 2 +- Items/Weapons/Summon/RadiantResolution.cs | 2 +- Projectiles/Summon/MagicAxe.cs | 271 ++++++++++++++++ Projectiles/Summon/MagicAxe.png | Bin 0 -> 555 bytes Projectiles/Summon/MagicBat.cs | 56 ++++ Projectiles/Summon/MagicBat.png | Bin 0 -> 454 bytes Projectiles/Summon/MagicBird.cs | 145 +++++++++ Projectiles/Summon/MagicBird.png | Bin 0 -> 2076 bytes Projectiles/Summon/MagicBullet.cs | 58 ++++ Projectiles/Summon/MagicBullet.png | Bin 0 -> 130 bytes Projectiles/Summon/MagicHammer.cs | 165 ++++++++++ Projectiles/Summon/MagicHammer.png | Bin 0 -> 586 bytes Projectiles/Summon/MagicHat.cs | 178 +++++++++++ Projectiles/Summon/MagicHat.png | Bin 0 -> 502 bytes Projectiles/Summon/MagicRifle.cs | 235 ++++++++++++++ Projectiles/Summon/MagicRifle.png | Bin 0 -> 604 bytes Projectiles/Summon/MagicUmbrella.cs | 298 ++++++++++++++++++ Projectiles/Summon/MagicUmbrella.png | Bin 0 -> 493 bytes 24 files changed, 1537 insertions(+), 4 deletions(-) delete mode 100644 Buffs/FuelCellBundleSummon.png create mode 100644 Buffs/Summon/MagicHatBuff.cs create mode 100644 Buffs/Summon/MagicHatBuff.png create mode 100644 Items/Weapons/Summon/BensUmbrella.cs create mode 100644 Items/Weapons/Summon/BensUmbrella.png create mode 100644 Projectiles/Summon/MagicAxe.cs create mode 100644 Projectiles/Summon/MagicAxe.png create mode 100644 Projectiles/Summon/MagicBat.cs create mode 100644 Projectiles/Summon/MagicBat.png create mode 100644 Projectiles/Summon/MagicBird.cs create mode 100644 Projectiles/Summon/MagicBird.png create mode 100644 Projectiles/Summon/MagicBullet.cs create mode 100644 Projectiles/Summon/MagicBullet.png create mode 100644 Projectiles/Summon/MagicHammer.cs create mode 100644 Projectiles/Summon/MagicHammer.png create mode 100644 Projectiles/Summon/MagicHat.cs create mode 100644 Projectiles/Summon/MagicHat.png create mode 100644 Projectiles/Summon/MagicRifle.cs create mode 100644 Projectiles/Summon/MagicRifle.png create mode 100644 Projectiles/Summon/MagicUmbrella.cs create mode 100644 Projectiles/Summon/MagicUmbrella.png diff --git a/Buffs/FuelCellBundleSummon.png b/Buffs/FuelCellBundleSummon.png deleted file mode 100644 index e210f873f1403775f471fc5d26b6c98039b6c4ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1467 zcmai!eNfT|7{`BY>h~`TsLZ()>`9_8%Na;EgQz;@% z%a-pA#eBgeJ<*iBz%9)L_|k_wrkrT&-1`&S@=M#3B&>d z0Dy^)w--UL2z^a%Fw}SXU`&Z#KokPj1K{=UngIZCvX7Vhk12QO?&8kuir)T=aq85B z_1nfhg%7s1_RWUHiPz_vj0`M0r}luTYw>DwNe!Q zCMru+@@Q=3o#&2rozYGJGuAq+vc_>RQPMl!L{?IzTMEjFk*x9MPE1+>jQ2_<$iJ`Y z*6T~nTM(7YCxklFcD@3Y%0eLtzC&1d(O6U|s9m{u0smo`6lc^;P>S;NKnd!h7fVhE zhPK}nsElv{eX5P3o13@1eS5{MJFpdW9);Ljc0JM#UAerh*47G*<@w0tbTBlPVoU+5 zYirggEOx3dujD|FC2|j0j^bsX+&=s+P<7NPcf$8>%e8#2XKCyWiRkc$3@A0_tmT#h zd;5C^X8`u_65!ot(KpgJ=c6|ouPEp{EDg)e!=6dh=+ zHR|JX(xVOH4+@ulIu}8G-{*1lFgE@rr6)j_D@HjTJy<%I(y(!S=3%fRhm)#$^%(TW zSr~3~*|Ciy-qzctaD(|jaAe_*|HKmB6~c67DB0-nt!nxq$$N+zWM2E>bPs}+ULs%gluXP zY~A>3MovA($Iw&eldk0;!!Ckt2x8H>yrVLo^TY#jn#&$c4+S-d)X~g;#;tFF_p(RA zHO`2TiZe23PfTI<)taFAYE0%eiKq;-V>gUJM>Y#t^&jc-QZh3%>*%zPSdXx^tb5QS z8q2Ynq23FpgO8~MM^t1(&4xXbFUsbv9)?SM&cpF>wCRiza?D5r-&mka(iqoQtamoy zgzOWbb4Te(eB;x0a+p17BZrbtYL?t@{|bGB^fNovGxX!==3tuRFHot;$^RKuR>2rt zr07fe%Ig0J_DgGj>R{)*SB@22H|7spSSPO}i|3fb!i-CUzu6dtkUV#g@=5R`V&~n1 zrMVJUXY^VXCiY(5D9Sf1S%0f_68mb)1?+SmNHA^J80OEH%TWbPSNd_A)yTd(>NQ}% zlK-+W>fvrm-A%_f9cX(dCTrDOG^Ss&XD?Jz`DXf9&67hA2$C&k-=fD`^AGl`W2}q% zs%Qmyy&+fTEF3gR#|LEgp(hN6Rd?USo-Bq37b2PnB!30I&GJr#d-$sPm34JgHUZy7 znp3R&j9(A-Bc}C#bU*@4jxcaMZM?_$hcz^#gJKNjwWVhSvyw`aG~LvIZ%1VI9sdZ9 cx>&RZ()] > 0) + { + modPlayer.magicHat = true; + } + if (!modPlayer.magicHat) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/MagicHatBuff.png b/Buffs/Summon/MagicHatBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..fb326780749e21887184d1c9b25da11158f205b1 GIT binary patch literal 509 zcmVPx$w@E}nR9J=OS3OSxK@fds2!&Dzi5Ddl=#_@T#Dc`uP+<56)>``$?Ch*9O|-SK zvnQc2F@#`ukpj^`0u(?&qs84jv*XQCn7}5!Wa1df6Q~bgbF`aZA09ae* zkH*0v^GczXxY3_?005tpQR2SotZR%tw-mJLqA~x}eFR{E0x4}lW4xWo0{G1+LhisA zk||uoerKNolDWoskx!g?Ct)w}Eh^y^Y*&Dcj>KI`#?sq~MbRW-j{^1K3jm$D-)|)v zx+t9+vf;0N|xeAEGZ1D_6jgb%69{qCM&X__^cb zYSUP6HZP5R5>X~(G=z%Sqkue_1igAMyldWZ2?KP-{X$Mu)6u{t9~)&|X8% zt5tCbEgJ021BAwWkuQ*`%#4J+Zvi|1_TTY0{;I#O4%}4300000NkvXXu0mjf)Mn!! literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs new file mode 100644 index 0000000000..274185f0ee --- /dev/null +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -0,0 +1,91 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Tools; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class BensUmbrella : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ben's Umbrella"); + Tooltip.SetDefault("Surprisingly sturdy, I reckon this could defeat the Mafia in a single blow\n" + + "Summons a magic hat to hover above your head\n" + + "The hat will release a variety of objects to assault your foes\n" + + "Requires 5 minion slots to use\n" + + "There can only be one"); + } + + public override void SetDefaults() + { + item.mana = 99; + item.damage = 3001; + item.useStyle = 1; + item.width = 74; + item.height = 72; + item.useTime = 36; + item.useAnimation = 36; + item.noMelee = true; + item.knockBack = 0f; + item.value = Item.buyPrice(5, 0, 0, 0); + item.Calamity().postMoonLordRarity = 16; + item.rare = 10; + item.UseSound = SoundID.Item68; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + } + + public override bool CanUseItem(Player player) + { + for (int i = 0; i < Main.maxProjectiles; i++) + { + Projectile p = Main.projectile[i]; + if (p.active && p.type == ModContent.ProjectileType() && p.owner == player.whoAmI) + { + return false; + } + } + return true; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + for (int x = 0; x < Main.projectile.Length; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.active && projectile.owner == player.whoAmI && projectile.type == type) + { + projectile.Kill(); + } + } + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.Umbrella); + recipe.AddIngredient(ItemID.TopHat); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Summon/BensUmbrella.png b/Items/Weapons/Summon/BensUmbrella.png new file mode 100644 index 0000000000000000000000000000000000000000..8d9a67b7e050aa1cef85719ac83bf1792841d22b GIT binary patch literal 1198 zcmV;f1X25mP)Px(Xh}ptRA_g%Tk_n+O6zzyMNVfC&cFp%Ps{ zA_HQogcuMK>Vy~==+3}EH--`k1_~7|s0pf6nW})AMrr_)qNdcvabkv-zwP&OFL!oK z47vL)$-R3%pZxRp-uu3L4%lW)4($hES1t>{&2pvMc)n}vZ>h6nJADJK(w~1kw0)&} z1%R97TUCJJJNf{a`{O#0K*K?&Zy*Yv$?Wa{04mq6R>RJ}GHzU+Dl7r8E0+x*HQYIT zCcB6C0kAxGG1O%L!B+w3nivP*p^sk&;LCXv%Oia&0YGN?mg(2FJN}>0F~hFWD3kf4 zA2oIT;<4BCZve1ZJPjn!@RrTPQAU^NE&_Fvg9iq!{`0f**0JyW>baQ>?;|zbE?lFJ zj+;^P%*@V~jEbm!i_^ye$nG8p04mq6TIW;4n?+`Cf9weW{`~gqD!`eUod8_==Caj) zDmMzi_a}Z1y`GHj*_*T4&%Sj6sL#JHGON*9q=s8XX7@bv6aWifd{qTF@X2QYd^+@? z)&Hd{=K+|XwaxmB3g0&&YIGK<;bw7TR%W03ZrbWM#gEpp%(_NDEZ-m6U&y2zyHTUF zNDa4&Mq|Zn6c4{Ry5V`57L)J17wfvd(OIO1>9o80h8U_xNttSiYT+H3#;;=SamBAI*u|cd}dwZ#%}Gpv3hMI!eY1z zaN~l>SAA<^w@RqLbDnI*9i?5fzRHEm;gcqI$NEbFKw+^b*6V8T(^T(mK<&vxLkx$m zoT4fb!mUU|)sLghy7R48Rya=-;*uK9jZFYhE}XMW$2Bb66_>Bh?89d^clT%jQ2y0? zlTyPGtb2MGlIMojsN&|kQT1ct%WKQL({%YT?U%HfvTS&agKh)+egHi+?Scs$|Lej9jxa zIeg>=t6ghsna%X&16ZF=H=F%5OKMoiY`%A`%TlQd@bsYByQooHxcjAqR#>(6wa}N@ zf6Jtg)Ua!|xMcPlKRMP5z^Q`Sl{(PV69D|yeHQ?W)5p!Tr6cj?=}wV6!!jy%WHUgR zS+grO-)nZIvQz@rkFv8bKM(k0y3-`jFl!YK@pr}SLe)-k#jMO0mns09z48NKt;hnX z?_*X>=O;`)t-X)k!}|iLKW*G<5@$G=9NKUFHsGE+jc~>6j%+4?x_O!P;j5f9z9($` z{3{Y?xHb>V?B(C>1S+msQOl(), 5); - recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index 9eabdb1c34..edf411b7e8 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); diff --git a/Items/Weapons/Summon/RadiantResolution.cs b/Items/Weapons/Summon/RadiantResolution.cs index c475dbcb74..114a10c885 100644 --- a/Items/Weapons/Summon/RadiantResolution.cs +++ b/Items/Weapons/Summon/RadiantResolution.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon item.damage = 555; item.knockBack = 3f; item.autoReuse = true; - item.useTime = item.useAnimation = 40; + item.useTime = item.useAnimation = 36; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; diff --git a/Projectiles/Summon/MagicAxe.cs b/Projectiles/Summon/MagicAxe.cs new file mode 100644 index 0000000000..f3f1be5dbc --- /dev/null +++ b/Projectiles/Summon/MagicAxe.cs @@ -0,0 +1,271 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class MagicAxe : ModProjectile + { + private int counter = 0; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Axe"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 52; + projectile.height = 52; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 0; + projectile.timeLeft = 180; + projectile.penetrate = -1; + projectile.minion = true; + projectile.tileCollide = false; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 4; + projectile.alpha = 255; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + + projectile.rotation += 0.075f; + projectile.alpha -= 50; + float num634 = 1200f; + float num635 = 2500f; + float num637 = 0.05f; + for (int num638 = 0; num638 < Main.projectile.Length; num638++) + { + bool flag23 = Main.projectile[num638].type == ModContent.ProjectileType(); + if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && flag23 && Math.Abs(projectile.position.X - Main.projectile[num638].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num638].position.Y) < (float)projectile.width) + { + if (projectile.position.X < Main.projectile[num638].position.X) + { + projectile.velocity.X = projectile.velocity.X - num637; + } + else + { + projectile.velocity.X = projectile.velocity.X + num637; + } + if (projectile.position.Y < Main.projectile[num638].position.Y) + { + projectile.velocity.Y = projectile.velocity.Y - num637; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + num637; + } + } + } + if (projectile.ai[1] <= 30) + { + projectile.ai[1]++; + return; + } + bool flag24 = false; + if (projectile.ai[0] == 2f) + { + counter += 1; + projectile.extraUpdates = 4; + if (counter > 30) + { + counter = 1; + projectile.ai[0] = 0f; + projectile.extraUpdates = 1; + projectile.numUpdates = 0; + projectile.netUpdate = true; + } + else + { + flag24 = true; + } + } + if (flag24) + { + return; + } + Vector2 vector46 = projectile.position; + float homingRange = 700f; + bool homeIn = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(npc.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < homingRange) || !homeIn) + { + homingRange = num646; + vector46 = npc.Center; + homeIn = true; + } + } + } + else + { + for (int num645 = 0; num645 < Main.npc.Length; num645++) + { + NPC nPC2 = Main.npc[num645]; + if (nPC2.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(nPC2.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < homingRange) || !homeIn) + { + homingRange = num646; + vector46 = nPC2.Center; + homeIn = true; + } + } + } + } + float num647 = num634; + if (homeIn) + { + num647 = num635; + } + if (Vector2.Distance(player.Center, projectile.Center) > num647) + { + projectile.ai[0] = 1f; + projectile.netUpdate = true; + } + if (homeIn && projectile.ai[0] == 0f) + { + Vector2 vector47 = vector46 - projectile.Center; + float num648 = vector47.Length(); + vector47.Normalize(); + if (num648 > 200f) + { + float scaleFactor2 = 24f; //8 + vector47 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + else + { + float num649 = 12f; //4 + vector47 *= -num649; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; //41 + } + } + else + { + bool flag26 = false; + float num636 = 400f; + if (!flag26) + { + flag26 = projectile.ai[0] == 1f; + } + float num650 = 6f; + if (flag26) + { + num650 = 15f; + } + Vector2 center2 = projectile.Center; + Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); + float playerDist = vector48.Length(); + if (playerDist > 200f && num650 < 8f) + { + num650 = 8f; + } + if (playerDist < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + if (playerDist > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (playerDist > 70f) + { + vector48.Normalize(); + vector48 *= num650; + projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; + } + else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.15f; + projectile.velocity.Y = -0.05f; + } + } + if (counter > 0) + { + counter += Main.rand.Next(1, 4); + } + if (counter > 30) + { + counter = 0; + projectile.netUpdate = true; + } + if (projectile.ai[0] == 0f) + { + if (counter == 0 && homeIn && homingRange < 500f) + { + counter += 1; + if (Main.myPlayer == projectile.owner) + { + projectile.ai[0] = 2f; + Vector2 value20 = vector46 - projectile.Center; + value20.Normalize(); + projectile.velocity = value20 * 16f; //8 + projectile.netUpdate = true; + } + } + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(0, 255, 111, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 66, dspeed.X, dspeed.Y, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.75f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Summon/MagicAxe.png b/Projectiles/Summon/MagicAxe.png new file mode 100644 index 0000000000000000000000000000000000000000..4790f40a3f3a51e86d54c1eec23eb3e57393cd9d GIT binary patch literal 555 zcmV+`0@VG9P)Px$Pl$iP=+=9=bm0X&jXTfaz1(Ub0gRDZ%zPPWL4JZn zdw3foO(Usibyt_+&Dn0Z0EA(f0{Fgfvg2VG0&qMY0r=|m?Rvm_)q{7t-P7?XiU7FX zZop%tg~nH_l`f?Kr_%|5$z);x*6TIkpdnLzOEU`0q|feGq?gO30hmsw0POdB05+Qq z0C60rkTaE=uiSFZ(93d&3NymajVOw8IdQ+=Yt0XW02mCtp7Z&f0xT8_18})q3UkLs z`_y2lDar{&UXj-7By`=*so88+>vuG7FjSWy2nVOPmjt5jDwXQ=ZW z(he{BG9v~JkKF^Jp?LS>H7%D^Opd?9v$H*s1VgN>?5!p{_R^?U5{9wq& zKB11sV>{yJ_c{RA>lG-^v9>sSVr^Y1)aV@)K3h3fV6qj?_Y@i%YHCK^o6NjU&8ROI z$1&ibq1vllTQfFgC)g_NT**`Gb!W7SJgK$b+Kh0|kli=aj;!xGY3e-lu4aULhU{9(Hl-c?a5(h)W-W2g tP}zX0TGdXUg8PQ-+$pPS-xcQ!eFLVB+?*|@{LlaZ002ovPDHLkV1huk0jvN3 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MagicBat.cs b/Projectiles/Summon/MagicBat.cs new file mode 100644 index 0000000000..ed58a72851 --- /dev/null +++ b/Projectiles/Summon/MagicBat.cs @@ -0,0 +1,56 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MagicBat : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Baseball Bat"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 150; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(80, 200, 120, projectile.alpha); + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 67, dspeed.X, dspeed.Y, 50, default, 1.2f); + Main.dust[dust].noGravity = true; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + } +} diff --git a/Projectiles/Summon/MagicBat.png b/Projectiles/Summon/MagicBat.png new file mode 100644 index 0000000000000000000000000000000000000000..b574ad075385cd427d07ae4454eba3f78284a9b3 GIT binary patch literal 454 zcmV;%0XhDOP)Px$fJsC_RA_pB2}Ah^$Y zon)NIR!QQiSrWsXh-q6%C?~SEttFHbS=zfK+&Z$fcS&?z=K=J64>*zO-X+0c%-8D` za3bUFEuoyquun-SYean017ukSK-;zegkiX=gmNM(iXs52s=5P&VQ6~DMH0%1Xl|&n z>rV?>C83;%=7z2a#&Nv%P(~8!dqp;!8=FX|?-f})H?+4-lEj1G^~O{}StBz0>{n;E zbzK7x$MMT^DhWhU^yfXArU9TRiY4Qm?0ZDU_8I!d^{chFz%cto=I;3Fy8ej3FndK7 z?7cT#nN71tMEA9Q|FOuQPLI#_;;!nUB$PEG{@6bZhU)|el~DGGjO{1%xb8y)K>!?2 wLfIoS^@Q8)1{_yH*)Q^RHoMzkOtMDg2l!8uVct$VvH$=807*qoM6N<$f?s#j#sB~S literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MagicBird.cs b/Projectiles/Summon/MagicBird.cs new file mode 100644 index 0000000000..2bb8f5ba5a --- /dev/null +++ b/Projectiles/Summon/MagicBird.cs @@ -0,0 +1,145 @@ +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class MagicBird : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bird"); + Main.projFrames[projectile.type] = 7; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 14; + projectile.height = 14; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.extraUpdates = 1; + projectile.alpha = 255; + projectile.timeLeft = 180; + } + + public override void AI() + { + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= 7) + { + projectile.frame = 0; + } + projectile.ai[0]++; + projectile.ai[1]++; + if (projectile.ai[0] >= 20f) + { + Vector2 dspeed = projectile.velocity * Main.rand.NextFloat(0.3f,0.6f); + int dust = Dust.NewDust(projectile.Center, 1, 1, 67, dspeed.X, dspeed.Y, 50, default, 1.2f); + Main.dust[dust].noGravity = true; + projectile.ai[0] = 0f; + } + + //Homing + if (projectile.ai[1] > 30f) + HomingAI(); + //Fade in + if (projectile.alpha > 0) + { + projectile.alpha -= 15; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + } + + private void HomingAI() + { + Player player = Main.player[projectile.owner]; + int targetIdx = -1; + float maxHomingRange = 700f; + bool hasHomingTarget = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float dist = (projectile.Center - npc.Center).Length(); + if (dist < maxHomingRange) + { + targetIdx = player.MinionAttackTargetNPC; + maxHomingRange = dist; + hasHomingTarget = true; + } + } + } + else + { + for (int i = 0; i < Main.npc.Length; ++i) + { + NPC npc = Main.npc[i]; + if (npc == null || !npc.active) + continue; + + if (npc.CanBeChasedBy(projectile, false)) + { + float dist = (projectile.Center - npc.Center).Length(); + if (dist < maxHomingRange) + { + targetIdx = i; + maxHomingRange = dist; + hasHomingTarget = true; + } + } + } + } + + // Home in on said closest NPC. + if (hasHomingTarget) + { + NPC target = Main.npc[targetIdx]; + Vector2 homingVector = (target.Center - projectile.Center).SafeNormalize(Vector2.Zero) * 32f; + float homingRatio = 15f; + projectile.velocity = (projectile.velocity * homingRatio + homingVector) / (homingRatio + 1f); + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 67, dspeed.X, dspeed.Y, 50, default, 1.2f); + Main.dust[dust].noGravity = true; + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 239, 0, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Summon/MagicBird.png b/Projectiles/Summon/MagicBird.png new file mode 100644 index 0000000000000000000000000000000000000000..b9eb9d0c2793f29395ef1b0408e75c5f7b2ed46a GIT binary patch literal 2076 zcmV+%2;=vOP)!b00001b5ch_0Itp) z=>Px+)=5M`RCt{2ozHLEWEjW4E-A#F*QRlnwPD?~^*}YWA~7T+gfvbJv`L)d0{jCU zIKhDvmtEl>0IqOl+O*RqRY*Gwq4ltF=q5JQWLw-{bLULWS`O)x+E4u2uVXt++4GSq zC3YOU-#mWa*Iz$=Ujq@?rD*`ziTaEWW2`uVXRY( z;DvX;0RYUG-Ua~NUi%XOaOKCh&Q$e4n{A`-05hfTlBHA%LR-70}Z_V>Oj9cn|QoApq>O&B^S0Y?d-**~*K~(*X z#91P*esR0K)ouQxNYz^-!W36gF5AZT_6xLHEwoy#p7n7(xzu?$X>6~oI4}z~Mn^0y zMLCHT4kKx&JZm>d5ClOG1VIp97W(SI>vq_S#p3Rt2>@udJmsZP7@_{K?m@))!z#E_ z^iuo7M5J;mf0#V8{%}_Qu&QpDIC(O-T>Rm*^~3aeQkHyR@rQwQ z^~2md~mqp@*Mdt29aF?Z^n)Mj=n2VR_aK@bE%5CkE} z!S#pZ4o3Xpto-3|tAY);2`K*axbY=aWaSU{D7@h|VVb7aK@5WJ?HApH1tLc95Pvu$ zln%U#q~l8vTv>`?qHlkA*y!z5YD_b-t!7 zz?B{P`eD!W_P2gmRrAiX1wDO0$1-&F!)eK-e%ODXPvy{4?Ao?%IF18A&)v)=4=1_L z=Qs{#PrRvZ#b&8+q85|4U_*P4gK%9JwWHys3Q_D!4Ll)^ydVgIAaF8inpMO#+5I%l zxpjWdpZknn?kN8H>VxF!58Jj4$8nT)YTWkw;tzlEWw4&jcMTWEaQVY=49p*UpA z>xY5xzDANNSJn8#1M}9#iW7;dTxtB_fz%JHkSbR}5ClQUid>wZJe%Ic^%AwCvsiu< z>HHX#$r_rg!AbP?ZH~p|M@z6QOSztANy`iE2eJLix~{8yn)b%^g`U|gYe#1XtFT>~ zj#XBLWm#B$w3K>YIzlUk{den0+4o-i3P7*_K;9WSJXy_4M-1%Q{A#s|QmK@_emKET z6oP>zj>KJIRvR7_P6}rI!IO?DEY^0Mu8} zVGdAbvNrrNOpr65)+g@knvU>a+fhvOSSGUaiBoxN{ao7>3Ztny`r7_*T>UV`GL3)9 z=lUABKRit1OY~KHsj44VjYG_(), 180); + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(BuffID.BetsysCurse, 180); + target.AddBuff(BuffID.Ichor, 180); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(BuffID.BetsysCurse, 180); + target.AddBuff(BuffID.Ichor, 180); + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(189, 51, 164, projectile.alpha); + } + } +} diff --git a/Projectiles/Summon/MagicBullet.png b/Projectiles/Summon/MagicBullet.png new file mode 100644 index 0000000000000000000000000000000000000000..2fabfdd09aae7ab575a02337af89b73678c5c528 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Ed!3HF~v+~XZDNj!q#}JO0$u`0gKjt?AK_??u z#5ud#;|*Fx7Xz4lUH<>!HkmkG-fmH6Ou$oj;fWI*joBw3{Pc)(*U9zo?c9Y0L#L@M cX_H`M*w83)t>Kwg1<+6iPgg&ebxsLQ07Wb+Q2+n{ literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MagicHammer.cs b/Projectiles/Summon/MagicHammer.cs new file mode 100644 index 0000000000..78361808a5 --- /dev/null +++ b/Projectiles/Summon/MagicHammer.cs @@ -0,0 +1,165 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MagicHammer : ModProjectile + { + private int counter = 0; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hammer"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 60; + projectile.height = 60; + projectile.alpha = 255; + projectile.friendly = true; + projectile.minion = true; + projectile.penetrate = 10; + projectile.timeLeft = 180; + projectile.tileCollide = false; + projectile.extraUpdates = 1; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 5; + } + + public override void AI() + { + projectile.localAI[1] += 1f; + if (projectile.localAI[1] > 10f && Main.rand.NextBool(3)) + { + projectile.alpha -= 5; + if (projectile.alpha < 50) + { + projectile.alpha = 50; + } + } + projectile.rotation += 0.075f; + if (counter <= 30) + { + counter++; + return; + } + int num716 = -1; + Vector2 vector59 = projectile.Center; + float num717 = 700f; + if (projectile.localAI[0] > 0f) + { + projectile.localAI[0] -= 1f; + } + Player player = Main.player[projectile.owner]; + if (projectile.ai[0] == 0f && projectile.localAI[0] == 0f) + { + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false) && (projectile.ai[0] == 0f || projectile.ai[0] == (float)(player.MinionAttackTargetNPC + 1))) + { + Vector2 center4 = npc.Center; + float num719 = Vector2.Distance(center4, vector59); + if (num719 < num717) + { + num717 = num719; + vector59 = center4; + num716 = player.MinionAttackTargetNPC; + } + } + } + else + { + for (int num718 = 0; num718 < Main.npc.Length; num718++) + { + NPC nPC6 = Main.npc[num718]; + if (nPC6.CanBeChasedBy(projectile, false) && (projectile.ai[0] == 0f || projectile.ai[0] == (float)(num718 + 1))) + { + Vector2 center4 = nPC6.Center; + float num719 = Vector2.Distance(center4, vector59); + if (num719 < num717) + { + num717 = num719; + vector59 = center4; + num716 = num718; + } + } + } + } + if (num716 >= 0) + { + projectile.ai[0] = (float)(num716 + 1); + projectile.netUpdate = true; + } + } + if (projectile.localAI[0] == 0f && projectile.ai[0] == 0f) + { + projectile.localAI[0] = 30f; + } + bool flag32 = false; + if (projectile.ai[0] != 0f) + { + int num720 = (int)(projectile.ai[0] - 1f); + if (Main.npc[num720].active && !Main.npc[num720].dontTakeDamage && Main.npc[num720].immune[projectile.owner] == 0) + { + float num721 = Main.npc[num720].position.X + (float)(Main.npc[num720].width / 2); + float num722 = Main.npc[num720].position.Y + (float)(Main.npc[num720].height / 2); + float num723 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num721) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num722); + if (num723 < 1000f) + { + flag32 = true; + vector59 = Main.npc[num720].Center; + } + } + else + { + projectile.ai[0] = 0f; + flag32 = false; + projectile.netUpdate = true; + } + } + if (flag32) + { + Vector2 v = vector59 - projectile.Center; + float num724 = projectile.velocity.ToRotation(); + float num725 = v.ToRotation(); + double num726 = (double)(num725 - num724); + num726 = MathHelper.WrapAngle((float)num726); + projectile.velocity = projectile.velocity.RotatedBy(num726 * 0.25, default); + } + float num727 = projectile.velocity.Length(); + projectile.velocity.Normalize(); + projectile.velocity *= num727 + 0.0025f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 56, 0, projectile.alpha); + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 67, dspeed.X, dspeed.Y, 50, default, 1.2f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Summon/MagicHammer.png b/Projectiles/Summon/MagicHammer.png new file mode 100644 index 0000000000000000000000000000000000000000..d29c13995453a95173376661ca526d2e91a5b395 GIT binary patch literal 586 zcmV-Q0=4~#P)Px%1W80eRA_)9vnNi zvk`LgJ8WY|ewq39L}4Hu4hPxv>KLlpKaR)aAnSh(GRp@ji=DuOgzQ(=QJ$KK1dz~F z*LCR9MopJUEQ#y&3IHgI!gpz_k|EMNbHtLM>blm}%=6qjzOTeYIN$$KlP1Dz7t4?=PCC2d}{6M^*V@%6i))2Kg)hzB6%X1E)kdZ`#k{QcDua* z|Lh}0B9{3SFcWzfW2b2v0Kjs&jEWIoKS_p2w6kxwTL6FAE6?*$Nl-Hpig#~jm985f zcbbwr9!i2rhDdPM>YJsSrcnTJzu&cXI&{maLt`r~ABnDOS^Pr%_5%P;r<2yX+wB0j zW6L7#ZJHhtS6xfqN4UdX)epu-K$bFASEfV6MS@wWGX;8sP$U2 zl81~n07E~3?wCu4$eXkGB|*i0l{Ktq)MRSEiVn*v#cH(zV07$%`940Bk|B~+Ri#xY zuxRW;tzL?~S%GBz%k%eYSzsAPzI Y127lJ4zg7dYXATM07*qoM6N<$f?Lo9#{d8T literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MagicHat.cs b/Projectiles/Summon/MagicHat.cs new file mode 100644 index 0000000000..77af61d0fc --- /dev/null +++ b/Projectiles/Summon/MagicHat.cs @@ -0,0 +1,178 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class MagicHat : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Magic Hat"); + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 5f; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft *= 5; + projectile.minion = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + CalamityGlobalProjectile modProj = projectile.Calamity(); + + //set up minion buffs and bools + bool hatExists = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (hatExists) + { + if (player.dead) + { + modPlayer.magicHat = false; + } + if (modPlayer.magicHat) + { + projectile.timeLeft = 2; + } + } + + //projectile movement + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2) + player.gfxOffY - 60f; + if (player.gravDir == -1f) + { + projectile.position.Y = projectile.position.Y + 150f; + projectile.rotation = MathHelper.Pi; + } + else + { + projectile.rotation = 0f; + } + projectile.position.X = (float)(int)projectile.position.X; + projectile.position.Y = (float)(int)projectile.position.Y; + + //I don't know what this is + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; + + //on summon dust and flexible damage + if (projectile.localAI[0] == 0f) + { + int dustAmt = 50; + for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++) + { + int dustEffects = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 234, 0f, 0f, 0, default, 1f); + Main.dust[dustEffects].velocity *= 2f; + Main.dust[dustEffects].scale *= 1.15f; + } + modProj.spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + modProj.spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.localAI[0] += 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != modProj.spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / + modProj.spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = damage2; + } + + //finding an enemy, then shooting projectiles at it + if (projectile.owner == Main.myPlayer) + { + float projPosX = projectile.position.X; + float projPosY = projectile.position.Y; + float detectionRange = 1500f; + bool enemyDetected = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float xDist = npc.position.X + (float)(npc.width / 2); + float yDist = npc.position.Y + (float)(npc.height / 2); + float enemyDist = Math.Abs(projPosX + (float)(projectile.width / 2) - xDist) + Math.Abs(projPosY + (float)(projectile.height / 2) - yDist); + if (enemyDist < detectionRange) + { + detectionRange = enemyDist; + projPosX = xDist; + projPosY = yDist; + enemyDetected = true; + } + } + } + else + { + for (int index = 0; index < Main.npc.Length; index++) + { + NPC target = Main.npc[index]; + if (target.CanBeChasedBy(projectile, true)) + { + float xDist = target.position.X + (float)(target.width / 2); + float yDist = target.position.Y + (float)(target.height / 2); + float enemyDist = Math.Abs(projPosX + (float)(projectile.width / 2) - xDist) + Math.Abs(projPosY + (float)(projectile.height / 2) - yDist); + if (enemyDist < detectionRange) + { + detectionRange = enemyDist; + projPosX = xDist; + projPosY = yDist; + enemyDetected = true; + } + } + } + } + if (enemyDetected) + { + projectile.ai[1] += 1f; + if ((projectile.ai[1] % 5f) == 0f) + { + int amount = Main.rand.Next(1, 2); + for (int i = 0; i < amount; i++) + { + int projType = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }); + float velocityX = Main.rand.NextFloat(-10f, 10f); + float velocityY = Main.rand.NextFloat(-15f, -8f); + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), velocityX, velocityY, projType, projectile.damage, 0f, projectile.owner, 0f, 0f); + } + } + } + } + } + + //glowmask effect + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, 200); + } + + //no contact damage + public override bool CanDamage() + { + return false; + } + } +} diff --git a/Projectiles/Summon/MagicHat.png b/Projectiles/Summon/MagicHat.png new file mode 100644 index 0000000000000000000000000000000000000000..6cef86e8d32309f336949a31664b51d8706463ca GIT binary patch literal 502 zcmVPx$ut`KgR7i>Cm(4B%Q5462Q?0M5kG2%mP_;x@*pS%T@dOs0#DiFS1F^9cJBdYO zISA5HNsDw;mDXY$ddHNiCbx6hj!dHgY^Em+5g**WEQbFy*SRfNbvyj}dNO|sSWBmUd*Nw52bz*bf>r9yvb9Y@!Z(sq5uE@ literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/MagicRifle.cs b/Projectiles/Summon/MagicRifle.cs new file mode 100644 index 0000000000..45e4068dd9 --- /dev/null +++ b/Projectiles/Summon/MagicRifle.cs @@ -0,0 +1,235 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class MagicRifle : ModProjectile + { + private int counter = 0; + private bool canHome = false; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rifle"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.netImportant = true; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.minionSlots = 0f; + projectile.timeLeft = 180; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.minion = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float num637 = 0.05f; + for (int num638 = 0; num638 < Main.projectile.Length; num638++) + { + bool flag23 = Main.projectile[num638].type == ModContent.ProjectileType(); + if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && flag23 && Math.Abs(projectile.position.X - Main.projectile[num638].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num638].position.Y) < (float)projectile.width) + { + if (projectile.position.X < Main.projectile[num638].position.X) + { + projectile.velocity.X = projectile.velocity.X - num637; + } + else + { + projectile.velocity.X = projectile.velocity.X + num637; + } + if (projectile.position.Y < Main.projectile[num638].position.Y) + { + projectile.velocity.Y = projectile.velocity.Y - num637; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + num637; + } + } + } + if (counter <= 30) + { + counter++; + canHome = true; + } + float homingRange = 700f; + float num634 = 1300f; + float num635 = 2600f; + float num636 = 600f; + Vector2 vector46 = projectile.position; + bool flag25 = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false) && canHome) + { + float num646 = Vector2.Distance(npc.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < homingRange) || !flag25) + { + vector46 = npc.Center; + flag25 = true; + } + } + } + else + { + for (int num645 = 0; num645 < Main.npc.Length; num645++) + { + NPC nPC2 = Main.npc[num645]; + if (nPC2.CanBeChasedBy(projectile, false) && canHome) + { + float num646 = Vector2.Distance(nPC2.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < homingRange) || !flag25) + { + homingRange = num646; + vector46 = nPC2.Center; + flag25 = true; + } + } + } + } + float num647 = num634; + if (flag25) + { + num647 = num635; + } + if (Vector2.Distance(player.Center, projectile.Center) > num647) + { + projectile.ai[0] = 1f; + projectile.netUpdate = true; + } + if (flag25 && projectile.ai[0] == 0f) + { + Vector2 vector47 = vector46 - projectile.Center; + float num648 = vector47.Length(); + vector47.Normalize(); + if (num648 > 200f) + { + float scaleFactor2 = 18f; //12 + vector47 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + else + { + float num649 = 9f; + vector47 *= -num649; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + } + else + { + bool flag26 = false; + if (!flag26) + { + flag26 = projectile.ai[0] == 1f; + } + float num650 = 12f; + if (flag26) + { + num650 = 30f; + } + Vector2 center2 = projectile.Center; + Vector2 vector48 = player.Center - center2 + new Vector2(0f, -120f); + float num651 = vector48.Length(); + if (num651 > 200f && num650 < 16f) + { + num650 = 16f; + } + if (num651 < num636 && flag26) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + if (num651 > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num651 > 70f) + { + vector48.Normalize(); + vector48 *= num650; + projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; + } + else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.15f; + projectile.velocity.Y = -0.05f; + } + } + if (flag25) + { + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = (vector46 - projectile.Center).ToRotation() + (projectile.spriteDirection == 1 ? MathHelper.ToRadians(315) : MathHelper.ToRadians(135)); + } + else + { + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? MathHelper.ToRadians(315) : MathHelper.ToRadians(135)); + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] += (float)Main.rand.Next(1, 4); + } + if (projectile.ai[1] > 90f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + if (projectile.ai[0] == 0f) + { + float scaleFactor3 = 6f; + int projType = ModContent.ProjectileType(); + if (flag25 && projectile.ai[1] == 0f) + { + if (Main.rand.NextBool(5)) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20, 0.25f); + } + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner) + { + Vector2 value19 = vector46 - projectile.Center; + value19.Normalize(); + value19 *= scaleFactor3; + Main.PlaySound(SoundID.Item40, projectile.position); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, projType, projectile.damage, 0f, Main.myPlayer, 0f, 0f); + projectile.netUpdate = true; + } + } + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(148, 0, 211, projectile.alpha); + } + + public override bool CanDamage() + { + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 66, dspeed.X, dspeed.Y, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.75f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Summon/MagicRifle.png b/Projectiles/Summon/MagicRifle.png new file mode 100644 index 0000000000000000000000000000000000000000..5e84792f42094e66d9921ffea2197fa91100a55d GIT binary patch literal 604 zcmV-i0;BzjP)Px%7D+@wRA_$0Uv~%^pKC<2Ar#HL ziJ6VIp&ar^J9{q3zYlhBHR8tCnWsd_F6HFbs3QH<9{-NA8+dd{uGENNy&AAOOJgyxfjv zcDg!4mBlF|8kt*iY0``(NunOlY3=v>9q4YKD8eZtvb$?DZ2n)7$wY2@Tel%~amt90 qYbG<}3Z6HELgqH5qal{V86)4@deb5o?{D4!0000(); + if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && + flag23 && Math.Abs(projectile.position.X - Main.projectile[num638].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num638].position.Y) < (float)projectile.width) + { + if (projectile.position.X < Main.projectile[num638].position.X) + { + projectile.velocity.X = projectile.velocity.X - num637; + } + else + { + projectile.velocity.X = projectile.velocity.X + num637; + } + if (projectile.position.Y < Main.projectile[num638].position.Y) + { + projectile.velocity.Y = projectile.velocity.Y - num637; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + num637; + } + } + } + if (counter <= 30) + { + counter++; + canHome = true; + } + bool flag24 = false; + if (projectile.ai[0] == 2f) + { + projectile.ai[1] += 1f; + projectile.extraUpdates = 1; + if (projectile.ai[1] > 40f) + { + projectile.ai[1] = 1f; + projectile.ai[0] = 0f; + projectile.extraUpdates = 0; + projectile.numUpdates = 0; + projectile.netUpdate = true; + } + else + { + flag24 = true; + } + } + if (flag24) + { + return; + } + if (!canHome) + { + return; + } + Vector2 vector46 = projectile.position; + bool flag25 = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false) && canHome) + { + float num646 = Vector2.Distance(npc.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) + { + num633 = num646; + vector46 = npc.Center; + flag25 = true; + } + } + } + else + { + for (int num645 = 0; num645 < Main.npc.Length; num645++) + { + NPC nPC2 = Main.npc[num645]; + if (nPC2.CanBeChasedBy(projectile, false) && canHome) + { + float num646 = Vector2.Distance(nPC2.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) + { + num633 = num646; + vector46 = nPC2.Center; + flag25 = true; + } + } + } + } + float num647 = num634; + if (flag25) + { + num647 = num635; + } + if (Vector2.Distance(player.Center, projectile.Center) > num647) + { + projectile.ai[0] = 1f; + projectile.netUpdate = true; + } + if (flag25 && projectile.ai[0] == 0f) + { + Vector2 vector47 = vector46 - projectile.Center; + float num648 = vector47.Length(); + vector47.Normalize(); + if (num648 > 200f) + { + float scaleFactor2 = 9f; //8 + vector47 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + else + { + float num649 = 4f; + vector47 *= -num649; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + } + else + { + bool flag26 = false; + if (!flag26) + { + flag26 = projectile.ai[0] == 1f; + } + float num650 = 6f; + if (flag26) + { + num650 = 15f; + } + Vector2 center2 = projectile.Center; + Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); + float num651 = vector48.Length(); + if (num651 > 200f && num650 < 8f) + { + num650 = 8f; + } + if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + if (num651 > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num651 > 70f) + { + vector48.Normalize(); + vector48 *= num650; + projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; + } + else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.15f; + projectile.velocity.Y = -0.05f; + } + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] += (float)Main.rand.Next(1, 4); + } + if (projectile.ai[1] > 40f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + if (projectile.ai[0] == 0f) + { + if (projectile.ai[1] == 0f && flag25 && num633 < 500f) + { + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner) + { + projectile.ai[0] = 2f; + Vector2 value20 = vector46 - projectile.Center; + value20.Normalize(); + projectile.velocity = value20 * 9f; //8 + projectile.netUpdate = true; + } + } + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(75, 255, 255, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 10; i++) + { + Vector2 dspeed = new Vector2(Main.rand.NextFloat(-7f, 7f), Main.rand.NextFloat(-7f, 7f)); + int dust = Dust.NewDust(projectile.Center, 1, 1, 66, dspeed.X, dspeed.Y, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.75f); + Main.dust[dust].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.rand.NextBool(3)) + { + for (int n = 0; n < Main.rand.Next(1, 3); n++) //1 to 2 baseball bats + { + float x = target.position.X + (float)Main.rand.Next(-400, 400); + float y = target.position.Y - (float)Main.rand.Next(500, 800); + Vector2 vector = new Vector2(x, y); + float num13 = target.position.X + (float)(target.width / 2) - vector.X; + float num14 = target.position.Y + (float)(target.height / 2) - vector.Y; + num13 += (float)Main.rand.Next(-100, 101); + int num15 = 29; + float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); + num16 = (float)num15 / num16; + num13 *= num16; + num14 *= num16; + Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1 * Main.rand.Next(4, 7)), (int)((double)projectile.knockBack * 0.1 * Main.rand.Next(7, 10)), projectile.owner, 0f, 0f); + } + } + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (Main.rand.NextBool(3)) + { + for (int n = 0; n < Main.rand.Next(1, 3); n++) //1 to 2 baseball bats + { + float x = target.position.X + (float)Main.rand.Next(-400, 400); + float y = target.position.Y - (float)Main.rand.Next(500, 800); + Vector2 vector = new Vector2(x, y); + float num13 = target.position.X + (float)(target.width / 2) - vector.X; + float num14 = target.position.Y + (float)(target.height / 2) - vector.Y; + num13 += (float)Main.rand.Next(-100, 101); + int num15 = 29; + float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); + num16 = (float)num15 / num16; + num13 *= num16; + num14 *= num16; + Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.1 * Main.rand.Next(4, 7)), (int)((double)projectile.knockBack * 0.1 * Main.rand.Next(7, 10)), projectile.owner, 0f, 0f); + } + } + } + } +} diff --git a/Projectiles/Summon/MagicUmbrella.png b/Projectiles/Summon/MagicUmbrella.png new file mode 100644 index 0000000000000000000000000000000000000000..277fb1483ec2392b6b73481278307cf15b766091 GIT binary patch literal 493 zcmVPx$r%6OXRA_{6Y1x?$w;qyFTH8P%|SrDX3RaF%L?)N+3$jJL|-AHGl zZCe0#yWR8i({!Evejfnpy6%myMy%v!K_gX4%-wFc-f=fZCa+q#eIZ7yN@?5}nJgny zWkD0GQW`f#MrTA!bjZqrMz5tVm&?oZS0klNSgVxAjgi4stCR`BTBS7pjp&(|{vfN? z+)f=MwU$cZ-$;kvenG0r*p4l9suTd%>ow~-i!xG_+$yDUW8_zTVAB=S^inkBiY# zCIml5e(2;vuaC$~%Wro2cns@X_ObXe()pg6;oc4|c6=^e88Ml#j+d@ZF Date: Mon, 9 Mar 2020 20:27:19 -0400 Subject: [PATCH 06/40] can release bloodworms now --- Items/SummonItems/BloodwormItem.cs | 12 +++++++++++- NPCs/AcidRain/BloodwormNormal.cs | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Items/SummonItems/BloodwormItem.cs b/Items/SummonItems/BloodwormItem.cs index aa001cd755..e730198191 100644 --- a/Items/SummonItems/BloodwormItem.cs +++ b/Items/SummonItems/BloodwormItem.cs @@ -1,4 +1,6 @@ -using Terraria.ModLoader; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.NPCs.AcidRain; namespace CalamityMod.Items.SummonItems { @@ -16,6 +18,14 @@ namespace CalamityMod.Items.SummonItems item.maxStack = 20; item.rare = 9; item.bait = 69420; + item.useStyle = 1; + item.autoReuse = true; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.consumable = true; + item.noUseGraphic = true; + item.makeNPC = (short)ModContent.NPCType(); } } } diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index 392dd09171..be417a321c 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -11,6 +11,7 @@ namespace CalamityMod.NPCs.AcidRain { DisplayName.SetDefault("Bloodworm"); Main.npcFrameCount[npc.type] = 7; + Main.npcCatchable[npc.type] = true; } public override void SetDefaults() From ec38800eb90ddc7cc84a6d2b8361d8397dda1688 Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Mon, 9 Mar 2020 19:34:02 -0500 Subject: [PATCH 07/40] Re-added Acid Rain summon item for testing --- Items/SummonItems/Invasion/CausticTear.cs | 43 ++++++++++++++++++++++ Projectiles/Magic/EternityCircle.png | Bin 191 -> 130 bytes 2 files changed, 43 insertions(+) create mode 100644 Items/SummonItems/Invasion/CausticTear.cs diff --git a/Items/SummonItems/Invasion/CausticTear.cs b/Items/SummonItems/Invasion/CausticTear.cs new file mode 100644 index 0000000000..89fc407c97 --- /dev/null +++ b/Items/SummonItems/Invasion/CausticTear.cs @@ -0,0 +1,43 @@ +using CalamityMod.Events; +using CalamityMod.World; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.SummonItems.Invasion +{ + public class CausticTear : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Caustic Tear"); + Tooltip.SetDefault("Toggles the acid rain in the Sulphurous Sea"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 18; + item.maxStack = 20; + item.rare = 6; + item.useAnimation = 45; + item.useTime = 45; + item.useStyle = 4; + item.consumable = true; + } + + public override bool UseItem(Player player) + { + if (!CalamityWorld.rainingAcid) + { + AcidRainEvent.TryStartEvent(); + } + else + { + Main.invasionSize = 0; + AcidRainEvent.UpdateInvasion(); + } + return true; + } + } +} diff --git a/Projectiles/Magic/EternityCircle.png b/Projectiles/Magic/EternityCircle.png index c6616b4227425d4299b2790605c4f910a9924122..5a928deac006fc5bf24ada3e5cf6d3267252926e 100644 GIT binary patch delta 68 zcmdnb*u*%&ke4Oh(btiIVPik{pG4M)4iY-zo-U3d65+{z{{OdUHcDu^RN&yz(8$Pe XtdE&>(t*hJ3_#%N>gTe~DWM4f0p%9m delta 129 zcmZo-+|M|{ke@Bd+ueoXKL{?^yL|FQJBf7m5>H=O_WK;dY Date: Mon, 9 Mar 2020 19:44:22 -0500 Subject: [PATCH 08/40] Small error fixes --- Items/Weapons/Summon/BensUmbrella.cs | 2 +- Items/Weapons/Summon/CosmicImmaterializer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs index 274185f0ee..3e9f9987e3 100644 --- a/Items/Weapons/Summon/BensUmbrella.cs +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Summon item.noMelee = true; item.knockBack = 0f; item.value = Item.buyPrice(5, 0, 0, 0); - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; item.rare = 10; item.UseSound = SoundID.Item68; item.autoReuse = true; diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index edf411b7e8..57e366f8a5 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); From 4e1f65f33d7998a0a5ff68de39008074f17f954a Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 05:47:00 +0000 Subject: [PATCH 09/40] Added the Profaned Soul Crystal Added an override for being able to attack normally passive minions (i.e impious immolator/abyss creatures) Added a delay for hurt sounds for transforms --- Buffs/CalamityGlobalBuff.cs | 115 +- Buffs/StatBuffs/ProfanedCrystalBuff.cs | 27 + Buffs/StatBuffs/ProfanedCrystalBuff.png | Bin 0 -> 605 bytes Buffs/Summon/ProfanedBabs.cs | 2 +- CalPlayer/CalamityPlayer.cs | 3448 +++++++++-------- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 140 +- CalamityMod.cs | 12 +- Items/Accessories/ProfanedSoulArtifact.cs | 5 + Items/Accessories/ProfanedSoulCrystal.cs | 169 + Items/Accessories/ProfanedSoulCrystal.png | Bin 0 -> 2046 bytes Items/Accessories/ProfanedSoulTransArms.png | Bin 0 -> 1841 bytes Items/Accessories/ProfanedSoulTransBody.png | Bin 0 -> 2562 bytes Items/Accessories/ProfanedSoulTransHead.png | Bin 0 -> 1783 bytes Items/Accessories/ProfanedSoulTransLegs.png | Bin 0 -> 4082 bytes .../Wings/ProfanedSoulTransWings.png | Bin 0 -> 2408 bytes Items/CalamityGlobalItem.cs | 178 + Localization/CalamityLocalization.cs | 1 + NPCs/Abyss/Catfish.cs | 2 +- NPCs/Abyss/ColossalSquid.cs | 2 +- NPCs/Abyss/DevilFish.cs | 2 +- NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 2 +- NPCs/Abyss/GiantSquid.cs | 2 +- NPCs/Abyss/GulperEelHead.cs | 2 +- NPCs/Abyss/Laserfish.cs | 2 +- NPCs/Abyss/LuminousCorvina.cs | 2 +- NPCs/Abyss/Mauler.cs | 2 +- NPCs/Abyss/MirageJelly.cs | 7 + NPCs/Abyss/MorayEel.cs | 2 +- NPCs/Abyss/Reaper.cs | 2 +- NPCs/Abyss/ToxicMinnow.cs | 2 +- NPCs/Abyss/Trasher.cs | 2 +- NPCs/Abyss/Viperfish.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeHead.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 12 +- NPCs/NormalNPCs/Eidolist.cs | 2 +- NPCs/NormalNPCs/ImpiousImmolator.cs | 2 +- NPCs/NormalNPCs/Sunskater.cs | 2 +- NPCs/Providence/Providence.cs | 33 +- NPCs/SunkenSea/BlindedAngler.cs | 2 +- NPCs/SunkenSea/Clam.cs | 2 +- NPCs/SunkenSea/EutrophicRay.cs | 2 +- NPCs/SunkenSea/GhostBell.cs | 2 +- NPCs/SunkenSea/GhostBellSmall.cs | 2 +- NPCs/SunkenSea/GiantClam.cs | 2 +- NPCs/SunkenSea/PrismTurtle.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 6 +- Projectiles/Summon/MiniGuardianAttack.cs | 288 +- Projectiles/Summon/MiniGuardianDefense.cs | 283 +- Projectiles/Summon/MiniGuardianHealer.cs | 11 +- Projectiles/Summon/MiniGuardianSpear.png | Bin 0 -> 692 bytes .../Summon/ProfanedCrystalMageFireball.png | Bin 0 -> 14281 bytes .../ProfanedCrystalMageFireballSplit.png | Bin 0 -> 1020 bytes .../Summon/ProfanedCrystalMeleeSpear.png | Bin 0 -> 692 bytes .../Summon/ProfanedCrystalRangedHuges.png | Bin 0 -> 3751 bytes .../Summon/ProfanedCrystalRangedSmalls.png | Bin 0 -> 596 bytes .../Summon/ProfanedCrystalRogueShard.png | Bin 0 -> 807 bytes .../Summon/ProfanedSoulCrystalProjectiles.cs | 1305 +++++++ 59 files changed, 4101 insertions(+), 1995 deletions(-) create mode 100644 Buffs/StatBuffs/ProfanedCrystalBuff.cs create mode 100644 Buffs/StatBuffs/ProfanedCrystalBuff.png create mode 100644 Items/Accessories/ProfanedSoulCrystal.cs create mode 100644 Items/Accessories/ProfanedSoulCrystal.png create mode 100644 Items/Accessories/ProfanedSoulTransArms.png create mode 100644 Items/Accessories/ProfanedSoulTransBody.png create mode 100644 Items/Accessories/ProfanedSoulTransHead.png create mode 100644 Items/Accessories/ProfanedSoulTransLegs.png create mode 100644 Items/Accessories/Wings/ProfanedSoulTransWings.png create mode 100644 Projectiles/Summon/MiniGuardianSpear.png create mode 100644 Projectiles/Summon/ProfanedCrystalMageFireball.png create mode 100644 Projectiles/Summon/ProfanedCrystalMageFireballSplit.png create mode 100644 Projectiles/Summon/ProfanedCrystalMeleeSpear.png create mode 100644 Projectiles/Summon/ProfanedCrystalRangedHuges.png create mode 100644 Projectiles/Summon/ProfanedCrystalRangedSmalls.png create mode 100644 Projectiles/Summon/ProfanedCrystalRogueShard.png create mode 100644 Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 31c99b11cb..766515593a 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; using CalamityMod.World; using Terraria; using Terraria.ID; @@ -77,37 +78,37 @@ namespace CalamityMod.Buffs public override void ModifyBuffTip(int type, ref string tip, ref int rare) { - if (type == BuffID.NebulaUpDmg1) - tip = "7.5% increased damage"; - else if (type == BuffID.NebulaUpDmg2) - tip = "15% increased damage"; - else if (type == BuffID.NebulaUpDmg3) - tip = "22.5% increased damage"; - else if (type == BuffID.WeaponImbueVenom || type == BuffID.WeaponImbueCursedFlames || type == BuffID.WeaponImbueFire || type == BuffID.WeaponImbueGold || - type == BuffID.WeaponImbueIchor || type == BuffID.WeaponImbueNanites || type == BuffID.WeaponImbuePoison) - tip = "Rogue and " + tip; - else if (type == BuffID.WeaponImbueConfetti) - tip = "All attacks cause confetti to appear"; - else if (type == BuffID.IceBarrier) - tip = "Damage taken is reduced by 15%"; - else if (type == BuffID.ChaosState) - tip = "Rod of Discord teleports are disabled"; - else if (type == BuffID.Ichor) + if (type == BuffID.NebulaUpDmg1) + tip = "7.5% increased damage"; + else if (type == BuffID.NebulaUpDmg2) + tip = "15% increased damage"; + else if (type == BuffID.NebulaUpDmg3) + tip = "22.5% increased damage"; + else if (type == BuffID.WeaponImbueVenom || type == BuffID.WeaponImbueCursedFlames || type == BuffID.WeaponImbueFire || type == BuffID.WeaponImbueGold || + type == BuffID.WeaponImbueIchor || type == BuffID.WeaponImbueNanites || type == BuffID.WeaponImbuePoison) + tip = "Rogue and " + tip; + else if (type == BuffID.WeaponImbueConfetti) + tip = "All attacks cause confetti to appear"; + else if (type == BuffID.IceBarrier) + tip = "Damage taken is reduced by 15%"; + else if (type == BuffID.ChaosState) + tip = "Rod of Discord teleports are disabled"; + else if (type == BuffID.Ichor) + { + tip = "Defense reduced by 20"; + if (CalamityWorld.revenge) + tip += ". All damage taken increased by 25%"; + } + else if (type == BuffID.CursedInferno && CalamityWorld.revenge) + tip += ". All damage taken increased by 20%"; + else if (type == BuffID.Warmth) { - tip = "Defense reduced by 20"; - if (CalamityWorld.revenge) - tip += ". All damage taken increased by 25%"; - } - else if (type == BuffID.CursedInferno && CalamityWorld.revenge) - tip += ". All damage taken increased by 20%"; - else if (type == BuffID.Warmth) - { - tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs"; + tip += ". Immunity to the Chilled, Frozen, and Glacial State debuffs"; if (CalamityWorld.death) tip += ". Provides cold protection in Death Mode"; } - else if (type == BuffID.Invisibility) - tip += ". Grants rogue bonuses while holding certain rogue weapons"; + else if (type == BuffID.Invisibility) + tip += ". Grants rogue bonuses while holding certain rogue weapons"; else if (type == BuffID.ObsidianSkin && CalamityWorld.death) tip += ". Provides heat protection in Death Mode"; else if (type == BuffID.Inferno && CalamityWorld.death) @@ -116,20 +117,52 @@ namespace CalamityMod.Buffs tip += ". Provides cold protection in Death Mode"; else if (type == ModContent.BuffType() && CalamityWorld.death) tip += ". Provides cold protection in Death Mode"; - else if (type == ModContent.BuffType()) - { - Player player = Main.player[Main.myPlayer]; - bool offense = player.Calamity().gOffense; - bool defense = player.Calamity().gDefense; - if (offense && defense) - { - tip = "The Profaned Babs will fight for and defend you!"; - } - else if (offense || defense) - { - tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!"); - } - } + else if (type == ModContent.BuffType()) + { + Player player = Main.player[Main.myPlayer]; + bool offense = player.Calamity().gOffense; + bool defense = player.Calamity().gDefense; + if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && !CalamityWorld.downedSCal)) + { + tip = "The Profaned Babs will accompany you!"; + } + else if (offense && defense) + { + tip = "The Profaned Babs will fight for and defend you!"; + } + else if (offense || defense) + { + tip = "The " + (offense ? "Offensive" : "Defensive") + " Duo will " + (offense ? "fight for and heal you!" : "protect and heal you!"); + } + } + else if (type == ModContent.BuffType()) + { + if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs) + { + if (Main.player[Main.myPlayer].Calamity().endoCooper) + { + tip = "An ascended ice construct is suppressing your true potential.."; + } + else if (Main.player[Main.myPlayer].Calamity().magicHat) + { + tip = "A magical hat overwhelms your senses, squandering your true potential.."; + } + else + { + Player player = Main.player[Main.myPlayer]; + bool offense = (Main.dayTime && !player.wet) || player.lavaWet; + bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + tip = "You are an emissary of the profaned goddess now!\n" + + (offense ? "The " + (Main.dayTime ? "light of the sun" : "heat of the lava") + " empowers your offensive capabilities" : + "The " + (player.wet ? (player.honeyWet ? "honey cools" : "water douses") : "darkness of night cools") + " your flames, empowering your defensive capabilities") + + (enrage ? "\nYour weakened life force fuels your desperate attacks" : ""); + } + } + else if (CalamityWorld.downedSCal) + { + tip = "Your profaned soul is constrained by your insufficient summoning powers"; + } + } } } } diff --git a/Buffs/StatBuffs/ProfanedCrystalBuff.cs b/Buffs/StatBuffs/ProfanedCrystalBuff.cs new file mode 100644 index 0000000000..6fa400e971 --- /dev/null +++ b/Buffs/StatBuffs/ProfanedCrystalBuff.cs @@ -0,0 +1,27 @@ +using CalamityMod.World; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class ProfanedCrystalBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Devotion"); + Description.SetDefault("The profaned soul within has been defiled by the powerful magic of a supreme witch"); + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + if (CalamityWorld.downedSCal && (player.Calamity().minionSlotStat - player.slotsMinions) >= 10 && !player.Calamity().profanedCrystalForce) + { + player.Calamity().profanedCrystalBuffs = true; + } + } + } +} diff --git a/Buffs/StatBuffs/ProfanedCrystalBuff.png b/Buffs/StatBuffs/ProfanedCrystalBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..ae762bf09f44ebba9230a1eada915eed818e54c4 GIT binary patch literal 605 zcmV-j0;2tiP)Px%7fD1xR9J=OmrY1iQ5462^RO6gq2$V8KqS;KL4+3LfFOb(4h52~1VvEVMT-P6 z+6v;rjRavRf^Pg^&@u$+1B5YDut3H#LJ&A6Gl;D7TtAMYOi z|9kE|?|Hn20YL2h{DL&XYZx8?Bb`N^-~lcG3cNSdTKH$|6wp9{EW4xdRyF|s{M(9u z_uvqKos+-+UGS>!>!-lW_HqDvXZHc9yOU!E;?ISxKfom;fiSl6!(iuXb2uT zF4*||J&>q`eFkVV4HFbd#(X}y20-`d3jlnJV~z_aQ$iaB5~iWGS9#SyBJ)(y8F~aj z$B#YJakS`|r=J3Ds4uHj>@R(90q_OYJh>NAg~kfR_iR3D_QJ~C006ZWNIcY<=$mf&Clr!`F4i rzqxDfy)YJt-z{!O#ue~f`@iFVxwyP`{7_VA00000NkvXXu0mjf5K#^{ literal 0 HcmV?d00001 diff --git a/Buffs/Summon/ProfanedBabs.cs b/Buffs/Summon/ProfanedBabs.cs index e388f8ab83..38a96f3717 100644 --- a/Buffs/Summon/ProfanedBabs.cs +++ b/Buffs/Summon/ProfanedBabs.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.Summon public override void Update(Player player, ref int buffIndex) { CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.gHealer) + if (!modPlayer.gHealer || modPlayer.profanedCrystalBuffs) { player.DelBuff(buffIndex); buffIndex--; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 77aa41730c..64e4c58415 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5,9 +5,9 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; +using CalamityMod.Items.Armor; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; -using CalamityMod.Items.Armor; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Mounts; @@ -55,8 +55,16 @@ namespace CalamityMod.CalPlayer None = 1 } + public enum AnimationType + { + Idle, + Jump, + Walk + } + public class CalamityPlayer : ModPlayer { + #region Variables // No Category public static bool areThereAnyDamnBosses = false; @@ -68,43 +76,43 @@ namespace CalamityMod.CalPlayer public int sCalDeathCount = 0; public int sCalKillCount = 0; public int deathCount = 0; - public int actualMaxLife = 0; - public int deathModeUnderworldTime = 0; - public int deathModeBlizzardTime = 0; - public static int chaosStateDuration = 600; - public bool killSpikyBalls = false; - public Projectile lastProjectileHit; + public int actualMaxLife = 0; + public int deathModeUnderworldTime = 0; + public int deathModeBlizzardTime = 0; + public static int chaosStateDuration = 600; + public bool killSpikyBalls = false; + public Projectile lastProjectileHit; public double acidRoundMultiplier = 1D; - + // "External" variables -- Only set by Mod.Call public int externalAbyssLight = 0; public bool externalColdImmunity = false; public bool externalHeatImmunity = false; - // Stat Meter - public int[] damageStats = new int[5]; - public int[] critStats = new int[4]; - public int defenseStat = 0; - public int DRStat = 0; - public int meleeSpeedStat = 0; - public int manaCostStat = 0; - public int rogueVelocityStat = 0; - public int minionSlotStat = 0; - public int lifeRegenStat = 0; - public int manaRegenStat = 0; - public int ammoReductionRanged = 0; - public int ammoReductionRogue = 0; - public int armorPenetrationStat = 0; - public int wingFlightTimeStat = 0; - public int adrenalineChargeStat = 0; - public int rageDamageStat = 0; - public int moveSpeedStat = 0; - public int abyssLightLevelStat = 0; - public int abyssBreathLossStat = 0; - public int abyssBreathLossRateStat = 0; - public int abyssLifeLostAtZeroBreathStat = 0; - public int abyssDefenseLossStat = 0; - public int stealthStat = 0; + // Stat Meter + public int[] damageStats = new int[5]; + public int[] critStats = new int[4]; + public int defenseStat = 0; + public int DRStat = 0; + public int meleeSpeedStat = 0; + public int manaCostStat = 0; + public int rogueVelocityStat = 0; + public int minionSlotStat = 0; + public int lifeRegenStat = 0; + public int manaRegenStat = 0; + public int ammoReductionRanged = 0; + public int ammoReductionRogue = 0; + public int armorPenetrationStat = 0; + public int wingFlightTimeStat = 0; + public int adrenalineChargeStat = 0; + public int rageDamageStat = 0; + public int moveSpeedStat = 0; + public int abyssLightLevelStat = 0; + public int abyssBreathLossStat = 0; + public int abyssBreathLossRateStat = 0; + public int abyssLifeLostAtZeroBreathStat = 0; + public int abyssDefenseLossStat = 0; + public int stealthStat = 0; public float standingRegenStat = 0f; public float movingRegenStat = 0f; @@ -133,7 +141,10 @@ namespace CalamityMod.CalPlayer public float shieldInvinc = 5f; public GaelSwitchPhase gaelSwitchTimer = 0; public int galileoCooldown = 0; - public int planarSpeedBoost = 0; + public int planarSpeedBoost = 0; + public int profanedSoulWeaponUsage = 0; + public int profanedSoulWeaponType = 0; + public int hurtSoundTimer = 0; // Sound public bool playRogueStealthSound = false; @@ -233,19 +244,19 @@ namespace CalamityMod.CalPlayer public bool adrenalineBoostOne = false; public bool adrenalineBoostTwo = false; public bool adrenalineBoostThree = false; - public bool healToFull = false; + public bool healToFull = false; // Lore public bool kingSlimeLore = false; public bool desertScourgeLore = false; - public bool crabulonLore = false; + public bool crabulonLore = false; public bool eaterOfWorldsLore = false; public bool hiveMindLore = false; public bool perforatorLore = false; public bool queenBeeLore = false; public bool skeletronLore = false; public bool wallOfFleshLore = false; - public bool twinsLore = false; + public bool twinsLore = false; public bool destroyerLore = false; public bool aquaticScourgeLore = false; public bool skeletronPrimeLore = false; @@ -281,9 +292,9 @@ namespace CalamityMod.CalPlayer public bool regenator = false; public bool theBee = false; public int theBeeCooldown = 0; - public bool alluringBait = false; - public bool enchantedPearl = false; - public bool fishingStation = false; + public bool alluringBait = false; + public bool enchantedPearl = false; + public bool fishingStation = false; public bool rBrain = false; public bool bloodyWormTooth = false; public bool afflicted = false; @@ -441,6 +452,7 @@ namespace CalamityMod.CalPlayer public bool hallowedPower = false; public bool hallowedRegen = false; + // Armor Set public bool eskimoSet = false; //vanilla armor public bool meteorSet = false; //vanilla armor, for space gun nerf @@ -452,23 +464,23 @@ namespace CalamityMod.CalPlayer public bool tarraMelee = false; public bool tarragonCloak = false; public bool tarragonCloakCooldown = false; - public int tarraDefenseTime = 600; + public int tarraDefenseTime = 600; public bool tarraMage = false; public int tarraMageHealCooldown = 0; public int tarraCrits = 0; public bool tarraRanged = false; public bool tarraThrowing = false; - public bool tarragonImmunityCooldown = false; - public bool tarragonImmunity = false; - public int tarraThrowingCrits = 0; + public bool tarragonImmunityCooldown = false; + public bool tarragonImmunity = false; + public int tarraThrowingCrits = 0; public bool tarraSummon = false; public bool bloodflareSet = false; public bool bloodflareMelee = false; - public bool bloodflareFrenzy = false; - public bool bloodFrenzyCooldown = false; - public int bloodflareMeleeHits = 0; + public bool bloodflareFrenzy = false; + public bool bloodFrenzyCooldown = false; + public int bloodflareMeleeHits = 0; public bool bloodflareRanged = false; - public bool bloodflareSoulCooldown = false; + public bool bloodflareSoulCooldown = false; public bool bloodflareThrowing = false; public bool bloodflareMage = false; public int bloodflareMageCooldown = 0; @@ -502,11 +514,11 @@ namespace CalamityMod.CalPlayer public bool umbraphileSet = false; public bool reaverBlast = false; public bool reaverBurst = false; - //public bool fathomSwarmer = false; - //public bool fathomSwarmerVisage = false; + //public bool fathomSwarmer = false; + //public bool fathomSwarmerVisage = false; public bool astralStarRain = false; public int astralStarRainCooldown = 0; - public bool plagueReaper = false; + public bool plagueReaper = false; public int plagueReaperCooldown = 0; public float ataxiaDmg; public bool ataxiaMage = false; @@ -538,8 +550,8 @@ namespace CalamityMod.CalPlayer public bool chaosSpirit = false; public bool redDevil = false; - // Debuff - public bool alcoholPoisoning = false; + // Debuff + public bool alcoholPoisoning = false; public bool shadowflame = false; public bool wDeath = false; public bool lethalLavaBurn = false; @@ -593,7 +605,7 @@ namespace CalamityMod.CalPlayer public bool omniscience = false; public bool zerg = false; public bool zen = false; - public bool bossZen = false; + public bool bossZen = false; public bool yPower = false; public bool aWeapon = false; public bool tScale = false; @@ -742,6 +754,13 @@ namespace CalamityMod.CalPlayer public bool abyssalDivingSuitHide; public bool abyssalDivingSuitForce; public bool abyssalDivingSuitPower; + public bool profanedCrystal; + public bool profanedCrystalPrevious; + public bool profanedCrystalForce; + public bool profanedCrystalBuffs; + public bool profanedCrystalHide; + public KeyValuePair profanedCrystalWingCounter = new KeyValuePair(0, 10); + public KeyValuePair profanedCrystalAnimCounter = new KeyValuePair(0, 10); public bool sirenBoobsPrevious; public bool sirenBoobs; public bool sirenBoobsHide; @@ -826,8 +845,8 @@ namespace CalamityMod.CalPlayer { "deathCount", deathCount }, { "moneyStolenByBandit", moneyStolenByBandit }, { "reforges", reforges }, - { "deathModeUnderworldTime", deathModeUnderworldTime }, - { "deathModeBlizzardTime", deathModeBlizzardTime } + { "deathModeUnderworldTime", deathModeUnderworldTime }, + { "deathModeBlizzardTime", deathModeBlizzardTime } }; } @@ -860,8 +879,8 @@ namespace CalamityMod.CalPlayer deathCount = tag.GetInt("deathCount"); moneyStolenByBandit = tag.GetInt("moneyStolenByBandit"); reforges = tag.GetInt("reforges"); - deathModeUnderworldTime = tag.GetInt("deathModeUnderworldTime"); - deathModeBlizzardTime = tag.GetInt("deathModeBlizzardTime"); + deathModeUnderworldTime = tag.GetInt("deathModeUnderworldTime"); + deathModeBlizzardTime = tag.GetInt("deathModeBlizzardTime"); meleeLevel = tag.GetInt("meleeLevel"); rangedLevel = tag.GetInt("rangedLevel"); @@ -885,8 +904,8 @@ namespace CalamityMod.CalPlayer deathCount = reader.ReadInt32(); moneyStolenByBandit = reader.ReadInt32(); reforges = reader.ReadInt32(); - deathModeUnderworldTime = reader.ReadInt32(); - deathModeBlizzardTime = reader.ReadInt32(); + deathModeUnderworldTime = reader.ReadInt32(); + deathModeBlizzardTime = reader.ReadInt32(); meleeLevel = reader.ReadInt32(); rangedLevel = reader.ReadInt32(); @@ -935,81 +954,81 @@ namespace CalamityMod.CalPlayer #region ResetEffects public override void ResetEffects() { - // Max health bonuses - if (absorber) - player.statLifeMax2 += 20; - player.statLifeMax2 += - (mFruit ? 25 : 0) + - (bOrange ? 25 : 0) + - (eBerry ? 25 : 0) + - (dFruit ? 25 : 0); - if (ZoneAbyss && abyssalAmulet) - player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * (lumenousAmulet ? 25 : 10); - if (coreOfTheBloodGod) - player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 10; - if (bloodPact) - player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 100; - if (leviathanAndSirenLore) - { - if (sirenBoobsPrevious || sirenBoobsAltPrevious) - player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 5; - } - if (hAttack) - player.statLifeMax2 += player.statLifeMax / 5 / 20 * 5; - if (affliction || afflicted) - player.statLifeMax2 += player.statLifeMax / 5 / 20 * 10; - if (cadence) - player.statLifeMax2 += player.statLifeMax / 5 / 20 * 25; - if (community) - { - float floatTypeBoost = 0.01f + - (NPC.downedSlimeKing ? 0.01f : 0f) + - (NPC.downedBoss1 ? 0.01f : 0f) + - (NPC.downedBoss2 ? 0.01f : 0f) + - (NPC.downedQueenBee ? 0.01f : 0f) + //0.05 - (NPC.downedBoss3 ? 0.01f : 0f) + - (Main.hardMode ? 0.01f : 0f) + - (NPC.downedMechBossAny ? 0.01f : 0f) + - (NPC.downedPlantBoss ? 0.01f : 0f) + - (NPC.downedGolemBoss ? 0.01f : 0f) + //0.1 - (NPC.downedFishron ? 0.01f : 0f) + - (NPC.downedAncientCultist ? 0.01f : 0f) + - (NPC.downedMoonlord ? 0.01f : 0f) + - (CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15 - (CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17 - (CalamityWorld.downedYharon ? 0.03f : 0f); //0.2 - int integerTypeBoost = (int)(floatTypeBoost * 50f); - player.statLifeMax2 += player.statLifeMax / 5 / 20 * integerTypeBoost; - } + // Max health bonuses + if (absorber) + player.statLifeMax2 += 20; + player.statLifeMax2 += + (mFruit ? 25 : 0) + + (bOrange ? 25 : 0) + + (eBerry ? 25 : 0) + + (dFruit ? 25 : 0); + if (ZoneAbyss && abyssalAmulet) + player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * (lumenousAmulet ? 25 : 10); + if (coreOfTheBloodGod) + player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 10; + if (bloodPact) + player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 100; + if (leviathanAndSirenLore) + { + if (sirenBoobsPrevious || sirenBoobsAltPrevious) + player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * 5; + } + if (hAttack) + player.statLifeMax2 += player.statLifeMax / 5 / 20 * 5; + if (affliction || afflicted) + player.statLifeMax2 += player.statLifeMax / 5 / 20 * 10; + if (cadence) + player.statLifeMax2 += player.statLifeMax / 5 / 20 * 25; + if (community) + { + float floatTypeBoost = 0.01f + + (NPC.downedSlimeKing ? 0.01f : 0f) + + (NPC.downedBoss1 ? 0.01f : 0f) + + (NPC.downedBoss2 ? 0.01f : 0f) + + (NPC.downedQueenBee ? 0.01f : 0f) + //0.05 + (NPC.downedBoss3 ? 0.01f : 0f) + + (Main.hardMode ? 0.01f : 0f) + + (NPC.downedMechBossAny ? 0.01f : 0f) + + (NPC.downedPlantBoss ? 0.01f : 0f) + + (NPC.downedGolemBoss ? 0.01f : 0f) + //0.1 + (NPC.downedFishron ? 0.01f : 0f) + + (NPC.downedAncientCultist ? 0.01f : 0f) + + (NPC.downedMoonlord ? 0.01f : 0f) + + (CalamityWorld.downedProvidence ? 0.02f : 0f) + //0.15 + (CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17 + (CalamityWorld.downedYharon ? 0.03f : 0f); //0.2 + int integerTypeBoost = (int)(floatTypeBoost * 50f); + player.statLifeMax2 += player.statLifeMax / 5 / 20 * integerTypeBoost; + } - // Max health reductions - if (crimEffigy) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8); - if (badgeOfBraveryRare) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75); - if (regenator) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.5); - if (skeletronLore) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.9); - if (calamitasLore) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75); - if (providenceLore) - player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8); + // Max health reductions + if (crimEffigy) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8); + if (badgeOfBraveryRare) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75); + if (regenator) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.5); + if (skeletronLore) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.9); + if (calamitasLore) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75); + if (providenceLore) + player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8); - // Extra accessory slots - if (extraAccessoryML) - player.extraAccessorySlots = 1; - if (extraAccessoryML && player.extraAccessory && (Main.expertMode || Main.gameMenu)) - player.extraAccessorySlots = 2; - if (CalamityWorld.bossRushActive) - { - if (CalamityMod.CalamityConfig.BossRushAccessoryCurse) - { - player.extraAccessorySlots = 0; - } - } + // Extra accessory slots + if (extraAccessoryML) + player.extraAccessorySlots = 1; + if (extraAccessoryML && player.extraAccessory && (Main.expertMode || Main.gameMenu)) + player.extraAccessorySlots = 2; + if (CalamityWorld.bossRushActive) + { + if (CalamityMod.CalamityConfig.BossRushAccessoryCurse) + { + player.extraAccessorySlots = 0; + } + } - ResetRogueStealth(); + ResetRogueStealth(); throwingDamage = 1f; throwingVelocity = 1f; @@ -1117,14 +1136,14 @@ namespace CalamityMod.CalPlayer kingSlimeLore = false; desertScourgeLore = false; - crabulonLore = false; + crabulonLore = false; eaterOfWorldsLore = false; hiveMindLore = false; perforatorLore = false; queenBeeLore = false; skeletronLore = false; wallOfFleshLore = false; - twinsLore = false; + twinsLore = false; destroyerLore = false; aquaticScourgeLore = false; skeletronPrimeLore = false; @@ -1154,9 +1173,9 @@ namespace CalamityMod.CalPlayer regenator = false; deepDiver = false; theBee = false; - alluringBait = false; - enchantedPearl = false; - fishingStation = false; + alluringBait = false; + enchantedPearl = false; + fishingStation = false; rBrain = false; bloodyWormTooth = false; rampartOfDeities = false; @@ -1198,7 +1217,7 @@ namespace CalamityMod.CalPlayer stressPills = false; laudanum = false; fleshTotem = false; - fleshTotemCooldown = false; + fleshTotemCooldown = false; bloodPact = false; bloodflareCore = false; coreOfTheBloodGod = false; @@ -1284,22 +1303,22 @@ namespace CalamityMod.CalPlayer tarraSet = false; tarraMelee = false; - tarragonCloak = false; - tarragonCloakCooldown = false; + tarragonCloak = false; + tarragonCloakCooldown = false; tarraMage = false; tarraRanged = false; tarraThrowing = false; - tarragonImmunity = false; - tarragonImmunityCooldown = false; + tarragonImmunity = false; + tarragonImmunityCooldown = false; tarraSummon = false; bloodflareSet = false; bloodflareMelee = false; - bloodflareFrenzy = false; - bloodFrenzyCooldown = false; - bloodflareRanged = false; - bloodflareSoulCooldown = false; - bloodflareThrowing = false; + bloodflareFrenzy = false; + bloodFrenzyCooldown = false; + bloodflareRanged = false; + bloodflareSoulCooldown = false; + bloodflareThrowing = false; bloodflareMage = false; bloodflareSummon = false; @@ -1330,7 +1349,7 @@ namespace CalamityMod.CalPlayer plaguedFuelPack = false; camper = false; - alcoholPoisoning = false; + alcoholPoisoning = false; shadowflame = false; wDeath = false; lethalLavaBurn = false; @@ -1368,7 +1387,7 @@ namespace CalamityMod.CalPlayer cragsLava = false; vaporfied = false; - revivify = false; + revivify = false; trinketOfChiBuff = false; corrEffigy = false; crimEffigy = false; @@ -1383,7 +1402,7 @@ namespace CalamityMod.CalPlayer omniscience = false; zerg = false; zen = false; - bossZen = false; + bossZen = false; permafrostsConcoction = false; armorCrumbling = false; armorShattering = false; @@ -1534,27 +1553,30 @@ namespace CalamityMod.CalPlayer sirenBoobsAltPrevious = sirenBoobsAlt; sirenBoobsAlt = sirenBoobsAltHide = sirenBoobsAltForce = sirenBoobsAltPower = false; + profanedCrystalPrevious = profanedCrystal; + profanedCrystal = profanedCrystalBuffs = profanedCrystalForce = profanedCrystalHide = false; + snowmanPrevious = snowman; snowman = snowmanHide = snowmanForce = snowmanPower = false; rageMode = false; adrenalineMode = false; - lastProjectileHit = null; + lastProjectileHit = null; } #endregion #region UpdateDead public override void UpdateDead() { - #region Debuffs - deathModeBlizzardTime = 0; - deathModeUnderworldTime = 0; + #region Debuffs + deathModeBlizzardTime = 0; + deathModeUnderworldTime = 0; gaelRageCooldown = 0; gaelSwipes = 0; gaelSwitchTimer = (GaelSwitchPhase)0; - planarSpeedBoost = 0; - galileoCooldown = 0; + planarSpeedBoost = 0; + galileoCooldown = 0; stress = 0; adrenaline = 0; raiderStack = 0; @@ -1576,14 +1598,14 @@ namespace CalamityMod.CalPlayer plaguedFuelPackDash = 0; plaguedFuelPackDirection = 0; theBeeCooldown = 0; - killSpikyBalls = false; + killSpikyBalls = false; moonCrownCooldown = 0; featherCrownCooldown = 0; nanoFlareCooldown = 0; fleshTotemCooldown = false; sandCloakCooldown = false; - alcoholPoisoning = false; + alcoholPoisoning = false; shadowflame = false; wDeath = false; lethalLavaBurn = false; @@ -1672,7 +1694,7 @@ namespace CalamityMod.CalPlayer omniscience = false; zerg = false; zen = false; - bossZen = false; + bossZen = false; permafrostsConcoction = false; armorCrumbling = false; armorShattering = false; @@ -1800,23 +1822,23 @@ namespace CalamityMod.CalPlayer statigelSet = false; tarraSet = false; tarraMelee = false; - tarragonCloak = false; - tarragonCloakCooldown = false; - tarraDefenseTime = 600; + tarragonCloak = false; + tarragonCloakCooldown = false; + tarraDefenseTime = 600; tarraMage = false; tarraRanged = false; tarraThrowing = false; - tarragonImmunity = false; - tarragonImmunityCooldown = false; + tarragonImmunity = false; + tarragonImmunityCooldown = false; tarraThrowingCrits = 0; tarraSummon = false; bloodflareSet = false; bloodflareMelee = false; - bloodflareFrenzy = false; - bloodFrenzyCooldown = false; - bloodflareMeleeHits = 0; + bloodflareFrenzy = false; + bloodFrenzyCooldown = false; + bloodflareMeleeHits = 0; bloodflareRanged = false; - bloodflareSoulCooldown = false; + bloodflareSoulCooldown = false; bloodflareThrowing = false; bloodflareMage = false; bloodflareSummon = false; @@ -1830,7 +1852,7 @@ namespace CalamityMod.CalPlayer elysianGuard = false; #endregion - lastProjectileHit = null; + lastProjectileHit = null; if (CalamityWorld.bossRushActive) @@ -2088,40 +2110,40 @@ namespace CalamityMod.CalPlayer } if (CalamityMod.NormalityRelocatorHotKey.JustPressed && normalityRelocator && Main.myPlayer == player.whoAmI) { - if (!player.chaosState) - { - Vector2 teleportLocation; - teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X; - if (player.gravDir == 1f) - { - teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height; - } - else - { - teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY; - } - teleportLocation.X -= (float)(player.width / 2); - if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50)) - { - int x = (int)(teleportLocation.X / 16f); - int y = (int)(teleportLocation.Y / 16f); - if (!Collision.SolidCollision(teleportLocation, player.width, player.height)) - { - player.Teleport(teleportLocation, 4, 0); - NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0); + if (!player.chaosState) + { + Vector2 teleportLocation; + teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X; + if (player.gravDir == 1f) + { + teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height; + } + else + { + teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY; + } + teleportLocation.X -= (float)(player.width / 2); + if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50)) + { + int x = (int)(teleportLocation.X / 16f); + int y = (int)(teleportLocation.Y / 16f); + if (!Collision.SolidCollision(teleportLocation, player.width, player.height)) + { + player.Teleport(teleportLocation, 4, 0); + NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0); - if (scarfCooldown) - player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true); - else - player.AddBuff(BuffID.ChaosState, chaosStateDuration, true); - } - } - } + if (scarfCooldown) + player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true); + else + player.AddBuff(BuffID.ChaosState, chaosStateDuration, true); + } + } + } } if (CalamityMod.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && !sandCloakCooldown) { - player.AddBuff(ModContent.BuffType(), 1800, false); //30 seconds + player.AddBuff(ModContent.BuffType(), 1800, false); //30 seconds rogueStealth -= rogueStealthMax * 0.25f; Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), 7, 8, player.whoAmI, 0, 0); Main.PlaySound(2, player.position, 45); @@ -2129,62 +2151,62 @@ namespace CalamityMod.CalPlayer if (CalamityMod.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0) { - if (!player.chaosState) - { - float teleportRange = 320f; - Vector2 teleportLocation; - teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X; - if (player.gravDir == 1f) - { - teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height; - } - else - { - teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY; - } - teleportLocation.X -= (float)(player.width / 2); - Vector2 playerToTeleport = teleportLocation - player.position; - if (playerToTeleport.Length() > teleportRange) - { - playerToTeleport.Normalize(); - playerToTeleport *= teleportRange; - teleportLocation = player.position + playerToTeleport; - } - if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50)) - { - int x = (int)(teleportLocation.X / 16f); - int y = (int)(teleportLocation.Y / 16f); - if (!Collision.SolidCollision(teleportLocation, player.width, player.height)) - { - rogueStealth -= rogueStealthMax * 0.25f; + if (!player.chaosState) + { + float teleportRange = 320f; + Vector2 teleportLocation; + teleportLocation.X = (float)Main.mouseX + Main.screenPosition.X; + if (player.gravDir == 1f) + { + teleportLocation.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height; + } + else + { + teleportLocation.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY; + } + teleportLocation.X -= (float)(player.width / 2); + Vector2 playerToTeleport = teleportLocation - player.position; + if (playerToTeleport.Length() > teleportRange) + { + playerToTeleport.Normalize(); + playerToTeleport *= teleportRange; + teleportLocation = player.position + playerToTeleport; + } + if (teleportLocation.X > 50f && teleportLocation.X < (float)(Main.maxTilesX * 16 - 50) && teleportLocation.Y > 50f && teleportLocation.Y < (float)(Main.maxTilesY * 16 - 50)) + { + int x = (int)(teleportLocation.X / 16f); + int y = (int)(teleportLocation.Y / 16f); + if (!Collision.SolidCollision(teleportLocation, player.width, player.height)) + { + rogueStealth -= rogueStealthMax * 0.25f; - player.Teleport(teleportLocation, 1, 0); - NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0); + player.Teleport(teleportLocation, 1, 0); + NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0); - if (scarfCooldown) - player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true); - else - player.AddBuff(BuffID.ChaosState, chaosStateDuration, true); + if (scarfCooldown) + player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true); + else + player.AddBuff(BuffID.ChaosState, chaosStateDuration, true); - int numDust = 40; - Vector2 step = playerToTeleport / numDust; - for (int i = 0; i < numDust; i++) - { - int dustIndex = Dust.NewDust(player.Center - (step * i), 1, 1, 21, step.X, step.Y); - Main.dust[dustIndex].noGravity = true; - Main.dust[dustIndex].noLight = true; - } + int numDust = 40; + Vector2 step = playerToTeleport / numDust; + for (int i = 0; i < numDust; i++) + { + int dustIndex = Dust.NewDust(player.Center - (step * i), 1, 1, 21, step.X, step.Y); + Main.dust[dustIndex].noGravity = true; + Main.dust[dustIndex].noLight = true; + } - player.immune = true; - player.immuneTime = 120; - spectralVeilImmunity = 120; - for (int k = 0; k < player.hurtCooldowns.Length; k++) - { - player.hurtCooldowns[k] = player.immuneTime; - } - } - } - } + player.immune = true; + player.immuneTime = 120; + spectralVeilImmunity = 120; + for (int k = 0; k < player.hurtCooldowns.Length; k++) + { + player.hurtCooldowns[k] = player.immuneTime; + } + } + } + } } if (CalamityMod.PlaguePackHotKey.JustPressed && plaguedFuelPack && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && plaguedFuelPackCooldown == 0 && !player.mount.Active) @@ -2200,18 +2222,18 @@ namespace CalamityMod.CalPlayer { if (tarraMelee && !tarragonCloakCooldown && !tarragonCloak) { - if (player.whoAmI == Main.myPlayer) - { - player.AddBuff(ModContent.BuffType(), 602, false); - } - } + if (player.whoAmI == Main.myPlayer) + { + player.AddBuff(ModContent.BuffType(), 602, false); + } + } if (bloodflareRanged && !bloodflareSoulCooldown) { - if (player.whoAmI == Main.myPlayer) - { - player.AddBuff(ModContent.BuffType(), 1800, false); - } - Main.PlaySound(29, (int)player.position.X, (int)player.position.Y, 104); + if (player.whoAmI == Main.myPlayer) + { + player.AddBuff(ModContent.BuffType(), 1800, false); + } + Main.PlaySound(29, (int)player.position.X, (int)player.position.Y, 104); for (int num502 = 0; num502 < 64; num502++) { int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 16f), player.width, player.height - 16, 60, 0f, 0f, 0, default, 1f); @@ -2250,10 +2272,10 @@ namespace CalamityMod.CalPlayer } if (omegaBlueSet && omegaBlueCooldown <= 0) { - if (player.whoAmI == Main.myPlayer) - { - player.AddBuff(ModContent.BuffType(), 300, false); - } + if (player.whoAmI == Main.myPlayer) + { + player.AddBuff(ModContent.BuffType(), 300, false); + } omegaBlueCooldown = 1800; Main.PlaySound(29, (int)player.position.X, (int)player.position.Y, 104); for (int i = 0; i < 66; i++) @@ -2301,8 +2323,8 @@ namespace CalamityMod.CalPlayer } } } - if (plagueReaper && plagueReaperCooldown <= 0) - plagueReaperCooldown = 1800; + if (plagueReaper && plagueReaperCooldown <= 0) + plagueReaperCooldown = 1800; } if (CalamityMod.AstralArcanumUIHotkey.JustPressed && astralArcanum) { @@ -2433,7 +2455,7 @@ namespace CalamityMod.CalPlayer if (sulfurSet && player.controlJump && player.justJumped && player.jumpAgainSandstorm) { int bubble = Projectile.NewProjectile(new Vector2(Main.LocalPlayer.position.X, Main.LocalPlayer.position.Y + (Main.LocalPlayer.gravDir == -1f ? 20 : -20)), new Vector2(0f, 0f), ModContent.ProjectileType(), (int)(20f * (player.allDamage + throwingDamage - 1f)), 0f, Main.LocalPlayer.whoAmI, 1f, 0f); - Main.projectile[bubble].Calamity().forceRogue = true; + Main.projectile[bubble].Calamity().forceRogue = true; } } #endregion @@ -2733,6 +2755,11 @@ namespace CalamityMod.CalPlayer sirenBoobsAltHide = false; sirenBoobsAltForce = true; } + else if (item.type == ModContent.ItemType()) + { + profanedCrystalHide = false; + profanedCrystalForce = true; + } } } @@ -2886,6 +2913,10 @@ namespace CalamityMod.CalPlayer player.AddBuff(ModContent.BuffType(), 2); } } + if (profanedCrystal) + { + player.AddBuff(ModContent.BuffType(), 60, true); + } } #endregion @@ -2950,9 +2981,9 @@ namespace CalamityMod.CalPlayer public override void PostUpdateMiscEffects() { - CalamityPlayerMiscEffects.CalamityPostUpdateMiscEffects(player, mod); + CalamityPlayerMiscEffects.CalamityPostUpdateMiscEffects(player, mod); - if (player.HeldItem.type == ModContent.ItemType()) + if (player.HeldItem.type == ModContent.ItemType()) { gaelSwitchTimer = GaelSwitchPhase.LoseRage; stress += (int)MathHelper.Min(5, 10000 - stress); @@ -2972,6 +3003,9 @@ namespace CalamityMod.CalPlayer CalamityWorld.dragonScalesBought = true; } } + #endregion + + #region Shop Restrictions public override bool CanBuyItem(NPC vendor, Item[] shopInventory, Item item) { @@ -2981,6 +3015,14 @@ namespace CalamityMod.CalPlayer } return base.CanBuyItem(vendor, shopInventory, item); } + + public override bool CanSellItem(NPC vendor, Item[] shopInventory, Item item) + { + if (item.type == ModContent.ItemType()) + return CalamityWorld.downedSCal; //no easy moneycoins for post doggo/yhar + return base.CanSellItem(vendor, shopInventory, item); + } + #endregion public override void PostUpdateRunSpeeds() @@ -3019,20 +3061,20 @@ namespace CalamityMod.CalPlayer ((deepDiver && player.IsUnderwater()) ? 0.15f : 0f) + (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); - if (destroyerLore) - { - runAccMult *= 0.95f; - } - if (twinsLore) - { - if (player.statLife < (int)(player.statLifeMax2 * 0.5)) - runAccMult *= 0.95f; - } - if (skeletronPrimeLore) - { - runAccMult *= 0.95f; - } - if (abyssalDivingSuit && !player.IsUnderwater()) + if (destroyerLore) + { + runAccMult *= 0.95f; + } + if (twinsLore) + { + if (player.statLife < (int)(player.statLifeMax2 * 0.5)) + runAccMult *= 0.95f; + } + if (skeletronPrimeLore) + { + runAccMult *= 0.95f; + } + if (abyssalDivingSuit && !player.IsUnderwater()) { runAccMult *= 0.4f; runSpeedMult *= 0.4f; @@ -3061,12 +3103,12 @@ namespace CalamityMod.CalPlayer { runSpeedMult *= 0.6666667f; } - if (CalamityWorld.death && deathModeBlizzardTime > 0) - { - float speedMult = (float)(3600 - deathModeBlizzardTime) / 3600f; - runAccMult *= speedMult; - runSpeedMult *= speedMult; - } + if (CalamityWorld.death && deathModeBlizzardTime > 0) + { + float speedMult = (float)(3600 - deathModeBlizzardTime) / 3600f; + runAccMult *= speedMult; + runSpeedMult *= speedMult; + } player.runAcceleration *= runAccMult; player.maxRunSpeed *= runSpeedMult; @@ -3217,7 +3259,7 @@ namespace CalamityMod.CalPlayer if (player.FindBuffIndex(ModContent.BuffType()) > -1) { player.ClearBuff(ModContent.BuffType()); - player.AddBuff(ModContent.BuffType(), 1800); + player.AddBuff(ModContent.BuffType(), 1800); } player.AddBuff(ModContent.BuffType(), 2700); return false; @@ -3243,7 +3285,7 @@ namespace CalamityMod.CalPlayer if (player.FindBuffIndex(ModContent.BuffType()) > -1) { player.ClearBuff(ModContent.BuffType()); - player.AddBuff(ModContent.BuffType(), 1800); + player.AddBuff(ModContent.BuffType(), 1800); } } } @@ -3270,6 +3312,7 @@ namespace CalamityMod.CalPlayer } //Custom Death Messages + if (alcoholPoisoning && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { if (Main.rand.Next(2) == 0) @@ -3349,19 +3392,19 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(player.name + " vaporized into thin air."); } - if (everclear && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) - { - damageSource = PlayerDeathReason.ByCustomReason(player.name + " succumbed to alcohol sickness."); - } if (manaOverloader && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s life was completely converted into mana."); } - if ((bloodyMary || evergreenGin || fireball || margarita || moonshine || moscowMule || redWine || screwdriver || starBeamRye || tequila || tequilaSunrise || vodka || whiteWine) + if ((bloodyMary || everclear || evergreenGin || fireball || margarita || moonshine || moscowMule || redWine || screwdriver || starBeamRye || tequila || tequilaSunrise || vodka || whiteWine) && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { damageSource = PlayerDeathReason.ByCustomReason(player.name + " succumbed to alcohol sickness."); } + if (profanedCrystalBuffs && !profanedCrystalHide) + { + damageSource = PlayerDeathReason.ByCustomReason(player.name + " was summoned too soon."); + } if (NPC.AnyNPCs(ModContent.NPCType())) { @@ -3420,11 +3463,11 @@ namespace CalamityMod.CalPlayer bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true)); if (isTrueMelee) { - if (tScale) - { - player.statDefense += 25; - player.endurance += 0.1f; - } + if (tScale) + { + player.statDefense += 25; + player.endurance += 0.1f; + } float damageAdd = (dodgeScarf ? 0.2f : 0f) + ((aBulwarkRare && aBulwarkRareMeleeBoostTimer > 0) ? 2f : 0f) + @@ -3457,19 +3500,19 @@ namespace CalamityMod.CalPlayer { add += 0.1f; } - if (etherealExtorter && player.ZoneDungeon && item.Calamity().rogue && !item.consumable) - { - add += 0.05f; - } + if (etherealExtorter && player.ZoneDungeon && item.Calamity().rogue && !item.consumable) + { + add += 0.05f; + } - if (item.ranged) - { - acidRoundMultiplier = (double)(item.useTime) / 20D; - } - else - { - acidRoundMultiplier = 1D; - } + if (item.ranged) + { + acidRoundMultiplier = (double)(item.useTime) / 20D; + } + else + { + acidRoundMultiplier = 1D; + } } public override void GetWeaponKnockback(Item item, ref float knockback) { @@ -3493,18 +3536,18 @@ namespace CalamityMod.CalPlayer { knockback *= 1.09f; } - bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; if (etherealExtorter) { - if (player.ZoneOverworldHeight && ZoneForest) - { - knockback *= 1.15f; - } + if (player.ZoneOverworldHeight && ZoneForest) + { + knockback *= 1.15f; + } } } #endregion - #region Modify Mana Cost + #region Modify Mana Cost public override void ModifyManaCost(Item item, ref float reduce, ref float mult) { if (item.type == ItemID.SpaceGun && meteorSet) @@ -3512,37 +3555,37 @@ namespace CalamityMod.CalPlayer mult /= 2; } } - #endregion + #endregion #region Melee Effects public override void MeleeEffects(Item item, Rectangle hitbox) { - if (!item.melee && !item.noMelee && (!item.noUseGraphic && (int) player.meleeEnchant > 0)) - { - if ((int) player.meleeEnchant == 7) - { - if (Main.rand.NextBool(20)) - { - int Type = Main.rand.Next(139, 143); - int index = Dust.NewDust(new Vector2((float) hitbox.X, (float) hitbox.Y), hitbox.Width, hitbox.Height, Type, player.velocity.X, player.velocity.Y, 0, new Color(), 1.2f); - Main.dust[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.01); - Main.dust[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.01); - Main.dust[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; - Main.dust[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; - Main.dust[index].scale *= (float) (1.0 + (double) Main.rand.Next(-30, 31) * 0.01); - } - if (Main.rand.NextBool(40)) - { - int Type = Main.rand.Next(276, 283); - int index = Gore.NewGore(new Vector2((float) hitbox.X, (float) hitbox.Y), player.velocity, Type, 1f); - Main.gore[index].velocity.X *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.01); - Main.gore[index].velocity.Y *= (float) (1.0 + (double) Main.rand.Next(-50, 51) * 0.01); - Main.gore[index].scale *= (float) (1.0 + (double) Main.rand.Next(-20, 21) * 0.01); - Main.gore[index].velocity.X += (float) Main.rand.Next(-50, 51) * 0.05f; - Main.gore[index].velocity.Y += (float) Main.rand.Next(-50, 51) * 0.05f; - } - } - } + if (!item.melee && !item.noMelee && (!item.noUseGraphic && (int) player.meleeEnchant > 0)) + { + if ((int) player.meleeEnchant == 7) + { + if (Main.rand.NextBool(20)) + { + int Type = Main.rand.Next(139, 143); + int index = Dust.NewDust(new Vector2(hitbox.X,hitbox.Y), hitbox.Width, hitbox.Height, Type, player.velocity.X, player.velocity.Y, 0, new Color(), 1.2f); + Main.dust[index].velocity.X *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01); + Main.dust[index].velocity.Y *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01); + Main.dust[index].velocity.X += Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].velocity.Y += Main.rand.Next(-50, 51) * 0.05f; + Main.dust[index].scale *= (float) (1.0 + Main.rand.Next(-30, 31) * 0.01); + } + if (Main.rand.NextBool(40)) + { + int Type = Main.rand.Next(276, 283); + int index = Gore.NewGore(new Vector2(hitbox.X, hitbox.Y), player.velocity, Type, 1f); + Main.gore[index].velocity.X *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01); + Main.gore[index].velocity.Y *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01); + Main.gore[index].scale *= (float) (1.0 + Main.rand.Next(-20, 21) * 0.01); + Main.gore[index].velocity.X += Main.rand.Next(-50, 51) * 0.05f; + Main.gore[index].velocity.Y += Main.rand.Next(-50, 51) * 0.05f; + } + } + } bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true)); if (isTrueMelee) { @@ -3669,137 +3712,137 @@ namespace CalamityMod.CalPlayer #region On Hit NPC public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit) { - if (!item.melee && (int) player.meleeEnchant == 7) + if (!item.melee && (int) player.meleeEnchant == 7) Projectile.NewProjectile(target.Center.X, target.Center.Y, target.velocity.X, target.velocity.Y, ProjectileID.ConfettiMelee, 0, 0f, player.whoAmI, 0f, 0f); if (omegaBlueChestplate) target.AddBuff(ModContent.BuffType(), 240); if (sulfurSet) target.AddBuff(BuffID.Poisoned, 120); - switch (item.type) - { - case ItemID.IceSickle: - case ItemID.Frostbrand: - target.AddBuff(BuffID.Frostburn, 600); - break; + switch (item.type) + { + case ItemID.IceSickle: + case ItemID.Frostbrand: + target.AddBuff(BuffID.Frostburn, 600); + break; - case ItemID.IceBlade: - if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 360); - else if (Main.rand.NextBool(3)) - target.AddBuff(BuffID.Frostburn, 120); - break; - } + case ItemID.IceBlade: + if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 360); + else if (Main.rand.NextBool(3)) + target.AddBuff(BuffID.Frostburn, 120); + break; + } - if (item.melee) //prevents Deep Sea Dumbell from snagging true melee debuff memes - { - if (eGauntlet) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Frostburn, 120, false); - target.AddBuff(BuffID.Ichor, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - if (Main.rand.NextBool(5)) - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (cryogenSoul || frostFlare) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.Frostburn, 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.Frostburn, 240, false); - } - else - { - target.AddBuff(BuffID.Frostburn, 120, false); - } - } - if (yInsignia) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (ataxiaFire) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.OnFire, 720, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.OnFire, 480, false); - } - else - { - target.AddBuff(BuffID.OnFire, 240, false); - } - } - } - if (aWeapon) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (abyssalAmulet) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (dsSetBonus) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } + if (item.melee) //prevents Deep Sea Dumbell from snagging true melee debuff memes + { + if (eGauntlet) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + if (Main.rand.NextBool(5)) + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.Frostburn, 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.Frostburn, 240, false); + } + else + { + target.AddBuff(BuffID.Frostburn, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } + if (aWeapon) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (abyssalAmulet) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (dsSetBonus) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } if (alchFlask) { if (Main.rand.NextBool(4)) @@ -3866,429 +3909,429 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.Midas, 120, false); }*/ } - } + } if (holyWrath) { target.AddBuff(ModContent.BuffType(), 600, false); } - if (vexation) - { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { target.AddBuff(BuffID.CursedInferno, 120, false); target.AddBuff(BuffID.Venom, 120, false); - } - } + } + } } #endregion #region On Hit NPC With Proj public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit) { - switch (proj.type) - { - case ProjectileID.BoneArrow: - target.AddBuff(ModContent.BuffType(), 300); - break; + switch (proj.type) + { + case ProjectileID.BoneArrow: + target.AddBuff(ModContent.BuffType(), 300); + break; - case ProjectileID.FrostBlastFriendly: - case ProjectileID.NorthPoleWeapon: - target.AddBuff(BuffID.Frostburn, 600); - break; + case ProjectileID.FrostBlastFriendly: + case ProjectileID.NorthPoleWeapon: + target.AddBuff(BuffID.Frostburn, 600); + break; - case ProjectileID.FrostBoltStaff: - case ProjectileID.IceSickle: - case ProjectileID.FrostBoltSword: - case ProjectileID.FrostArrow: - case ProjectileID.NorthPoleSpear: - target.AddBuff(BuffID.Frostburn, 480); - break; + case ProjectileID.FrostBoltStaff: + case ProjectileID.IceSickle: + case ProjectileID.FrostBoltSword: + case ProjectileID.FrostArrow: + case ProjectileID.NorthPoleSpear: + target.AddBuff(BuffID.Frostburn, 480); + break; - case ProjectileID.Blizzard: - case ProjectileID.NorthPoleSnowflake: - target.AddBuff(BuffID.Frostburn, 240); - break; + case ProjectileID.Blizzard: + case ProjectileID.NorthPoleSnowflake: + target.AddBuff(BuffID.Frostburn, 240); + break; - case ProjectileID.SnowBallFriendly: - if (Main.rand.NextBool(10)) - target.AddBuff(BuffID.Frostburn, 120); - else if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 60); - break; + case ProjectileID.SnowBallFriendly: + if (Main.rand.NextBool(10)) + target.AddBuff(BuffID.Frostburn, 120); + else if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 60); + break; - case ProjectileID.IceBoomerang: - case ProjectileID.IceBolt: - case ProjectileID.FrostDaggerfish: - if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 240); - else if (Main.rand.NextBool(3)) - target.AddBuff(BuffID.Frostburn, 120); - break; - } + case ProjectileID.IceBoomerang: + case ProjectileID.IceBolt: + case ProjectileID.FrostDaggerfish: + if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 240); + else if (Main.rand.NextBool(3)) + target.AddBuff(BuffID.Frostburn, 120); + break; + } - if (!proj.npcProj && !proj.trap) - { - if (sulfurSet && proj.friendly && !target.friendly) - target.AddBuff(BuffID.Poisoned, 120); - if (omegaBlueChestplate && proj.friendly && !target.friendly) - target.AddBuff(ModContent.BuffType(), 240); + if (!proj.npcProj && !proj.trap) + { + if (sulfurSet && proj.friendly && !target.friendly) + target.AddBuff(BuffID.Poisoned, 120); + if (omegaBlueChestplate && proj.friendly && !target.friendly) + target.AddBuff(ModContent.BuffType(), 240); - if (proj.melee && silvaMelee && Main.rand.NextBool(4)) - target.AddBuff(ModContent.BuffType(), 20); + if (proj.melee && silvaMelee && Main.rand.NextBool(4)) + target.AddBuff(ModContent.BuffType(), 20); - if (abyssalAmulet) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (dsSetBonus) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (uberBees && (proj.type == 566 || proj.type == 181 || proj.type == 189)) - { - target.AddBuff(ModContent.BuffType(), 360); - } - else if (alchFlask) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (proj.melee) - { - if (eGauntlet) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Frostburn, 120, false); - target.AddBuff(BuffID.Ichor, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - if (Main.rand.NextBool(5)) - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (aWeapon) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (cryogenSoul || frostFlare) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.Frostburn, 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.Frostburn, 240, false); - } - else - { - target.AddBuff(BuffID.Frostburn, 120, false); - } - } - if (yInsignia) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (ataxiaFire) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.OnFire, 720, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.OnFire, 480, false); - } - else - { - target.AddBuff(BuffID.OnFire, 240, false); - } - } - } - if (armorCrumbling || armorShattering) - { - if (proj.melee || proj.Calamity().rogue) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - } - if (perforatorLore) - { - target.AddBuff(BuffID.Ichor, 90); - } - if (hiveMindLore) - { - target.AddBuff(BuffID.CursedInferno, 90); - } - if (holyWrath) - { - target.AddBuff(ModContent.BuffType(), 600, false); - } - else if (providenceLore) - { - target.AddBuff(ModContent.BuffType(), 420, false); - } - if (proj.Calamity().rogue) - { - if (player.meleeEnchant > 0) - { - if (player.meleeEnchant == 1) - { - target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); - } - if (player.meleeEnchant == 2) - { - target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); - } - if (player.meleeEnchant == 3) - { - target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); - } - if (player.meleeEnchant == 5) - { - target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); - } - if (player.meleeEnchant == 6) - { - target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); - } - if (player.meleeEnchant == 8) - { - target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); - } - if (player.meleeEnchant == 4) - { - target.AddBuff(BuffID.Midas, 120, false); - } - } - if (etherealExtorter) - { - if (ZoneSunkenSea) - { - target.AddBuff(ModContent.BuffType(), 60, false); - } - if (ZoneSulphur) - { - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 300, false); - } - if (Main.moonPhase == 6) //first quarter - { - target.AddBuff(BuffID.Midas, 120, false); - } - if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - } - } - if (vexation) - { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - } - } - } + if (abyssalAmulet) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (dsSetBonus) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (uberBees && (proj.type == 566 || proj.type == 181 || proj.type == 189)) + { + target.AddBuff(ModContent.BuffType(), 360); + } + else if (alchFlask) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (proj.melee) + { + if (eGauntlet) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + if (Main.rand.NextBool(5)) + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (aWeapon) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.Frostburn, 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.Frostburn, 240, false); + } + else + { + target.AddBuff(BuffID.Frostburn, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } + if (armorCrumbling || armorShattering) + { + if (proj.melee || proj.Calamity().rogue) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + } + if (perforatorLore) + { + target.AddBuff(BuffID.Ichor, 90); + } + if (hiveMindLore) + { + target.AddBuff(BuffID.CursedInferno, 90); + } + if (holyWrath) + { + target.AddBuff(ModContent.BuffType(), 600, false); + } + else if (providenceLore) + { + target.AddBuff(ModContent.BuffType(), 420, false); + } + if (proj.Calamity().rogue) + { + if (player.meleeEnchant > 0) + { + if (player.meleeEnchant == 1) + { + target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); + } + if (player.meleeEnchant == 2) + { + target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 3) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 5) + { + target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); + } + if (player.meleeEnchant == 6) + { + target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); + } + if (player.meleeEnchant == 8) + { + target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); + } + if (player.meleeEnchant == 4) + { + target.AddBuff(BuffID.Midas, 120, false); + } + } + if (etherealExtorter) + { + if (ZoneSunkenSea) + { + target.AddBuff(ModContent.BuffType(), 60, false); + } + if (ZoneSulphur) + { + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 300, false); + } + if (Main.moonPhase == 6) //first quarter + { + target.AddBuff(BuffID.Midas, 120, false); + } + if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + } + } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } + } } #endregion #region PvP public override void OnHitPvp(Item item, Player target, int damage, bool crit) { - if (!item.melee && (int) player.meleeEnchant == 7) + if (!item.melee && (int) player.meleeEnchant == 7) Projectile.NewProjectile(target.Center.X, target.Center.Y, target.velocity.X, target.velocity.Y, ProjectileID.ConfettiMelee, 0, 0f, player.whoAmI, 0f, 0f); if (omegaBlueChestplate) target.AddBuff(ModContent.BuffType(), 240); if (sulfurSet) target.AddBuff(BuffID.Poisoned, 120); - switch (item.type) - { - case ItemID.IceSickle: - case ItemID.Frostbrand: - target.AddBuff(BuffID.Frostburn, 600); - break; - } - if (item.type == ItemID.IceBlade) - { - if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 360); - else if (Main.rand.NextBool(3)) - target.AddBuff(BuffID.Frostburn, 120); - } + switch (item.type) + { + case ItemID.IceSickle: + case ItemID.Frostbrand: + target.AddBuff(BuffID.Frostburn, 600); + break; + } + if (item.type == ItemID.IceBlade) + { + if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 360); + else if (Main.rand.NextBool(3)) + target.AddBuff(BuffID.Frostburn, 120); + } - if (item.melee) - { - if (eGauntlet) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Frostburn, 120, false); - target.AddBuff(BuffID.Ichor, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - if (Main.rand.NextBool(5)) - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (aWeapon) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (abyssalAmulet) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (cryogenSoul || frostFlare) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.Frostburn, 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.Frostburn, 240, false); - } - else - { - target.AddBuff(BuffID.Frostburn, 120, false); - } - } - if (yInsignia) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (ataxiaFire) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.OnFire, 720, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.OnFire, 480, false); - } - else - { - target.AddBuff(BuffID.OnFire, 240, false); - } - } - } + if (item.melee) + { + if (eGauntlet) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + if (Main.rand.NextBool(5)) + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (aWeapon) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (abyssalAmulet) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.Frostburn, 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.Frostburn, 240, false); + } + else + { + target.AddBuff(BuffID.Frostburn, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } if (alchFlask) { if (Main.rand.NextBool(4)) @@ -4337,303 +4380,303 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.Midas, 120, false); }*/ } - } + } if (holyWrath) { target.AddBuff(ModContent.BuffType(), 600, false); } - if (vexation) - { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { target.AddBuff(BuffID.CursedInferno, 120, false); target.AddBuff(BuffID.Venom, 120, false); - } - } + } + } } public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) { - switch (proj.type) - { - case ProjectileID.BoneArrow: - target.AddBuff(ModContent.BuffType(), 300); - break; + switch (proj.type) + { + case ProjectileID.BoneArrow: + target.AddBuff(ModContent.BuffType(), 300); + break; - case ProjectileID.FrostBlastFriendly: - case ProjectileID.NorthPoleWeapon: - target.AddBuff(BuffID.Frostburn, 600); - break; + case ProjectileID.FrostBlastFriendly: + case ProjectileID.NorthPoleWeapon: + target.AddBuff(BuffID.Frostburn, 600); + break; - case ProjectileID.FrostBoltStaff: - case ProjectileID.IceSickle: - case ProjectileID.FrostBoltSword: - case ProjectileID.FrostArrow: - case ProjectileID.NorthPoleSpear: - target.AddBuff(BuffID.Frostburn, 480); - break; + case ProjectileID.FrostBoltStaff: + case ProjectileID.IceSickle: + case ProjectileID.FrostBoltSword: + case ProjectileID.FrostArrow: + case ProjectileID.NorthPoleSpear: + target.AddBuff(BuffID.Frostburn, 480); + break; - case ProjectileID.Blizzard: - case ProjectileID.NorthPoleSnowflake: - target.AddBuff(BuffID.Frostburn, 240); - break; - } - if (proj.type == ProjectileID.SnowBallFriendly) - { - if (Main.rand.NextBool(10)) - target.AddBuff(BuffID.Frostburn, 120); - else if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 60); - } - else if (proj.type == (ProjectileID.IceBoomerang | ProjectileID.IceBolt | ProjectileID.FrostDaggerfish)) - { - if (Main.rand.NextBool(5)) - target.AddBuff(BuffID.Frostburn, 240); - else if (Main.rand.NextBool(3)) - target.AddBuff(BuffID.Frostburn, 120); - } + case ProjectileID.Blizzard: + case ProjectileID.NorthPoleSnowflake: + target.AddBuff(BuffID.Frostburn, 240); + break; + } + if (proj.type == ProjectileID.SnowBallFriendly) + { + if (Main.rand.NextBool(10)) + target.AddBuff(BuffID.Frostburn, 120); + else if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 60); + } + else if (proj.type == (ProjectileID.IceBoomerang | ProjectileID.IceBolt | ProjectileID.FrostDaggerfish)) + { + if (Main.rand.NextBool(5)) + target.AddBuff(BuffID.Frostburn, 240); + else if (Main.rand.NextBool(3)) + target.AddBuff(BuffID.Frostburn, 120); + } - if (!proj.npcProj && !proj.trap) - { - if (sulfurSet && proj.friendly) - target.AddBuff(BuffID.Poisoned, 120); - if (omegaBlueChestplate && proj.friendly) - target.AddBuff(ModContent.BuffType(), 240); + if (!proj.npcProj && !proj.trap) + { + if (sulfurSet && proj.friendly) + target.AddBuff(BuffID.Poisoned, 120); + if (omegaBlueChestplate && proj.friendly) + target.AddBuff(ModContent.BuffType(), 240); - if (proj.melee && silvaMelee && Main.rand.NextBool(4)) - target.AddBuff(ModContent.BuffType(), 20); + if (proj.melee && silvaMelee && Main.rand.NextBool(4)) + target.AddBuff(ModContent.BuffType(), 20); - if (abyssalAmulet) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (uberBees && (proj.type == 566 || proj.type == 181 || proj.type == 189)) - { - target.AddBuff(ModContent.BuffType(), 360); - } - else if (alchFlask) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (proj.melee) - { - if (eGauntlet) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Frostburn, 120, false); - target.AddBuff(BuffID.Ichor, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 120, false); - if (Main.rand.NextBool(5)) - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (aWeapon) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (cryogenSoul || frostFlare) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.Frostburn, 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.Frostburn, 240, false); - } - else - { - target.AddBuff(BuffID.Frostburn, 120, false); - } - } - if (yInsignia) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - if (ataxiaFire) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(BuffID.OnFire, 720, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(BuffID.OnFire, 480, false); - } - else - { - target.AddBuff(BuffID.OnFire, 240, false); - } - } - } - if (armorCrumbling || armorShattering) - { - if (proj.melee || proj.Calamity().rogue) - { - if (Main.rand.NextBool(4)) - { - target.AddBuff(ModContent.BuffType(), 360, false); - } - else if (Main.rand.NextBool(2)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - else - { - target.AddBuff(ModContent.BuffType(), 120, false); - } - } - } - if (perforatorLore) - { - target.AddBuff(BuffID.Ichor, 90); - } - if (hiveMindLore) - { - target.AddBuff(BuffID.CursedInferno, 90); - } - if (holyWrath) - { - target.AddBuff(ModContent.BuffType(), 600, false); - } - else if (providenceLore) - { - target.AddBuff(ModContent.BuffType(), 420, false); - } - if (proj.Calamity().rogue) - { - if (player.meleeEnchant > 0) - { - if (player.meleeEnchant == 1) - { - target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); - } - if (player.meleeEnchant == 2) - { - target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); - } - if (player.meleeEnchant == 3) - { - target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); - } - if (player.meleeEnchant == 5) - { - target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); - } - if (player.meleeEnchant == 6) - { - target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); - } - if (player.meleeEnchant == 8) - { - target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); - } - /*if (player.meleeEnchant == 4) + if (abyssalAmulet) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (uberBees && (proj.type == 566 || proj.type == 181 || proj.type == 189)) + { + target.AddBuff(ModContent.BuffType(), 360); + } + else if (alchFlask) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (proj.melee) + { + if (eGauntlet) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 120, false); + if (Main.rand.NextBool(5)) + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (aWeapon) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.Frostburn, 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.Frostburn, 240, false); + } + else + { + target.AddBuff(BuffID.Frostburn, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } + if (armorCrumbling || armorShattering) + { + if (proj.melee || proj.Calamity().rogue) + { + if (Main.rand.NextBool(4)) + { + target.AddBuff(ModContent.BuffType(), 360, false); + } + else if (Main.rand.NextBool(2)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + else + { + target.AddBuff(ModContent.BuffType(), 120, false); + } + } + } + if (perforatorLore) + { + target.AddBuff(BuffID.Ichor, 90); + } + if (hiveMindLore) + { + target.AddBuff(BuffID.CursedInferno, 90); + } + if (holyWrath) + { + target.AddBuff(ModContent.BuffType(), 600, false); + } + else if (providenceLore) + { + target.AddBuff(ModContent.BuffType(), 420, false); + } + if (proj.Calamity().rogue) + { + if (player.meleeEnchant > 0) + { + if (player.meleeEnchant == 1) + { + target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false); + } + if (player.meleeEnchant == 2) + { + target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 3) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false); + } + if (player.meleeEnchant == 5) + { + target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false); + } + if (player.meleeEnchant == 6) + { + target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false); + } + if (player.meleeEnchant == 8) + { + target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false); + } + /*if (player.meleeEnchant == 4) { target.AddBuff(BuffID.Midas, 120, false); }*/ - } - if (etherealExtorter) - { - if (ZoneSunkenSea) - { - target.AddBuff(ModContent.BuffType(), 60, false); - } - if (ZoneSulphur) - { - target.AddBuff(ModContent.BuffType(), 120, false); - target.AddBuff(ModContent.BuffType(), 300, false); - } - if (Main.moonPhase == 6) //first quarter - { - target.AddBuff(BuffID.Midas, 120, false); - } - if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) - { - target.AddBuff(ModContent.BuffType(), 240, false); - } - } - } - if (vexation) - { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { - target.AddBuff(BuffID.CursedInferno, 120, false); - target.AddBuff(BuffID.Venom, 120, false); - } - } - if (proj.type == ProjectileID.IchorArrow && player.inventory[player.selectedItem].type == ModContent.ItemType()) - { - target.AddBuff(BuffID.Midas, 300, false); - } - } + } + if (etherealExtorter) + { + if (ZoneSunkenSea) + { + target.AddBuff(ModContent.BuffType(), 60, false); + } + if (ZoneSulphur) + { + target.AddBuff(ModContent.BuffType(), 120, false); + target.AddBuff(ModContent.BuffType(), 300, false); + } + if (Main.moonPhase == 6) //first quarter + { + target.AddBuff(BuffID.Midas, 120, false); + } + if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type)) + { + target.AddBuff(ModContent.BuffType(), 240, false); + } + } + } + if (vexation) + { + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + } + if (proj.type == ProjectileID.IchorArrow && player.inventory[player.selectedItem].type == ModContent.ItemType()) + { + target.AddBuff(BuffID.Midas, 300, false); + } + } } #endregion #region Modify Hit NPC public override void ModifyHitNPC(Item item, NPC target, ref int damage, ref float knockback, ref bool crit) { - bool isTrueMelee = item.melee && item.shoot == 0; + bool isTrueMelee = item.melee && item.shoot == 0; - #region MultiplierBoosts - double damageMult = 1.0; + #region MultiplierBoosts + double damageMult = 1.0; if (silvaMelee && Main.rand.NextBool(4) && item.melee) { damageMult += 4.0; @@ -4686,41 +4729,41 @@ namespace CalamityMod.CalPlayer } #endregion - #region AdditiveBoosts + #region AdditiveBoosts if (item.melee && badgeOfBravery) { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 10); - damage += (int)(0.5f * penetratedDefense); - } + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 10); + damage += (int)(0.5f * penetratedDefense); + } } - #endregion + #endregion if (yharonLore) damage = (int)((double)damage * 0.75); if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue) { - if (isTrueMelee && soaring) - { - double useTimeMultiplier = 0.85 + ((double)(item.useTime * item.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost - double wingTimeFraction = (double)player.wingTimeMax / 20D; - double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D)); - - if (player.wingTime < player.wingTimeMax) - player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier)); - - if (player.wingTime > player.wingTimeMax) - player.wingTime = player.wingTimeMax; - } - if (item.melee && !item.noMelee && !item.noUseGraphic) + if (isTrueMelee && soaring) { - if (ataxiaGeyser) + double useTimeMultiplier = 0.85 + ((double)(item.useTime * item.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost + double wingTimeFraction = (double)player.wingTimeMax / 20D; + double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D)); + + if (player.wingTime < player.wingTimeMax) + player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier)); + + if (player.wingTime > player.wingTimeMax) + player.wingTime = player.wingTimeMax; + } + if (item.melee && !item.noMelee && !item.noUseGraphic) + { + if (ataxiaGeyser) { if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 3) { @@ -4845,27 +4888,27 @@ namespace CalamityMod.CalPlayer crit = Main.rand.Next(1, 101) < throwingCrit; } - if (proj.npcProj || proj.trap) - return; + if (proj.npcProj || proj.trap) + return; bool isTrueMelee = proj.Calamity().trueMelee; - bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type); + bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type); bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue; - Item heldItem = player.inventory[player.selectedItem]; + Item heldItem = player.inventory[player.selectedItem]; - if (isTrueMelee && soaring) - { - double useTimeMultiplier = 0.85 + ((double)(heldItem.useTime * heldItem.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost - double wingTimeFraction = (double)player.wingTimeMax / 20D; - double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D)); + if (isTrueMelee && soaring) + { + double useTimeMultiplier = 0.85 + ((double)(heldItem.useTime * heldItem.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost + double wingTimeFraction = (double)player.wingTimeMax / 20D; + double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D)); - if (player.wingTime < player.wingTimeMax) - player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier)); + if (player.wingTime < player.wingTimeMax) + player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier)); - if (player.wingTime > player.wingTimeMax) - player.wingTime = player.wingTimeMax; - } + if (player.wingTime > player.wingTimeMax) + player.wingTime = player.wingTimeMax; + } #region MultiplierBoosts double damageMult = 1.0; @@ -4980,36 +5023,36 @@ namespace CalamityMod.CalPlayer } if ((filthyGlove || electricianGlove) && proj.Calamity().stealthStrike && proj.Calamity().rogue) { - if (nanotech) - damageMult += 0.05; - else - damageMult += 0.1; + if (nanotech) + damageMult += 0.05; + else + damageMult += 0.1; } if (etherealExtorter && proj.Calamity().rogue) { - bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; + bool ZoneForest = !ZoneAbyss && !ZoneSulphur && !ZoneAstral && !ZoneCalamity && !ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor; if (Main.moonPhase == 7 && crit) //Waxing Gibbous - { - damageMult += 0.05; - } - if (Main.moonPhase == 5) //Waxing Cresent - { - if (proj.penetrate == -1) - damageMult += 0.1; - else if (proj.penetrate >= 5) - damageMult += 0.08; - else if (proj.penetrate == 4) - damageMult += 0.06; - else if (proj.penetrate == 3) - damageMult += 0.03; - else if (proj.penetrate == 2) - damageMult += 0.02; - } - if (player.ZoneDirtLayerHeight && ZoneForest) - { - if (Main.rand.NextBool(20) && !crit) //5% chance to minicrit - damageMult += 0.5; - } + { + damageMult += 0.05; + } + if (Main.moonPhase == 5) //Waxing Cresent + { + if (proj.penetrate == -1) + damageMult += 0.1; + else if (proj.penetrate >= 5) + damageMult += 0.08; + else if (proj.penetrate == 4) + damageMult += 0.06; + else if (proj.penetrate == 3) + damageMult += 0.03; + else if (proj.penetrate == 2) + damageMult += 0.02; + } + if (player.ZoneDirtLayerHeight && ZoneForest) + { + if (Main.rand.NextBool(20) && !crit) //5% chance to minicrit + damageMult += 0.5; + } } damage = (int)(damage * damageMult); @@ -5037,56 +5080,57 @@ namespace CalamityMod.CalPlayer } if (proj.Calamity().stealthStrike && proj.Calamity().rogue && nanotech) { - //Ozzatron insists on counting for edge-cases - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 20); //nanotech is weaker - damage += (int)(0.5f * penetratedDefense); + //Ozzatron insists on counting for edge-cases + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 20); //nanotech is weaker + damage += (int)(0.5f * penetratedDefense); } else if (proj.Calamity().stealthStrike && proj.Calamity().rogue && electricianGlove) { - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 30); - damage += (int)(0.5f * penetratedDefense); + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 30); + damage += (int)(0.5f * penetratedDefense); } else if (proj.Calamity().stealthStrike && proj.Calamity().rogue && (filthyGlove || bloodyGlove)) { - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 10); - damage += (int)(0.5f * penetratedDefense); + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 10); + damage += (int)(0.5f * penetratedDefense); } if (proj.Calamity().rogue && etherealExtorter) { if (CalamityMod.boomerangProjList.Contains(proj.type) && player.ZoneCorrupt) - { - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 6); - damage += (int)(0.5f * penetratedDefense); - } + { + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 6); + damage += (int)(0.5f * penetratedDefense); + } } if (proj.melee && badgeOfBravery) { - if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || - player.armor[0].type == ModContent.ItemType()) && - player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) - { - int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); - int penetratedDefense = Math.Min(penetratableDefense, 10); - damage += (int)(0.5f * penetratedDefense); - } + if ((player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType() || player.armor[0].type == ModContent.ItemType() || + player.armor[0].type == ModContent.ItemType()) && + player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) + { + int penetratableDefense = Math.Max(target.defense - player.armorPenetration, 0); + int penetratedDefense = Math.Min(penetratableDefense, 10); + damage += (int)(0.5f * penetratedDefense); + } } #endregion #region MultiplicativeReductions // Forbidden and Fearmonger armor makes you immune to the summoner cross-class nerf - bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor; - if (isSummon && !fearmongerSet && !forbidden) + // Profaned Soul Crystal encourages use of other weapons, nerfing the damage would not make sense. + bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor; + if (isSummon && !fearmongerSet && !forbidden && !profanedCrystalBuffs) { if (heldItem.type > 0) { if (!heldItem.summon && - (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && - heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) + (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && + heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) { damage = (int)(damage * 0.75); } @@ -5108,9 +5152,9 @@ namespace CalamityMod.CalPlayer } if (proj.type == ModContent.ProjectileType()) damage = (int)(damage * 0.8); - else if (proj.type == ModContent.ProjectileType() && heldItem.type == ModContent.ItemType()) - damage = (int)(damage * 0.75); - } + else if (proj.type == ModContent.ProjectileType() && heldItem.type == ModContent.ItemType()) + damage = (int)(damage * 0.75); + } if (proj.type == ProjectileID.SpectreWrath && player.ghostHurt) damage = (int)(damage * 0.7); if (yharonLore) @@ -5158,8 +5202,8 @@ namespace CalamityMod.CalPlayer value15.Normalize(); value15 *= (float)Main.rand.Next(30, 61) * 0.1f; int num17 = Projectile.NewProjectile(proj.oldPosition.X + (float)(proj.width / 2), proj.oldPosition.Y + (float)(proj.height / 2), value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)damage * 0.1), 0f, player.whoAmI, 0f, 0f); - Main.projectile[num17].Calamity().forceRogue = true; - Main.projectile[num17].localNPCHitCooldown = -1; + Main.projectile[num17].Calamity().forceRogue = true; + Main.projectile[num17].localNPCHitCooldown = -1; } } if (astralStarRain && crit && astralStarRainCooldown <= 0) @@ -5385,7 +5429,7 @@ namespace CalamityMod.CalPlayer if (raiderTalisman && raiderStack < 150 && proj.Calamity().rogue && crit && raiderCooldown <= 0) { raiderStack++; - raiderCooldown = 30; + raiderCooldown = 30; } if (CalamityWorld.revenge && CalamityMod.CalamityConfig.AdrenalineAndRage) { @@ -5436,7 +5480,7 @@ namespace CalamityMod.CalPlayer } if (fleshTotem && !fleshTotemCooldown) { - player.AddBuff(ModContent.BuffType(), 1200, false); //20 seconds + player.AddBuff(ModContent.BuffType(), 1200, false); //20 seconds damage /= 2; } if (tarragonCloak && !tarragonCloakCooldown && tarraMelee) @@ -5537,46 +5581,46 @@ namespace CalamityMod.CalPlayer } if (CalamityWorld.revenge) { - double damageMultiplier = 1D; - if (CalamityMod.revengeanceProjectileBuffList25Percent.Contains(proj.type)) - { - damageMultiplier += 0.25; - } - else if (CalamityMod.revengeanceProjectileBuffList20Percent.Contains(proj.type)) - { - damageMultiplier += 0.2; - } - else if (CalamityMod.revengeanceProjectileBuffList15Percent.Contains(proj.type)) - { - damageMultiplier += 0.15; - } - else if (CalamityMod.revengeanceProjectileBuffList10Percent.Contains(proj.type)) - { - damageMultiplier += 0.1; - } - else if (CalamityMod.revengeanceProjectileBuffList5Percent.Contains(proj.type)) - { - damageMultiplier += 0.05; - } + double damageMultiplier = 1D; + if (CalamityMod.revengeanceProjectileBuffList25Percent.Contains(proj.type)) + { + damageMultiplier += 0.25; + } + else if (CalamityMod.revengeanceProjectileBuffList20Percent.Contains(proj.type)) + { + damageMultiplier += 0.2; + } + else if (CalamityMod.revengeanceProjectileBuffList15Percent.Contains(proj.type)) + { + damageMultiplier += 0.15; + } + else if (CalamityMod.revengeanceProjectileBuffList10Percent.Contains(proj.type)) + { + damageMultiplier += 0.1; + } + else if (CalamityMod.revengeanceProjectileBuffList5Percent.Contains(proj.type)) + { + damageMultiplier += 0.05; + } - if (CalamityWorld.death) - damageMultiplier += (damageMultiplier - 1D) * 0.6; + if (CalamityWorld.death) + damageMultiplier += (damageMultiplier - 1D) * 0.6; - damage = (int)(damage * damageMultiplier); + damage = (int)(damage * damageMultiplier); } - // Reduce damage from vanilla traps - // 350 in normal, 450 in expert - if (proj.type == ProjectileID.Explosives) - damage = (int)((double)damage * (Main.expertMode ? 0.225 : 0.35)); - if (Main.expertMode) - { - // 140 in normal, 182 in expert - if (proj.type == ProjectileID.Boulder) - damage = (int)((double)damage * 0.65); - } + // Reduce damage from vanilla traps + // 350 in normal, 450 in expert + if (proj.type == ProjectileID.Explosives) + damage = (int)((double)damage * (Main.expertMode ? 0.225 : 0.35)); + if (Main.expertMode) + { + // 140 in normal, 182 in expert + if (proj.type == ProjectileID.Boulder) + damage = (int)((double)damage * 0.65); + } - if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0) + if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0) { if (CalamityWorld.revenge && CalamityMod.CalamityConfig.AdrenalineAndRage && !CalamityMod.trapProjectileList.Contains(proj.type)) { @@ -5637,7 +5681,7 @@ namespace CalamityMod.CalPlayer { if (!Main.npc[proj.owner].friendly) Main.npc[proj.owner].AddBuff(BuffID.Poisoned, 120); - } + } else { Player p = Main.player[proj.owner]; @@ -5645,18 +5689,18 @@ namespace CalamityMod.CalPlayer p.AddBuff(BuffID.Poisoned, 120); } } - + if (CalamityWorld.revenge && proj.hostile) { - if (proj.type == ProjectileID.Explosives) - { - player.AddBuff(BuffID.OnFire, 600); - } - else if (proj.type == ProjectileID.Boulder) - { - player.AddBuff(BuffID.BrokenArmor, 600); - } - else if (proj.type == ProjectileID.FrostBeam && !player.frozen && !gState) + if (proj.type == ProjectileID.Explosives) + { + player.AddBuff(BuffID.OnFire, 600); + } + else if (proj.type == ProjectileID.Boulder) + { + player.AddBuff(BuffID.BrokenArmor, 600); + } + else if (proj.type == ProjectileID.FrostBeam && !player.frozen && !gState) { player.AddBuff(ModContent.BuffType(), 120); } @@ -5681,7 +5725,7 @@ namespace CalamityMod.CalPlayer else if (proj.type == ProjectileID.CultistBossLightningOrbArc) { player.AddBuff(BuffID.Electrified, (proj.Calamity().lineColor == 1 ? 60 : 120)); - //1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning + //1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning } } if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20)) @@ -5752,12 +5796,12 @@ namespace CalamityMod.CalPlayer #region Fishing public override void CatchFish(Item fishingRod, Item bait, int power, int liquidType, int poolSize, int worldLayer, int questFish, ref int caughtType, ref bool junk) { - CalamityPlayerFishing.CalamityCatchFish(player, ref fishingRod, ref bait, ref power, ref liquidType, ref poolSize, ref worldLayer, ref questFish, ref caughtType, ref junk); + CalamityPlayerFishing.CalamityCatchFish(player, ref fishingRod, ref bait, ref power, ref liquidType, ref poolSize, ref worldLayer, ref questFish, ref caughtType, ref junk); } public override void GetFishingLevel(Item fishingRod, Item bait, ref int fishingLevel) { - CalamityPlayerFishing.CalamityGetFishingLevel(player, ref fishingRod, ref bait, ref fishingLevel); + CalamityPlayerFishing.CalamityGetFishingLevel(player, ref fishingRod, ref bait, ref fishingLevel); } #endregion @@ -5835,9 +5879,38 @@ namespace CalamityMod.CalPlayer #endregion #region Frame Effects + public override void FrameEffects() { - if ((snowmanPower || snowmanForce) && !snowmanHide) + bool psc = false; + if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide) + { + psc = true; + player.legs = mod.GetEquipSlot("ProviLegs", EquipType.Legs); + player.body = mod.GetEquipSlot("ProviBody", EquipType.Body); + player.head = mod.GetEquipSlot("ProviHead", EquipType.Head); + player.wings = mod.GetEquipSlot("ProviWings", EquipType.Wings); + + bool enrage = !profanedCrystalForce && profanedCrystalBuffs && player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + + if (profanedCrystalWingCounter.Value == 0) + { + int key = profanedCrystalWingCounter.Key; + profanedCrystalWingCounter = new KeyValuePair(key == 3 ? 0 : key + 1, enrage ? 5 : 7); + } + + player.wingFrame = profanedCrystalWingCounter.Key; + profanedCrystalWingCounter = new KeyValuePair(profanedCrystalWingCounter.Key, profanedCrystalWingCounter.Value - 1); + if (profanedCrystalBuffs) + { + player.armorEffectDrawShadow = true; + if (enrage) + { + player.armorEffectDrawOutlinesForbidden = true; + } + } + } + else if ((snowmanPower || snowmanForce) && !snowmanHide) { player.legs = mod.GetEquipSlot("PopoLeg", EquipType.Legs); player.body = mod.GetEquipSlot("PopoBody", EquipType.Body); @@ -5861,6 +5934,13 @@ namespace CalamityMod.CalPlayer player.body = mod.GetEquipSlot("SirenBodyAlt", EquipType.Body); player.head = mod.GetEquipSlot("SirenHeadAlt", EquipType.Head); } + else if (!psc) + { + if (profanedCrystalWingCounter.Key != 1) + profanedCrystalWingCounter = new KeyValuePair(1, 7); + if (profanedCrystalAnimCounter.Key != 0) + profanedCrystalAnimCounter = new KeyValuePair(0, 10); + } if (CalamityWorld.defiled) Defiled(); @@ -5913,18 +5993,18 @@ namespace CalamityMod.CalPlayer NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - if (CalamityWorld.DoGSecondStageCountdown > 0) - { - CalamityWorld.DoGSecondStageCountdown = 0; - if (Main.netMode == NetmodeID.Server) - { - var netMessage = mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); - netMessage.Write(CalamityWorld.DoGSecondStageCountdown); - netMessage.Send(); - } - } - KillPlayer(); + if (CalamityWorld.DoGSecondStageCountdown > 0) + { + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == NetmodeID.Server) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } + } + KillPlayer(); } } @@ -5936,22 +6016,33 @@ namespace CalamityMod.CalPlayer { return false; } + if (hurtSoundTimer == 0) //hurtsounds + { + if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide) + { + playSound = false; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ProvidenceHurt"), (int)player.position.X, (int)player.position.Y); + hurtSoundTimer = 20; + } + else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide) + { + playSound = false; + Main.PlaySound(3, (int)player.position.X, (int)player.position.Y, 4, 1f, 0f); //metal hit noise + hurtSoundTimer = 10; + } + else if (((sirenBoobsPower || sirenBoobsForce) && !sirenBoobsHide) || ((sirenBoobsAltPower || sirenBoobsAltForce) && !sirenBoobsAltHide)) + { + playSound = false; + Main.PlaySound(20, (int)player.position.X, (int)player.position.Y, 1, 1f, 0f); //female hit noise + hurtSoundTimer = 10; + } + } - if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide) - { - playSound = false; - Main.PlaySound(3, (int)player.position.X, (int)player.position.Y, 4, 1f, 0f); //metal hit noise - } - else if (((sirenBoobsPower || sirenBoobsForce) && !sirenBoobsHide) || ((sirenBoobsAltPower || sirenBoobsAltForce) && !sirenBoobsAltHide)) - { - playSound = false; - Main.PlaySound(20, (int)player.position.X, (int)player.position.Y, 1, 1f, 0f); //female hit noise - } #region MultiplierBoosts double damageMult = 1.0 + (dArtifact ? 0.25 : 0.0) + - (DoGLore ? 0.1 : 0.0) + + (DoGLore ? 0.1 : 0.0) + ((player.beetleDefense && player.beetleOrbs > 0) ? (0.05 * (double)player.beetleOrbs) : 0.0) + (enraged ? 0.25 : 0.0) + ((CalamityWorld.defiled && Main.rand.NextBool(4)) ? 0.5 : 0.0) + @@ -5959,6 +6050,8 @@ namespace CalamityMod.CalPlayer if (CalamityWorld.revenge) { + if (player.chaosState) + damageMult += 0.25; if (player.ichor) damageMult += 0.25; else if (player.onFire2) @@ -6010,21 +6103,21 @@ namespace CalamityMod.CalPlayer if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0) { damage = (int)((double)damage * 0.5); - theBeeCooldown = 600; + theBeeCooldown = 600; } if (CalamityWorld.revenge) { if (!CalamityWorld.downedBossAny) damage = (int)((double)damage * 0.8); - if (CalamityMod.CalamityConfig.AdrenalineAndRage) - { - if (adrenaline == adrenalineMax && !adrenalineMode) - damage = (int)((double)damage * 0.5); - } + if (CalamityMod.CalamityConfig.AdrenalineAndRage) + { + if (adrenaline == adrenalineMax && !adrenalineMode) + damage = (int)((double)damage * 0.5); + } } if (player.mount.Active && (player.mount.Type == ModContent.MountType() || player.mount.Type == ModContent.MountType()) - && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f) + && Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f) { damage = (int)((double)damage * 0.9); } @@ -6066,11 +6159,11 @@ namespace CalamityMod.CalPlayer modStealth = 1f; if (player.whoAmI == Main.myPlayer) { - if (CalamityMod.CalamityConfig.AdrenalineAndRage && CalamityWorld.revenge) - { - if (!adrenalineMode) - adrenaline = 0; - } + if (CalamityMod.CalamityConfig.AdrenalineAndRage && CalamityWorld.revenge) + { + if (!adrenalineMode) + adrenaline = 0; + } if (amidiasBlessing) { player.ClearBuff(ModContent.BuffType()); @@ -6262,12 +6355,12 @@ namespace CalamityMod.CalPlayer #region Post Hurt public override void PostHurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit) { - if (pArtifact) + if (!profanedCrystal && pArtifact) { player.AddBuff(ModContent.BuffType(), 300, true); } bool hardMode = Main.hardMode; - int iFramesToAdd = 0; + int iFramesToAdd = 0; if (player.whoAmI == Main.myPlayer) { if (cTracers && damage > 200) @@ -6374,7 +6467,7 @@ namespace CalamityMod.CalPlayer Main.projectile[star].ranged = false; } - /*int num = 1; + /*int num = 1; if (Main.rand.NextBool(3)) ++num; if (Main.rand.NextBool(3)) @@ -6388,8 +6481,8 @@ namespace CalamityMod.CalPlayer Main.projectile[bee].localNPCHitCooldown = 5; }*/ } - if (theBee) - { + if (theBee) + { for (int n = 0; n < 3; n++) { float x = player.position.X + (float)Main.rand.Next(-400, 400); @@ -6408,20 +6501,20 @@ namespace CalamityMod.CalPlayer Main.projectile[star].localNPCHitCooldown = 5; Main.projectile[star].ranged = false; } - int num = 1; - if (Main.rand.NextBool(3)) - ++num; - if (Main.rand.NextBool(3)) - ++num; - if (player.strongBees && Main.rand.NextBool(3)) - ++num; - for (int index = 0; index < num; ++index) - { - int bee = Projectile.NewProjectile(player.position.X, player.position.Y, (float) Main.rand.Next(-35, 36) * 0.02f, (float) Main.rand.Next(-35, 36) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType() : player.beeType()), player.beeDamage(7), player.beeKB(0f), Main.myPlayer, 0f, 0f); + int num = 1; + if (Main.rand.NextBool(3)) + ++num; + if (Main.rand.NextBool(3)) + ++num; + if (player.strongBees && Main.rand.NextBool(3)) + ++num; + for (int index = 0; index < num; ++index) + { + int bee = Projectile.NewProjectile(player.position.X, player.position.Y, (float) Main.rand.Next(-35, 36) * 0.02f, (float) Main.rand.Next(-35, 36) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType() : player.beeType()), player.beeDamage(7), player.beeKB(0f), Main.myPlayer, 0f, 0f); Main.projectile[bee].usesLocalNPCImmunity = true; Main.projectile[bee].localNPCHitCooldown = 5; - } - } + } + } } if (fCarapace) { @@ -6492,7 +6585,7 @@ namespace CalamityMod.CalPlayer { if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1 && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - for (int i = 0; i< 360; i += 3) + for (int i = 0; i < 360; i += 3) { Vector2 BCDSpeed = new Vector2(5f, 5f).RotatedBy(MathHelper.ToRadians(i)); Dust.NewDust(player.Center, 1, 1, 244, BCDSpeed.X, BCDSpeed.Y, 0, default, 1.1f); @@ -6640,24 +6733,24 @@ namespace CalamityMod.CalPlayer } } } - if (lastProjectileHit != null) - { - switch (lastProjectileHit.modProjectile.cooldownSlot) - { - case 0: - case 1: - player.hurtCooldowns[lastProjectileHit.modProjectile.cooldownSlot] += iFramesToAdd; - break; - case -1: - default: - player.immuneTime += iFramesToAdd; - break; - } - } - else - { - player.immuneTime += iFramesToAdd; - } + if (lastProjectileHit != null) + { + switch (lastProjectileHit.modProjectile.cooldownSlot) + { + case 0: + case 1: + player.hurtCooldowns[lastProjectileHit.modProjectile.cooldownSlot] += iFramesToAdd; + break; + case -1: + default: + player.immuneTime += iFramesToAdd; + break; + } + } + else + { + player.immuneTime += iFramesToAdd; + } } #endregion @@ -6665,7 +6758,7 @@ namespace CalamityMod.CalPlayer public void KillPlayer() { deathCount++; - if (player.whoAmI == Main.myPlayer && Main.netMode == NetmodeID.MultiplayerClient) + if (player.whoAmI == Main.myPlayer && Main.netMode == NetmodeID.MultiplayerClient) { DeathPacket(false); } @@ -6777,11 +6870,11 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(player.name + " was defeated."); } - else if (CalamityWorld.death && deathModeBlizzardTime > 1980) - { - deathModeBlizzardTime = 0; - damageSource = PlayerDeathReason.ByCustomReason(player.name + " was chilled to the bone by the frigid environment."); - } + else if (CalamityWorld.death && deathModeBlizzardTime > 1980) + { + deathModeBlizzardTime = 0; + damageSource = PlayerDeathReason.ByCustomReason(player.name + " was chilled to the bone by the frigid environment."); + } else if (SCalLore) { damageSource = PlayerDeathReason.ByCustomReason(player.Male ? player.name + " was consumed by his inner hatred." : player.name + " was consumed by her inner hatred."); @@ -6794,31 +6887,32 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(player.name + " was destroyed by a mysterious force."); } - NetworkText deathText = damageSource.GetDeathText(player.name); - if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer) - { - NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1); - } - if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1); - } - else if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(deathText.ToString(), 225, 25, 25, false); - } - if (player.whoAmI == Main.myPlayer && player.difficulty == 0) - { - player.DropCoins(); - } - player.DropTombstone(coinsOwned, deathText, 0); + NetworkText deathText = damageSource.GetDeathText(player.name); + if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer) + { + NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1); + } + if (Main.netMode == NetmodeID.Server) + { + NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1); + } + else if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(deathText.ToString(), 225, 25, 25, false); + } + if (player.whoAmI == Main.myPlayer && player.difficulty == 0) + { + player.DropCoins(); + } + player.DropTombstone(coinsOwned, deathText, 0); if (player.whoAmI == Main.myPlayer) { try { WorldGen.saveToonWhilePlaying(); - } catch + } + catch { } } @@ -7192,10 +7286,10 @@ namespace CalamityMod.CalPlayer } else if (dashMod > 0 && !player.mount.Active) { - float dashDistance; + float dashDistance; if (dashMod == 1) //Counter Scarf { - dashDistance = 14.5f; + dashDistance = 14.5f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7257,7 +7351,7 @@ namespace CalamityMod.CalPlayer } else if (dashMod == 2) //Asgard's Valor { - dashDistance = 16.9f; + dashDistance = 16.9f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7320,7 +7414,7 @@ namespace CalamityMod.CalPlayer } else if (dashMod == 3) //Elysian Aegis { - dashDistance = 21.9f; + dashDistance = 21.9f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7383,7 +7477,7 @@ namespace CalamityMod.CalPlayer } else if (dashMod == 4) //Asgardian Aegis { - dashDistance = 23.9f; + dashDistance = 23.9f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7446,7 +7540,7 @@ namespace CalamityMod.CalPlayer } else if (dashMod == 5) //Deep Diver { - dashDistance = 25.9f; + dashDistance = 25.9f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7509,7 +7603,7 @@ namespace CalamityMod.CalPlayer } else if (dashMod == 6) //Cryogen Lore { - dashDistance = 15.7f; + dashDistance = 15.7f; int direction = 0; bool justDashed = false; if (dashTimeMod > 0) @@ -7804,6 +7898,7 @@ namespace CalamityMod.CalPlayer #endregion #region Drawing + public static readonly PlayerLayer MiscEffectsBack = new PlayerLayer("CalamityMod", "MiscEffectsBack", PlayerLayer.MiscEffectsBack, delegate (PlayerDrawInfo drawInfo) { if (drawInfo.shadow != 0f) @@ -7861,136 +7956,136 @@ namespace CalamityMod.CalPlayer else effect = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically; } - if ((drawPlayer.itemAnimation > 0 && item.useStyle != 0) || (item.holdStyle > 0 && !drawPlayer.pulley)) - { - // Staff - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - { - Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow"); - if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/VesuviusGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/FatesRevealGlow"); + if ((drawPlayer.itemAnimation > 0 && item.useStyle != 0) || (item.holdStyle > 0 && !drawPlayer.pulley)) + { + // Staff + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow"); + if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/VesuviusGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/FatesRevealGlow"); - float num104 = drawPlayer.itemRotation + 0.785f * (float)drawPlayer.direction; - int num105 = 0; - Vector2 zero3 = new Vector2(0f, (float)Main.itemTexture[item.type].Height); + float num104 = drawPlayer.itemRotation + 0.785f * (float)drawPlayer.direction; + int num105 = 0; + Vector2 zero3 = new Vector2(0f, (float)Main.itemTexture[item.type].Height); - if (drawPlayer.gravDir == -1f) - { - if (drawPlayer.direction == -1) - { - num104 += 1.57f; - zero3 = new Vector2((float)Main.itemTexture[item.type].Width, 0f); - num105 -= Main.itemTexture[item.type].Width; - } - else - { - num104 -= 1.57f; - zero3 = Vector2.Zero; - } - } - else if (drawPlayer.direction == -1) - { - zero3 = new Vector2((float)Main.itemTexture[item.type].Width, (float)Main.itemTexture[item.type].Height); - num105 -= Main.itemTexture[item.type].Width; - } + if (drawPlayer.gravDir == -1f) + { + if (drawPlayer.direction == -1) + { + num104 += 1.57f; + zero3 = new Vector2((float)Main.itemTexture[item.type].Width, 0f); + num105 -= Main.itemTexture[item.type].Width; + } + else + { + num104 -= 1.57f; + zero3 = Vector2.Zero; + } + } + else if (drawPlayer.direction == -1) + { + zero3 = new Vector2((float)Main.itemTexture[item.type].Width, (float)Main.itemTexture[item.type].Height); + num105 -= Main.itemTexture[item.type].Width; + } - DrawData data = new DrawData(texture, - new Vector2((float)(int)(vector.X - Main.screenPosition.X + zero3.X + (float)num105), (float)(int)(vector.Y - Main.screenPosition.Y + 0f)), - new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), - Color.White, - num104, - zero3, - item.scale, - effect, - 0); + DrawData data = new DrawData(texture, + new Vector2((float)(int)(vector.X - Main.screenPosition.X + zero3.X + (float)num105), (float)(int)(vector.Y - Main.screenPosition.Y + 0f)), + new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), + Color.White, + num104, + zero3, + item.scale, + effect, + 0); - Main.playerDrawData.Add(data); - } + Main.playerDrawData.Add(data); + } - // Bow and Book - else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || - item.type == ModContent.ItemType()) - { - Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/DeathwindGlow"); - int offsetX = 10; - if (item.type == ModContent.ItemType()) - { - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/ApotheosisGlow"); - offsetX = 6; - } - else if (item.type == ModContent.ItemType()) - { - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow"); - offsetX = 37; - } - else if (item.type == ModContent.ItemType()) - { - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SubsumingVortexGlow"); - offsetX = 9; - } + // Bow and Book + else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || + item.type == ModContent.ItemType()) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/DeathwindGlow"); + int offsetX = 10; + if (item.type == ModContent.ItemType()) + { + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/ApotheosisGlow"); + offsetX = 6; + } + else if (item.type == ModContent.ItemType()) + { + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow"); + offsetX = 37; + } + else if (item.type == ModContent.ItemType()) + { + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SubsumingVortexGlow"); + offsetX = 9; + } - Vector2 vector13 = new Vector2((float)(Main.itemTexture[item.type].Width / 2), (float)(Main.itemTexture[item.type].Height / 2)); - Vector2 vector14 = vector13; - int num107 = (int)vector14.X - offsetX; - vector13.Y = vector14.Y; + Vector2 vector13 = new Vector2((float)(Main.itemTexture[item.type].Width / 2), (float)(Main.itemTexture[item.type].Height / 2)); + Vector2 vector14 = vector13; + int num107 = (int)vector14.X - offsetX; + vector13.Y = vector14.Y; - Vector2 origin4 = new Vector2(-(float)num107, (float)(Main.itemTexture[item.type].Height / 2)); - if (drawPlayer.direction == -1) - origin4 = new Vector2((float)(Main.itemTexture[item.type].Width + num107), (float)(Main.itemTexture[item.type].Height / 2)); + Vector2 origin4 = new Vector2(-(float)num107, (float)(Main.itemTexture[item.type].Height / 2)); + if (drawPlayer.direction == -1) + origin4 = new Vector2((float)(Main.itemTexture[item.type].Width + num107), (float)(Main.itemTexture[item.type].Height / 2)); - DrawData data = new DrawData(texture, - new Vector2((float)(int)(vector.X - Main.screenPosition.X + vector13.X), (float)(int)(vector.Y - Main.screenPosition.Y + vector13.Y)), - new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), - Color.White, - drawPlayer.itemRotation, - origin4, - item.scale, - effect, - 0); + DrawData data = new DrawData(texture, + new Vector2((float)(int)(vector.X - Main.screenPosition.X + vector13.X), (float)(int)(vector.Y - Main.screenPosition.Y + vector13.Y)), + new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), + Color.White, + drawPlayer.itemRotation, + origin4, + item.scale, + effect, + 0); - Main.playerDrawData.Add(data); - } + Main.playerDrawData.Add(data); + } - // Sword - else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || - item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - { - Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ExcelsusGlow"); - if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/EssenceFlayerGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ElementalExcaliburGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow"); - else if (item.type == ModContent.ItemType()) - texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow"); + // Sword + else if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || + item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ExcelsusGlow"); + if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/EssenceFlayerGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ElementalExcaliburGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow"); + else if (item.type == ModContent.ItemType()) + texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow"); - float yOffset = drawPlayer.gravDir == -1f ? 0f : (float)Main.itemTexture[item.type].Height; + float yOffset = drawPlayer.gravDir == -1f ? 0f : (float)Main.itemTexture[item.type].Height; - DrawData data = new DrawData(texture, - new Vector2((float)(int)(vector.X - Main.screenPosition.X), (float)(int)(vector.Y - Main.screenPosition.Y)), - new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), - Color.White, - drawPlayer.itemRotation, - new Vector2((float)Main.itemTexture[item.type].Width * 0.5f - (float)Main.itemTexture[item.type].Width * 0.5f * (float)drawPlayer.direction, yOffset) + Vector2.Zero, - item.scale, - effect, - 0); + DrawData data = new DrawData(texture, + new Vector2((float)(int)(vector.X - Main.screenPosition.X), (float)(int)(vector.Y - Main.screenPosition.Y)), + new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, Main.itemTexture[item.type].Width, Main.itemTexture[item.type].Height)), + Color.White, + drawPlayer.itemRotation, + new Vector2((float)Main.itemTexture[item.type].Width * 0.5f - (float)Main.itemTexture[item.type].Width * 0.5f * (float)drawPlayer.direction, yOffset) + Vector2.Zero, + item.scale, + effect, + 0); - Main.playerDrawData.Add(data); - } - } + Main.playerDrawData.Add(data); + } + } } }); - public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo) - { + public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo) + { if (drawInfo.shadow != 0f) return; @@ -8003,55 +8098,55 @@ namespace CalamityMod.CalPlayer !item.noUseGraphic && (!drawPlayer.wet || !item.noWet)) { - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - { - Color color89 = drawInfo.middleArmorColor = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)(drawPlayer.position.X + drawPlayer.width * 0.5) / 16, (int)(drawPlayer.position.Y + drawPlayer.height * 0.5) / 16, Color.White), drawInfo.shadow); - SpriteEffects spriteEffects = player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + { + Color color89 = drawInfo.middleArmorColor = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)(drawPlayer.position.X + drawPlayer.width * 0.5) / 16, (int)(drawPlayer.position.Y + drawPlayer.height * 0.5) / 16, Color.White), drawInfo.shadow); + SpriteEffects spriteEffects = player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_FlurrystormCannon"); - if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BlightSpewer"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HavocsBreath"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_SparkSpreader"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HalleysInferno"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_CleansingBlaze"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_ElementalEruption"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TheEmpyrean"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Meowthrower"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_OverloadedBlaster"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TerraFlameburster"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Photoviscerator"); - else if (item.type == ModContent.ItemType()) - thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Shadethrower"); + Texture2D thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_FlurrystormCannon"); + if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BlightSpewer"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HavocsBreath"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_SparkSpreader"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HalleysInferno"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_CleansingBlaze"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_ElementalEruption"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TheEmpyrean"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Meowthrower"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_OverloadedBlaster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TerraFlameburster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Photoviscerator"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Shadethrower"); - float num25 = -4f; - float num24 = -8f; - DrawData howDoIDrawThings = new DrawData(thingToDraw, - new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) + num25 * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num24 * drawPlayer.gravDir)), - new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height), - color89, - drawPlayer.bodyRotation, - new Vector2(thingToDraw.Width / 2, thingToDraw.Height / 2), - 1f, - spriteEffects, - 0); - howDoIDrawThings.shader = 0; - Main.playerDrawData.Add(howDoIDrawThings); - } - } - } + float num25 = -4f; + float num24 = -8f; + DrawData howDoIDrawThings = new DrawData(thingToDraw, + new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) + num25 * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num24 * drawPlayer.gravDir)), + new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height), + color89, + drawPlayer.bodyRotation, + new Vector2(thingToDraw.Width / 2, thingToDraw.Height / 2), + 1f, + spriteEffects, + 0); + howDoIDrawThings.shader = 0; + Main.playerDrawData.Add(howDoIDrawThings); + } + } + } public override void ModifyDrawLayers(List list) { @@ -8115,10 +8210,10 @@ namespace CalamityMod.CalPlayer Texture2D heart4 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart4"); Texture2D heart5 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart5"); Texture2D heart6 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart6"); - Texture2D heartOriginal = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal"); //Life fruit - Texture2D heartOriginal2 = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal2"); //Life crystal + Texture2D heartOriginal = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal"); //Life fruit + Texture2D heartOriginal2 = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal2"); //Life crystal - int totalFruit = + int totalFruit = (mFruit ? 1 : 0) + (bOrange ? 1 : 0) + (eBerry ? 1 : 0) + @@ -8127,7 +8222,7 @@ namespace CalamityMod.CalPlayer switch (totalFruit) { default: - Main.heart2Texture = heartOriginal; + Main.heart2Texture = heartOriginal; break; case 4: Main.heart2Texture = heart6; @@ -8424,27 +8519,27 @@ namespace CalamityMod.CalPlayer } if (vaporfied) { - int dustType = Utils.SelectRandom(Main.rand, new int[] - { - 246, - 242, - 229, - 226, - 247, - 187, - 234 - }); + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 246, + 242, + 229, + 226, + 247, + 187, + 234 + }); if (Main.rand.NextBool(4) && drawInfo.shadow == 0f) { int dust = Dust.NewDust(drawInfo.position - new Vector2(2f, 2f), player.width + 4, player.height + 4, dustType, player.velocity.X * 0.4f, player.velocity.Y * 0.4f, 100, default, 3f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 1.8f; Main.dust[dust].velocity.Y -= 0.5f; - if (Main.rand.NextBool(4)) - { - Main.dust[dust].noGravity = false; - Main.dust[dust].scale *= 0.5f; - } + if (Main.rand.NextBool(4)) + { + Main.dust[dust].noGravity = false; + Main.dust[dust].scale *= 0.5f; + } Main.playerDrawDust.Add(dust); } if (noRogueStealth) @@ -8529,21 +8624,21 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - } - #endregion + } + #endregion - #region Nurse Modifications - public override bool ModifyNurseHeal(NPC nurse, ref int health, ref bool removeDebuffs, ref string chatText) - { - if (CalamityWorld.death && areThereAnyDamnBosses) - { - chatText = "Now is not the time!"; - return false; - } - return true; - } + #region Nurse Modifications + public override bool ModifyNurseHeal(NPC nurse, ref int health, ref bool removeDebuffs, ref string chatText) + { + if (CalamityWorld.death && areThereAnyDamnBosses) + { + chatText = "Now is not the time!"; + return false; + } + return true; + } - public override void ModifyNursePrice(NPC nurse, int health, bool removeDebuffs, ref int price) + public override void ModifyNursePrice(NPC nurse, int health, bool removeDebuffs, ref int price) { // In Rev+, nurse costs scale as the game progresses. // Base: 300 3 silver @@ -8609,7 +8704,7 @@ namespace CalamityMod.CalPlayer #region Rogue Stealth private void ResetRogueStealth() { - // rogueStealth doesn't reset every frame because it's a continuously building resource + // rogueStealth doesn't reset every frame because it's a continuously building resource // these other parameters are rebuilt every frame based on the items you have equipped rogueStealthMax = 0f; @@ -8659,6 +8754,7 @@ namespace CalamityMod.CalPlayer // If the player is using an item that deals damage and is on their first frame of doing so, // consume stealth if a stealth strike wasn't triggered manually by item code. + // This doesn't trigger stealth strike effects (ConsumeStealthStrike instead of StealthStrike) // so non-rogue weapons can't call lasers down from the sky and such. // Using any item which deals no damage or is a tool doesn't consume stealth. @@ -8718,8 +8814,8 @@ namespace CalamityMod.CalPlayer stealthGenMoving += 0.08f; } - if (etherealExtorter && Main.moonPhase == 3) // 3 = Waning Crescent - stealthGenStandstill += 0.15f; + if (etherealExtorter && Main.moonPhase == 3) // 3 = Waning Crescent + stealthGenStandstill += 0.15f; // // Other code which affects stealth generation goes here. @@ -8897,33 +8993,33 @@ namespace CalamityMod.CalPlayer packet.Send(-1, player.whoAmI); } - public void DeathModeUnderworldTimePacket(bool server) - { - ModPacket packet = mod.GetPacket(256); - packet.Write((byte)CalamityModMessageType.DeathModeUnderworldTimeSync); - packet.Write(player.whoAmI); - packet.Write(deathModeUnderworldTime); + public void DeathModeUnderworldTimePacket(bool server) + { + ModPacket packet = mod.GetPacket(256); + packet.Write((byte)CalamityModMessageType.DeathModeUnderworldTimeSync); + packet.Write(player.whoAmI); + packet.Write(deathModeUnderworldTime); - if (!server) - packet.Send(); - else - packet.Send(-1, player.whoAmI); - } + if (!server) + packet.Send(); + else + packet.Send(-1, player.whoAmI); + } - public void DeathModeBlizzardTimePacket(bool server) - { - ModPacket packet = mod.GetPacket(256); - packet.Write((byte)CalamityModMessageType.DeathModeBlizzardTimeSync); - packet.Write(player.whoAmI); - packet.Write(deathModeBlizzardTime); + public void DeathModeBlizzardTimePacket(bool server) + { + ModPacket packet = mod.GetPacket(256); + packet.Write((byte)CalamityModMessageType.DeathModeBlizzardTimeSync); + packet.Write(player.whoAmI); + packet.Write(deathModeBlizzardTime); - if (!server) - packet.Send(); - else - packet.Send(-1, player.whoAmI); - } + if (!server) + packet.Send(); + else + packet.Send(-1, player.whoAmI); + } - internal void HandleExactLevels(BinaryReader reader, int levelType) + internal void HandleExactLevels(BinaryReader reader, int levelType) { switch (levelType) { @@ -8994,21 +9090,21 @@ namespace CalamityMod.CalPlayer DeathPacket(true); } - internal void HandleDeathModeUnderworldTime(BinaryReader reader) - { - deathModeUnderworldTime = reader.ReadInt32(); - if (Main.netMode == NetmodeID.Server) - DeathModeUnderworldTimePacket(true); - } + internal void HandleDeathModeUnderworldTime(BinaryReader reader) + { + deathModeUnderworldTime = reader.ReadInt32(); + if (Main.netMode == NetmodeID.Server) + DeathModeUnderworldTimePacket(true); + } - internal void HandleDeathModeBlizzardTime(BinaryReader reader) - { - deathModeBlizzardTime = reader.ReadInt32(); - if (Main.netMode == NetmodeID.Server) - DeathModeBlizzardTimePacket(true); - } + internal void HandleDeathModeBlizzardTime(BinaryReader reader) + { + deathModeBlizzardTime = reader.ReadInt32(); + if (Main.netMode == NetmodeID.Server) + DeathModeBlizzardTimePacket(true); + } - public override void OnEnterWorld(Player player) + public override void OnEnterWorld(Player player) { if (Main.netMode == NetmodeID.MultiplayerClient) { @@ -9025,9 +9121,9 @@ namespace CalamityMod.CalPlayer StressPacket(false); AdrenalinePacket(false); DeathPacket(false); - DeathModeUnderworldTimePacket(false); - DeathModeBlizzardTimePacket(false); - } + DeathModeUnderworldTimePacket(false); + DeathModeBlizzardTimePacket(false); + } } #endregion @@ -9319,14 +9415,14 @@ namespace CalamityMod.CalPlayer if (final) { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), - 0, 0f, Main.myPlayer, 0f, 1f); - Main.projectile[prof].ranged = false; + 0, 0f, Main.myPlayer, 0f, 1f); + Main.projectile[prof].ranged = false; } else { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } Main.NewText(Language.GetTextValue(key), messageColor); } @@ -9345,13 +9441,13 @@ namespace CalamityMod.CalPlayer { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 1f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } else { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } Main.NewText(Language.GetTextValue(key), messageColor); } @@ -9370,13 +9466,13 @@ namespace CalamityMod.CalPlayer { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 1f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } else { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } Main.NewText(Language.GetTextValue(key), messageColor); } @@ -9395,13 +9491,13 @@ namespace CalamityMod.CalPlayer { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 1f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } else { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } Main.NewText(Language.GetTextValue(key), messageColor); } @@ -9420,13 +9516,13 @@ namespace CalamityMod.CalPlayer { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 1f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } else { int prof = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[prof].ranged = false; + Main.projectile[prof].ranged = false; } Main.NewText(Language.GetTextValue(key), messageColor); } @@ -9906,6 +10002,98 @@ namespace CalamityMod.CalPlayer } #endregion + #region Profaned Soul Crystal Stuffs + + internal void rollBabSpears(int randAmt) + { + if (player.whoAmI == Main.myPlayer && randAmt > 0 && !endoCooper && !magicHat && Main.rand.NextBool(randAmt)) //disallow other dev summons due to damage being bonkers + { + int spearsFired = 0; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (spearsFired == 2) + break; + if (Main.projectile[i].friendly && Main.projectile[i].owner == player.whoAmI) + { + bool attack = Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI; + if (attack || (Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI)) + { + int numSpears = attack ? 12 : 6; + int dam = Main.projectile[i].damage; + if (!attack) + dam = (int)((float)dam * 0.5f); + float angleVariance = MathHelper.TwoPi / (float)numSpears; + float spinOffsetAngle = MathHelper.Pi / (2f * numSpears); + Vector2 posVec = new Vector2(8f, 0f).RotatedByRandom(MathHelper.TwoPi); + for (int x = 0; x < numSpears; x++) + { + posVec = posVec.RotatedBy(angleVariance); + Vector2 velocity = new Vector2(posVec.X, posVec.Y).RotatedBy(spinOffsetAngle); + velocity.Normalize(); + velocity *= 8f; + Projectile.NewProjectile(Main.projectile[i].Center + posVec, velocity, ModContent.ProjectileType(), dam, 0f, player.whoAmI, 0f, 0f); + } + spearsFired++; + } + } + } + } + } + + private bool IsValidTransitionFrame(AnimationType currentAnim, AnimationType newAnim, int frame, int counter) //this exists so it doesn't loop through the entire walk/idle anim just to find one frame for switching. + { + bool result = newAnim != AnimationType.Jump && currentAnim != AnimationType.Jump; + if (currentAnim == AnimationType.Walk && newAnim == AnimationType.Idle) + { + result = counter <= 0 && (frame == 11 || frame == 15 || frame == 19); + } + else if (currentAnim == AnimationType.Idle && newAnim == AnimationType.Walk) + { + result = counter <= 0 && (frame == 2 || frame == 6); + } + return currentAnim != newAnim && result; //swapping to jumps should be instant, no need to check the counter here + } + + private int HandlePSCAnimationFrames(AnimationType newType) + { + int key = profanedCrystalAnimCounter.Key; //0-based indexing + int value = profanedCrystalAnimCounter.Value - 1; + AnimationType currentType = key < 8 ? AnimationType.Idle : key == 8 ? AnimationType.Jump : AnimationType.Walk; + + bool isInvalidTransFrame = !IsValidTransitionFrame(currentType, newType, key, value); //to make the transition between walk and idle frames less jarring and smoother + AnimationType type = isInvalidTransFrame ? newType : currentType; + int frameCount = type == AnimationType.Walk || (!profanedCrystalForce && player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) ? 7 : 10; + int lowerRange = type == AnimationType.Idle ? 0 : type == AnimationType.Jump ? 8 : 9; + int upperRange = type == AnimationType.Idle ? 7 : type == AnimationType.Jump ? 8 : 22; + if (value <= 0 || !isInvalidTransFrame) + { + value = frameCount; + if (key >= lowerRange && key < upperRange) + key++; + else + key = lowerRange; + } + profanedCrystalAnimCounter = new KeyValuePair(key, value); + return profanedCrystalAnimCounter.Key; + } + + public override void PostUpdate() //needs to be here else it doesn't work properly, otherwise i'd have stuck it with the wing anim stuffs + { + if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide && player.legs == mod.GetEquipSlot("ProviLegs", EquipType.Legs)) + { + bool usingCarpet = player.carpetTime > 0 && player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground + AnimationType animType = AnimationType.Walk; + if ((player.sliding || (player.velocity.Y != 0 || player.controlJump) || player.mount.Active || player.grappling[0] != -1 || player.GoingDownWithGrapple) && !usingCarpet) + animType = AnimationType.Jump; + else if (player.velocity.X == 0 || usingCarpet) + animType = AnimationType.Idle; + int frame = HandlePSCAnimationFrames(animType); + player.legFrame.Y = player.legFrame.Height * frame; + } + } + + #endregion + #region Misc Stuff /// @@ -9928,6 +10116,7 @@ namespace CalamityMod.CalPlayer return range; } + /// /// Calculates and returns the player's total light strength. This is used for Abyss darkness, among other things.
/// The Stat Meter also reports this stat. @@ -9937,7 +10126,7 @@ namespace CalamityMod.CalPlayer { int light = externalAbyssLight; bool underwater = player.IsUnderwater(); - bool miningHelmet = player.head == ArmorIDs.Head.MiningHelmet; + bool miningHelmet = player.head == ArmorIDs.Head.MiningHelmet; // The campfire bonus does not apply while in the Abyss. if (!ZoneAbyss && (player.HasBuff(BuffID.Campfire) || Main.campfire)) @@ -9990,8 +10179,11 @@ namespace CalamityMod.CalPlayer light += 3; if (player.suspiciouslookingTentacle) light += 3; + if (profanedCrystalBuffs && !ZoneAbyss) + light += Main.dayTime || player.lavaWet ? 2 : 1; return light; } + #endregion } } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index ccb5b59263..33ce2b9be2 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -128,7 +128,7 @@ namespace CalamityMod.CalPlayer player.lifeRegen = 0; player.lifeRegenTime = 0; - lifeRegenLost += 30; + lifeRegenLost += modPlayer.profanedCrystalBuffs ? 35 : 30; } if (modPlayer.astralInfection) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 27b046991c..8dde11d236 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -36,10 +36,10 @@ using Terraria.ModLoader; namespace CalamityMod.CalPlayer { public class CalamityPlayerMiscEffects - { - #region Post Update Misc Effects - public static void CalamityPostUpdateMiscEffects(Player player, Mod mod) - { + { + #region Post Update Misc Effects + public static void CalamityPostUpdateMiscEffects(Player player, Mod mod) + { CalamityPlayer modPlayer = player.Calamity(); // No category @@ -398,10 +398,10 @@ namespace CalamityMod.CalPlayer player.breath--; } } - + //extra DoT in the lava of the crags - if (modPlayer.ZoneCalamity && player.lavaWet) - { + if (modPlayer.ZoneCalamity && player.lavaWet) + { player.AddBuff(ModContent.BuffType(), 2, false); } @@ -474,7 +474,7 @@ namespace CalamityMod.CalPlayer bool hasMoltenSet = player.head == ArmorIDs.Head.MoltenHelmet && player.body == ArmorIDs.Body.MoltenBreastplate && player.legs == ArmorIDs.Legs.MoltenGreaves; bool immunityToHotAndCold = hasMoltenSet || player.magmaStone || player.frostArmor || modPlayer.fBulwark || modPlayer.fBarrier || - modPlayer.frostFlare || modPlayer.rampartOfDeities || modPlayer.cryogenSoul || modPlayer.snowman || modPlayer.blazingCore || modPlayer.permafrostsConcoction; + modPlayer.frostFlare || modPlayer.rampartOfDeities || modPlayer.cryogenSoul || modPlayer.snowman || modPlayer.blazingCore || modPlayer.permafrostsConcoction || modPlayer.profanedCrystalBuffs; bool immunityToCold = player.HasBuff(BuffID.Campfire) || Main.campfire || player.resistCold || modPlayer.eskimoSet || player.buffImmune[BuffID.Frozen] || player.HasBuff(BuffID.Inferno) || immunityToHotAndCold || modPlayer.externalColdImmunity; @@ -783,23 +783,27 @@ namespace CalamityMod.CalPlayer player.allDamage += damageUp; modPlayer.AllCritBoost(critUp); } - + bool canProvideBuffs = player.Calamity().profanedCrystalBuffs || (!modPlayer.profanedCrystal && modPlayer.pArtifact) || (player.Calamity().profanedCrystal && CalamityWorld.downedSCal); + bool attack = player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; // Guardian bonuses if not burnt out - if (!modPlayer.bOut) + if (!modPlayer.bOut && canProvideBuffs) { - if (modPlayer.gHealer) + bool healer = player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; + bool defend = player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; + if (healer) { if (modPlayer.healCounter > 0) modPlayer.healCounter--; if (modPlayer.healCounter <= 0) { - modPlayer.healCounter = 300; + bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + modPlayer.healCounter = (!enrage && player.Calamity().profanedCrystalBuffs) ? 360 : 300; if (player.whoAmI == Main.myPlayer) { int healAmount = 5 + - (modPlayer.gDefense ? 5 : 0) + - (modPlayer.gOffense ? 5 : 0); + (defend ? 5 : 0) + + (attack ? 5 : 0); player.statLife += healAmount; player.HealEffect(healAmount); @@ -807,23 +811,23 @@ namespace CalamityMod.CalPlayer } } - if (modPlayer.gDefense) + if (defend) { player.moveSpeed += 0.1f + - (modPlayer.gOffense ? 0.1f : 0f); + (attack ? 0.1f : 0f); player.endurance += 0.025f + - (modPlayer.gOffense ? 0.025f : 0f); + (attack ? 0.025f : 0f); } - if (modPlayer.gOffense) + if (attack) { player.minionDamage += 0.1f + - (modPlayer.gDefense ? 0.05f : 0f); + (defend ? 0.05f : 0f); } } // You always get the max minions, even during the effect of the burnout debuff - if (modPlayer.gOffense) + if (attack && canProvideBuffs) player.maxMinions++; // Cooldowns and timers @@ -847,8 +851,8 @@ namespace CalamityMod.CalPlayer modPlayer.featherCrownCooldown--; if (modPlayer.moonCrownCooldown > 0) modPlayer.moonCrownCooldown--; - if (modPlayer.nanoFlareCooldown > 0) - modPlayer.nanoFlareCooldown--; + if (modPlayer.nanoFlareCooldown > 0) + modPlayer.nanoFlareCooldown--; if (modPlayer.spectralVeilImmunity > 0) modPlayer.spectralVeilImmunity--; if (modPlayer.plaguedFuelPackCooldown > 0) @@ -879,6 +883,8 @@ namespace CalamityMod.CalPlayer modPlayer.gaelRageCooldown--; if (modPlayer.projRefRareLifeRegenCounter > 0) modPlayer.projRefRareLifeRegenCounter--; + if (modPlayer.hurtSoundTimer > 0) + modPlayer.hurtSoundTimer--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) @@ -1654,17 +1660,17 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, ModContent.ProjectileType(), 0, 0, player.whoAmI); } } - if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again - { - for (int i = 0; i < 66; i++) - { - int d = Dust.NewDust(player.position, player.width, player.height, Main.rand.NextBool(2) ? ModContent.DustType() : ModContent.DustType(), 0, 0, 100, default, 2.6f); - Main.dust[d].noGravity = true; - Main.dust[d].noLight = true; - Main.dust[d].fadeIn = 1f; - Main.dust[d].velocity *= 6.6f; - } - } + if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again + { + for (int i = 0; i < 66; i++) + { + int d = Dust.NewDust(player.position, player.width, player.height, Main.rand.NextBool(2) ? ModContent.DustType() : ModContent.DustType(), 0, 0, 100, default, 2.6f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].velocity *= 6.6f; + } + } } } #endregion @@ -3212,35 +3218,83 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(232f * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f); } } - if (modPlayer.pArtifact) { if (player.whoAmI == Main.myPlayer) { - if (player.FindBuffIndex(ModContent.BuffType()) == -1) + if (player.FindBuffIndex(ModContent.BuffType()) == -1 && !player.Calamity().profanedCrystalBuffs) player.AddBuff(ModContent.BuffType(), 3600, true); if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0f); - float baseDamage = 100f + + float baseDamage = (modPlayer.profanedCrystal && !modPlayer.profanedCrystalBuffs) ? 0f : 100f + (CalamityWorld.downedDoG ? 100f : 0f) + - (CalamityWorld.downedYharon ? 100f : 0f); + (CalamityWorld.downedYharon ? 100f : 0f) + + (modPlayer.profanedCrystalBuffs ? 700f : 0f); - if (player.Calamity().minionSlotStat >= 10) + if (modPlayer.profanedCrystal || player.Calamity().minionSlotStat >= 10) { player.Calamity().gDefense = true; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType(), baseDamage == 0 ? 0 : (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f); } - if (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet) + if (modPlayer.profanedCrystal || (modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet)) { player.Calamity().gOffense = true; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), baseDamage == 0 ? 0 : (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f); + } + } + } + if (modPlayer.profanedCrystalBuffs && modPlayer.gOffense && modPlayer.gDefense) + { + if (player.whoAmI == Main.myPlayer) + { + player.scope = false; //this is so it doesn't mess with the balance of ranged transform attacks over the others + player.lavaImmune = true; + player.lavaMax += 420; + player.lavaRose = true; + player.fireWalk = true; + player.buffImmune[ModContent.BuffType()] = true; + player.buffImmune[BuffID.OnFire] = true; + player.buffImmune[BuffID.Burning] = true; + player.buffImmune[BuffID.Daybreak] = true; + bool offenseBuffs = (Main.dayTime && !player.wet) || player.lavaWet; + if (offenseBuffs) + { + player.minionDamage += 0.15f; + player.minionKB += 0.15f; + player.moveSpeed += 0.25f; + player.statDefense -= 15; + if (!player.Calamity().yharonLore) + player.wingTimeMax = (int)((float)player.wingTimeMax * 1.1f); + player.ignoreWater = true; + } + else + { + player.moveSpeed -= 0.15f; + player.endurance += 0.05f; + player.statDefense += 15; + player.lifeRegen += 5; + } + bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + bool notRetro = Lighting.NotRetro; + if (!modPlayer.ZoneAbyss) //No abyss memes. + Lighting.AddLight(player.Center, enrage ? 60 : offenseBuffs ? 50 : 10, enrage ? 12 : offenseBuffs ? 10 : 2, 0); + if (enrage) + { + bool special = player.name == "Amber" || player.name == "Nincity" || player.name == "IbanPlay" || player.name == "Chen"; //People who either helped create the item or test it. + for (int i = 0; i < 3; i++) + { + int num469 = Dust.NewDust(player.position, player.width, player.height, special ? 231 : 244, 0f, 0f, 100, special ? Color.DarkRed : default, 1f); + Main.dust[num469].scale = special ? 1.169f : 2f; + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= special ? 10f : 6.9f; + } } } } @@ -3272,10 +3326,10 @@ namespace CalamityMod.CalPlayer } } else if (player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) - { + { if (player.whoAmI == Main.myPlayer) { - for (int i = 0; i < 1000; i++) + for (int i = 0; i < Main.projectile.Length; i++) { if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI) { diff --git a/CalamityMod.cs b/CalamityMod.cs index 9313ac68f1..20ab91bce5 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -49,7 +49,6 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; -using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Rogue; @@ -76,22 +75,19 @@ using CalamityMod.UI; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Graphics; using System; using System.Collections.Generic; using System.IO; using System.Reflection; using Terraria; using Terraria.DataStructures; -using Terraria.GameContent.Events; -using Terraria.Graphics; using Terraria.Graphics.Effects; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Config; using Terraria.UI; -using Terraria.UI.Chat; +using CalamityMod.Projectiles.Summon; namespace CalamityMod { @@ -267,6 +263,12 @@ namespace CalamityMod AddEquipTexture(new PopoBody(), null, EquipType.Body, "PopoBody", "CalamityMod/Items/Accessories/Vanity/Popo_Body", "CalamityMod/Items/Accessories/Vanity/Popo_Arms"); AddEquipTexture(new PopoLegs(), null, EquipType.Legs, "PopoLeg", "CalamityMod/Items/Accessories/Vanity/Popo_Legs"); + AddEquipTexture(new ProfanedCrystalHead(), null, EquipType.Head, "ProviHead", "CalamityMod/Items/Accessories/ProfanedSoulTransHead"); + AddEquipTexture(new ProfanedCrystalBody(), null, EquipType.Body, "ProviBody", "CalamityMod/Items/Accessories/ProfanedSoulTransBody", "CalamityMod/Items/Accessories/ProfanedSoulTransArms"); + AddEquipTexture(new ProfanedCrystalLegs(), null, EquipType.Legs, "ProviLegs", "CalamityMod/Items/Accessories/ProfanedSoulTransLegs"); + AddEquipTexture(new ProfanedCrystalWings(), null, EquipType.Wings, "ProviWings", "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings"); + + AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus"); AstralCactusGlowTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow"); AstralSky = ModContent.GetTexture("CalamityMod/ExtraTextures/AstralSky"); diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 36c7e2b6c5..9634e29e26 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -32,6 +32,11 @@ namespace CalamityMod.Items.Accessories item.Calamity().customRarity = CalamityRarity.Dedicated; } + public override bool CanEquipAccessory(Player player, int slot) + { + return !player.Calamity().pArtifact; + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs new file mode 100644 index 0000000000..4546703dfe --- /dev/null +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -0,0 +1,169 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Materials; +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + //Developer item, dedicatee: Mishiro Usui/Amber Sienna + public class ProfanedSoulCrystal : ModItem + { + + /** + * Notes: Drops from providence if the only damage source during the fight is from typeless damage or the profaned soul and the owners of those babs do not have profaned crystal. + * All projectiles are in ProfanedSoulCrystalProjectiles.cs in the summon projectile directory + * The projectiles being created/fired on click happens in CalamityGlobalItem (there's a region specially for it so ctrl + f is your friend) + * the day/night buffs are in calamityplayermisceffects + * the bab projectiles are the same, just refactored ai to be more adhering to DRY principle + * bab spears being fired happens at the bottom of calplayer + * Animation of legs is postupdate, animation of wings is frameeffects. + * Projectiles transformed are ONLY affected by alldamage and summon damage bonuses, likewise the weapon's base damage/usetime is NOT taken into account. + * You enrage below below or at 50% hp. + */ + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Profaned Soul Crystal"); + Tooltip.SetDefault("Transforms you into an emissary of the profaned goddess\n" + + "Requires 10 minion slots to use in order to grant the following effects\n" + + "All non-summon weapons are converted into powerful summon variations\n" + + "Falling below 50% life will empower these attacks\n" + + "[c/f05a5a:Transforms Melee attacks into a barrage of spears]\n" + + "[c/3a83e4:Transforms Magic attacks into a powerful splitting fireball]\n" + + "[c/85e092:Transforms Ranged attacks into a flurry of fireballs and meteors]\n" + + "[c/e97451:Transforms Rogue attacks into a deadly crystalline spiral]\n" + + "Summons and empowers the profaned babs to fight alongside you\n" + + "You are no longer affected by burn out when hit\n" + + "Provides buffs depending on the time of day\n" + + "Provides heat and cold protection in Death Mode\n" + + "Thinking back, it was a boring life\n" + + "[c/FFBF49:And so we burn it all in the name of purity]"); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4)); + } + + public override void SetDefaults() + { + item.width = 40; + item.height = 40; + item.value = Item.buyPrice(5, 0, 0, 0); + item.accessory = true; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; + } + + public override bool CanEquipAccessory(Player player, int slot) + { + return !player.Calamity().pArtifact; + } + + public override void ModifyTooltips(List tooltips) + { + if (!CalamityWorld.downedSCal) + { + int index = 0; + foreach (TooltipLine line in tooltips) + { + if (line.mod == "Terraria" && line.Name.StartsWith("Tooltip")) + { + if (line.Name == "Tooltip0") + { + index = tooltips.IndexOf(line); + } + else + { + line.text = ""; + } + } + + } + + tooltips.Insert(index+1, new TooltipLine(CalamityMod.instance, "Tooltip1", "[c/f05a5a:The soul within this crystal has been defiled by the powerful magic of a supreme witch]\nMerchants will reject a defiled soul such as this.")); + } + else if (Main.player[Main.myPlayer].Calamity().profanedCrystalBuffs) + { + int manaCost = (int)((float)100 * Main.player[Main.myPlayer].manaCost); + foreach (TooltipLine line in tooltips) + { + if (line.mod == "Terraria" && line.Name == "Tooltip5") + { + line.text = "[c/3a83e4:Transforms Magic attacks into a powerful splitting fireball for " + manaCost + " mana per cast]"; + } + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + + modPlayer.pArtifact = true; + modPlayer.profanedCrystal = true; + //modPlayer.rDevil = false; + + if (hideVisual) + modPlayer.profanedCrystalHide = true; + } + + public override void AddRecipes() + { + PSCRecipe recipe = new PSCRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 25); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 50); + recipe.AddIngredient(ModContent.ItemType()); //this is NOT consumed during crafting + recipe.AddIngredient(ModContent.ItemType(), 100); + recipe.AddIngredient(ItemID.ObsidianRose); + recipe.AddTile(ModContent.TileType()); + recipe.needLava = true; + recipe.SetResult(this); + recipe.AddRecipe(); + } + } + + public class PSCRecipe : ModRecipe + { + + public PSCRecipe(Mod mod) : base(mod) { } + + + public override int ConsumeItem(int type, int numRequired) => type == ModContent.ItemType() ? 0 : numRequired; + + public override bool RecipeAvailable() => Main.dayTime && (Main.LocalPlayer.ZoneHoly || Main.LocalPlayer.ZoneUnderworldHeight); + } + + public class ProfanedCrystalHead : EquipTexture + { + public override bool DrawHead() + { + return false; + } + } + + public class ProfanedCrystalBody : EquipTexture + { + public override bool DrawBody() + { + return false; + } + } + + public class ProfanedCrystalLegs : EquipTexture + { + public override bool DrawLegs() + { + return false; + } + } + + public class ProfanedCrystalWings : EquipTexture + { + } +} diff --git a/Items/Accessories/ProfanedSoulCrystal.png b/Items/Accessories/ProfanedSoulCrystal.png new file mode 100644 index 0000000000000000000000000000000000000000..d23b652b79cc380030ce5525e4681abda12e4061 GIT binary patch literal 2046 zcmVPx+xJg7oRCt{2oLOuY*BQru6EI$agE8xMo!CI3VoQQk$t=y<5>Y4*7EzR_s7O_- zMy=$uQW8b2;s>NWL?TMdLxlta5oJ>pgd)dj6O=+)AUG&E8%_(jzJT!p*fBV{W;2tA zZ@znd#xr*=Sf06&=KnG?XU;kI`_3}U?|gSG0(9i56MY&wwj{4GI0Fj|fGJK7^a)DTs7t%_*xS*di>-bRnd9i)-aFUeF8vPV!Q<~tENOMe()bao{S>5 zEP&!kV%y+_>o&lwni6~Xc~x{C*n592JJs`KTT&|9=@kH^zWTo;_Z&6Kecg4{I1bN) z5f-bG$E0l^SZgGg%%3eg&bH<0R{@wgx6sHp_8z1ypO%oV+v4gUd6(SR2*5z;91CFP z%EbV5@A<;WHuf_)?SalvS6ip$Sj>WZ%-P@iiB#mwT(|OQCTBde0U8@SEP%CZH9c|< zGHvU5wX8_&GLAdD*4Y3D_V!u;w*7YiEbI41zOnZ}d%yF&Dge%>#G=JzNgJT9VVazO zeF6aQHa`JC-F@QG?td>8Pu~1OJaI;4X!nEkn11Q8UjT4_<<~aA#^yO{p=8i`;F5Z{ zd*e9(4t!Z?0jyYb83@CJ#LS-p@IaV@0>0r+@6ek41l`7e8BK> zFTOQoL74MkOS9Zto7T4hP`_iPcL~R0w|={39RL-NZw6r5+>1ac9$Y#pdqpx2x~4t@ zz^bWc#&=(k?ds+IX8OT0&x$`f{Fx1*jH03m#NB<1K;ii`Wc<8Q0MuB4;od6`3 zZZOi97Jmi6(c>Ke>^OKB2-AbATZ@eoZp#3 zPW3-+K>w^_{{J=9qM{i%&3e-c*ck-Oiyc>X1g_Z@d z|J1mgejs`eRKL9QnnAQ`Htox)T>f~#4H92f^z$G{euP*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a/Items/Accessories/ProfanedSoulTransArms.png b/Items/Accessories/ProfanedSoulTransArms.png new file mode 100644 index 0000000000000000000000000000000000000000..b2d12f3818287ef26132055dd148b4a82235c09f GIT binary patch literal 1841 zcmeAS@N?(olHy`uVBq!ia0vp^8Vn392^?%d*6dv(^+1ZVz$3Dlfq`2Hgc&d0t@{HM zlrC|NC<)F_D=AMbN@Z|P%_*)dRtPRBP07qx2+7aSIk@~`4Fdz)9#0p?kcwMx?{4gt zb(J~r@qVaKj_w|gThTW&1hox2Iusalr#4LMYE8)2{VB{MXwvFy#Vr`r5^>~~nwXH~ zc{AURu=GOn_d7aISLe?)w>Exn?0Z6a0{@${Z|=PPp2qLz=eOu-Ap-{rxWV}0)5ELW zmmcr0vtpRT{O8qWen^7?%rFDhNAYsie* z_vMPG%Mot>_^ytQ{`}58(nagV;h*zjlUct73yKdc zt^Z;zXTa+}>zUuAF9jbDE ze{iK}bHy~K9orr5PiA1k4)V;rSREfTd_KN;^?!qEpJ*!%DgGHkjoa7R*!=zTrlR=^ z_od93>bFz5>*voF=wUvy@c8}x@`8fq`+q+?v~*8>iHzX${aJS9MLpbeX7T+09`sJW zAj?s2E>92tmf4If_`sc%D|SiAF$rs@|Lx(w^YwJyG3Ip(rpA3U)-z~-Hu2`#+uxNQ zo%G4SebU6vpnaL))SkTGsvGPNls?$0_~akc^~TlylioF!U1`7pesjgVT59*0F`L!) zF>|@>mmc;QM{OXRsrbb*M}K4XW>cVNGM6k!&pWZX{(!H3?bgSCcd`4${yM7Wx!u7! z%K;4>c-pu$?if%h%kH|TPdh3;9o1;K&2(Ag?~3f01U_GWetDZJo*l9u-Z*~yD*it% zWz!e#Gr|qK?dx`)NO>v0LyG^sN!jXb*$jJ>w1>%wVBT@1P#5TK`Rhh{8?FJF43}?w z*)gpq#5!n2Wdh$^t947SBq{^_kzwa0Yi49u5d7m2dvhuK7I_?@{YJLp$D7x_$3*@z zMt5ueV%;Vb{DnCtRdZ_mIb%74-YEU&lHxO*fj%jk_pvefL6qgGiUTXX_y2fVd6)6+ z3P$X}o$*zg7h|dM(uQ3#cb@LaTXw~1?QG4`)tApsxu^3Y%`10%i81cTS?+MxM{_~m zGLZmtPFbl1#Fvsv%@tb98y?^vId01mK02b5venCJg%Sj%enmnoXF z<`?6#jhPQ7_h)%Jd_Ev!CHmvaso-C%&o0z}X!bm=e6=?(+3DT$U{RXB-X*N5}bvHuiUD7vbU&mc@Nn`HvFZ^c~zCMOSawT1J3D39)t6~+(ipIZDNyt_8?IozaTZq=W_l;K;+F<%NbM9R zKUdM<#WPDcTvrGGk(bwaLw{>J9=rwyM{7j9C-&Q zT-vbqiRNGC>F0uvG3rfS{)IcnQT!Y*D4$)pRe8z+Xqtap>{HFhjBoLHrkwlA*(ppA z4;4?B1jcJ?lzH&0u;sHi;wu|uq*vHzv4+S^Wzy<@re}O=aS->`Pb;ph^{Y%VXU5Dh zP>~yI8>Y%Et$%RI66m~@GO5@3H~nT^w;;P{%9OcFW-Kb{0~NH-Zk_~}D>g4Y7l-s2 o@c|=M`l^~|Ips0=Klu-LzutiwsRs-nfz=&@r>mdKI;Vst0H5#8w*UYD literal 0 HcmV?d00001 diff --git a/Items/Accessories/ProfanedSoulTransBody.png b/Items/Accessories/ProfanedSoulTransBody.png new file mode 100644 index 0000000000000000000000000000000000000000..0c533e0a365376ab36337bb83bd05999c26a7805 GIT binary patch literal 2562 zcmZ`*3pkW%8=iwxrcC-Vjk2st(Kv*V!^k2ev_>^UttlDQWR$@;jT!AqQEj`<<5)Wk zm1EACMw<~cgCwyv_>(ZqQZbIx?C0;=|LWiT_jNt*^Iq@wKHv8o?&p2Kt4BRuHYsZ= zgFv87Zmv$=fZhWF$>Eh0fElAnEdfv)!d!9TAP{WJnt*$S)Ky?{8`&94#*hf)sMD7M zL5_jM@aS+I3_0R#2ua6>L?X79{5uXXz3%4Z;6wRCEVO6sI-$jRKdhnKsu!#rb?T%N zt1wZ+U~5&6oT}>1pRopDLv@%#}~r*?dF~*=7|AxNINW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J@cl-c<`EWo_)oy6HKA+wJbVAMK)-N;o?Qjrl{ zdnRsHi2UZ@+KSnXENI{k`-<71aEM%xr^bEdYzQMTNDkBiqxDRn12Agc%r}G0xO^69 z1~5!6pQVu*EG&E8PH~T1@JWL^L@u@Q)MBj#pH^_)@CQb#71s)2)N1yJG4}EC=bl=8 z(|hu#jIvY8SW2Pa3~---3L~urdCP!i0Hf8CYXvZBU!+0I02V;rlk?Kbc1hC2jPiT? YL$-FtDtI%m1y))Np00i_>zopr0HlW88~^|S literal 0 HcmV?d00001 diff --git a/Items/Accessories/ProfanedSoulTransLegs.png b/Items/Accessories/ProfanedSoulTransLegs.png new file mode 100644 index 0000000000000000000000000000000000000000..98ba2a1bfc1dbdbf418b224f6d298096e466ef87 GIT binary patch literal 4082 zcmZ{mcUTkY+Q!+>FRQ`|Dn=I&aUp<$h!T`e1Qilmln_FZCK@^s5JG6-WW}`ve94=@>8B7|b5pS*=HV$ZF{zh`3nq5qnR9Fxzr!ow z)`ijL-4S04iUO3AtjZk{u5)4~g8g?L_>!ybV>+om+2Oq*8PUHCS^|~*8X;r)0tJtF zpV8+KM{2rnvu&E`zUbo{FUm{41&ct zF)w!>eFM+UhxiEDyeec}j0Xg9ALn{Qfw-9s@!<$XN18YMVn87*^O4?l_I1qCPPZr{ za<0Hlbb=q`tl(N+swdcUz=b_WcQ+f~q(jNM98H)eLbj-e?pQ3+7CcFC+j1pq>xLa8 z=VnDBp>C~X=+_J2%rG#mfiutqO@hc9hr!8Z(ZcyQ;nY@)P_X)s1++hAtz|nk(rURRC4^H=xFR{X$x_pT9OydoqSukt(;#lI>v>Xe zn#sE6b&wjZk-sB9v6}*#!yFY7ii1_&`>-O}w%o>Euyza=`2Jo#9|hgz9NCcs(I_-Z zf(SQyR4K)n++J{J9Wi>VRsk_s{O%cEWp3J~Cfu|;W_%TKbu$Noje^B17mdKDZ-CTQ zPf08KXdylKJNCzFz9)(Q&%f)8tq@Oto1|RqiKOM5xl(PtjF6G)x_MVA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cmV?d00001 diff --git a/Items/Accessories/Wings/ProfanedSoulTransWings.png b/Items/Accessories/Wings/ProfanedSoulTransWings.png new file mode 100644 index 0000000000000000000000000000000000000000..df354fa312c8c3296aaa28e2df61e61a79f61331 GIT binary patch literal 2408 zcmZvedpr~R8^^!uL^qc>zaqDa>hxlTBGS|kVJ;;yOlEFv7;}l489JxaITLnBE<+AE zG?&%X$YrSJmNM75jQMFUxr|P=##o*C{a(M<>-=$^f1c-$@9X)#zR&0VJkOWxdf8ra z_rcu&07aOCt((ll0gwYb-{FSlqiCl}*pZw=_ZS_=T|Is&u(_qF&!;Uo|Dy@!^< zht-`9cWXv-w(-1ZyGe)Su;g8~s<*uQRi<2KCfR7Ia^gL--ebG;)!UJutkZUr2acqx zWBSLlkSTmjczs;YTIAf>A`442`rK)Beb(xH@K`YZ1~qAZIe(!SFL&f`R{HI11y>U_ zurVE$Nx>I?rM>pa>UC%GQ;rXJAaE(&z0d+VAlU9i$0xfGb2p^COp0Y^FM9HsZJw7? zbvh%Y(}7T=U)R?#wj-sXJ8L^ghlC!#>x4YSI0>975KCY*)Rc#@tPKc&&^pwY66%#y zii1d4$j!=)bcm)+_q|zt7ryIiKqccGuWhmbbN{Q)(JpVkk4kB_putU{;fI zxZD%!P2)Ipw_M7fxBf`w702$qAxpV_zOIC@9iV(V2LZg(TEoZSk$Idl(kD{x_obPq zWTbA?1vOb(>hURpE2HHhGJY0&aw(U9bN6@0ywP6qy9rRy@fNwF_giJq{n?o$ zl1~|Ccb!+&E&?ep3pNZg2qaz7E`Y)C{{z}Khf+5^C%hKG-1_n>T7m+wqhGe|l{csO zR#aLU{Dz;+&{k7=LhYho;qST7uNjDM886SsPSO}Ya36y+kXG&BX}+55Vez+5dpjV} ztgSnb*O`meLElK#TuGI^^`!%Vy4T*$1UK1WuRU1dGVnfMFfG#cpwxf4*#sh22XtvU zn!k{l?1X?>LpOUoX)SN!jGt%)Ul{LQ^k-}Q*<4Y*F5Et@Z?4CZIFy*M8J%4I-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l=)GcnLDF1V82`X_>g zmqLg^&>km>jX0R&ka)W+eL*ibqQ`3yT;y#`1&>?3kby=NL}3L_%;IvOC*NpKHg*-i z7@}bg#)udNE>TO_Ok+51{_{L}>MH>1%^!Y9T#mq`ITj~PW~U3 bQrDE36MuYwI#mqHzD@vk>9Q@|8ujB}sd1*8 literal 0 HcmV?d00001 diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 16b7ff6b14..36cd4b5d72 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -427,10 +427,186 @@ namespace CalamityMod.Items } #endregion + #region Profaned Soul Crystal Attacks + + private bool HandleAttackTransforms(Item item, Player player) + { + if (player.whoAmI != Main.myPlayer) + return false; + int weaponType = item.melee ? 1 : item.ranged ? 2 : item.magic ? 3 : item.Calamity().rogue ? 4 : -1; + if (weaponType > 0) + { + if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 300) + { + player.Calamity().profanedSoulWeaponType = weaponType; + player.Calamity().profanedSoulWeaponUsage = 0; + } + Vector2 correctedVelocity = Main.MouseWorld - player.Center; + correctedVelocity.Normalize(); + bool shouldNerf = player.Calamity().endoCooper || player.Calamity().magicHat; //No bonkers damage memes thank you very much. + bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + if (item.melee) + { + if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 4 : 6) == 0) + { + if (player.Calamity().profanedSoulWeaponUsage > 0 && player.Calamity().profanedSoulWeaponUsage % (enrage ? 20 : 30) == 0) //every 5 shots is a shotgun spread + { + int numProj = 5; + + correctedVelocity *= 12f; + int spread = 3; + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); + + Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((shouldNerf ? 500 : 1750) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f); + spread -= Main.rand.Next(2, 4); + Main.PlaySound(SoundID.Item20, player.Center); + } + player.Calamity().profanedSoulWeaponUsage = 0; + } + else + { + Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType(), (int)((shouldNerf ? 250 : 1250) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f); + Main.PlaySound(SoundID.Item20, player.Center); + } + + } + player.Calamity().profanedSoulWeaponUsage++; + + } + else if (item.ranged) + { + + if (enrage || Main.rand.NextBool(2)) //100% chance if 50% or lower, else 1 in 2 chance + { + correctedVelocity *= 20f; + Vector2 perturbedspeed = new Vector2(correctedVelocity.X + Main.rand.Next(-3, 4), correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(3)); + bool isSmallBoomer = Main.rand.NextDouble() <= (enrage ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired. + bool isThiccBoomer = isSmallBoomer && Main.rand.NextDouble() <= 0.05; // 5% + int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3; + int dam = (int)((shouldNerf ? 250 : 1000) * (player.allDamage + player.minionDamage - 1f)); + switch (projType) + { + case 1: //big boomer + case 2: //boomer + int proj = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, projType == 1 ? 1f : 0f); + Main.projectile[proj].Calamity().forceMinion = true; + break; + case 3: //bab boomer + int proj2 = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, 0f); + Main.projectile[proj2].Calamity().forceMinion = true; + break; + } + if (projType > 1) + { + Main.PlaySound(SoundID.Item20, player.Center); + } + } + } + else if (item.magic) + { + if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0 && player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) + { + player.Calamity().profanedSoulWeaponUsage = 0; + } + int manaCost = (int)((float)100 * player.manaCost); + if (player.statMana < manaCost && player.Calamity().profanedSoulWeaponUsage == 0) + { + if (player.manaFlower) + { + player.QuickMana(); + } + } + if (player.statMana >= manaCost && player.Calamity().profanedSoulWeaponUsage == 0) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= manaCost; + correctedVelocity *= 25f; + Main.PlaySound(SoundID.Item20, player.Center); + int dam = (int)((shouldNerf ? 900 : 4500) * (player.allDamage + player.minionDamage - 1f)); + if (player.HasBuff(BuffID.ManaSickness)) + { + int sickPenalty = (int)(dam * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60))); + dam -= sickPenalty; + } + int proj = Projectile.NewProjectile(player.position, correctedVelocity, ModContent.ProjectileType(), dam, 1f, player.whoAmI, enrage ? 1f : 0f); + Main.projectile[proj].Calamity().forceMinion = true; + player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25; + } + if (player.Calamity().profanedSoulWeaponUsage > 0) + player.Calamity().profanedSoulWeaponUsage--; + } + else if (item.Calamity().rogue) + { + if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) + { + player.Calamity().profanedSoulWeaponUsage = 0; + } + if (player.Calamity().profanedSoulWeaponUsage >= (enrage ? 69 : 180)) + { + float crystalCount = 36f; + for (float i = 0; i < crystalCount; i++) + { + float angle = MathHelper.TwoPi / crystalCount * i; + int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 169 : 880) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 0f, 0f); + Main.projectile[proj].Calamity().forceMinion = true; + Main.PlaySound(SoundID.Item20, player.Center); + } + player.Calamity().profanedSoulWeaponUsage = 0; + } + else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0) + { + float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10)); + int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 220 : 1100) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 1f, 0f); + Main.projectile[proj].Calamity().forceMinion = true; + Main.PlaySound(SoundID.Item20, player.Center); + } + player.Calamity().profanedSoulWeaponUsage += enrage ? 1 : 2; + if (!enrage && player.Calamity().profanedSoulWeaponUsage % 2 != 0) + player.Calamity().profanedSoulWeaponUsage--; + } + } + return false; + } + + #endregion + #region Use Item Changes + + public override bool AltFunctionUse(Item item, Player player) + { + if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee)) + { + NPC closest = Main.MouseWorld.ClosestNPCAt(1000f, true); + if (closest != null) + { + player.MinionAttackTargetNPC = closest.whoAmI; + player.UpdateMinionTarget(); + } + return false; + } + return base.AltFunctionUse(item, player); + } + public override bool CanUseItem(Item item, Player player) { CalamityPlayer modPlayer = player.Calamity(); + if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee)) + { + if (player.altFunctionUse == 0) + { + return HandleAttackTransforms(item, player); + } + else + { + return AltFunctionUse(item, player); + } + } + else if (modPlayer.profanedCrystalBuffs && item.summon) + { + + } if (item.type == ItemID.MonkStaffT1) { for (int i = 0; i < 1000; ++i) @@ -545,6 +721,8 @@ namespace CalamityMod.Items tt2.overrideColor = new Color(0, 0, 255); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(255 - Main.DiscoG < 80 ? 80 : Main.DiscoG < 50 ? 255 : 255 - Main.DiscoG, Main.DiscoG < 126 ? 126 : Main.DiscoG, 0); //alternates between emerald green and amber (BanditHueh) // Uniquely colored legendary weapons if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) diff --git a/Localization/CalamityLocalization.cs b/Localization/CalamityLocalization.cs index 5c87dde536..6cf5135387 100644 --- a/Localization/CalamityLocalization.cs +++ b/Localization/CalamityLocalization.cs @@ -36,6 +36,7 @@ namespace CalamityMod.Localization new [] { "ProfanedBossText", "The air is burning..." }, new [] { "ProfanedBossText2", "Shrieks are echoing from the dungeon." }, new [] { "ProfanedBossText3", "The calamitous beings have been inundated with bloodstone." }, + new [] { "ProfanedBossText4", "The Profaned Goddess has recognised your devotion to purity!" }, new [] { "GhostBossText", "The abyssal spirits have been disturbed." }, new [] { "GhostBossText2", "Wails echo through the dilapidated dungeon halls..." }, diff --git a/NPCs/Abyss/Catfish.cs b/NPCs/Abyss/Catfish.cs index 177ef4e248..abfcb18b03 100644 --- a/NPCs/Abyss/Catfish.cs +++ b/NPCs/Abyss/Catfish.cs @@ -210,7 +210,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index 67dec3f4bf..739ff992a4 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -522,7 +522,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index 1e4e6c8bb5..2d9392f00e 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -226,7 +226,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return brokenMask; } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index dc7fb26ca2..fa38820a2e 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -446,7 +446,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return detectsPlayer; } diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 404c31eff8..f6b912278b 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -455,7 +455,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return detectsPlayer; } diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index ec4b9ae967..430a054eca 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index c4dcfc7a71..cdc7c2acaf 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -343,7 +343,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return detectsPlayer; } diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index d926ddc4ac..a8ecfee816 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -239,7 +239,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index 1b2b7c3960..9716346b52 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -211,7 +211,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/Mauler.cs b/NPCs/Abyss/Mauler.cs index b7e1e1090d..5c5300d032 100644 --- a/NPCs/Abyss/Mauler.cs +++ b/NPCs/Abyss/Mauler.cs @@ -274,7 +274,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index ee4ac1fe71..2d13f653de 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -159,6 +159,13 @@ namespace CalamityMod.NPCs.Abyss } } + public override bool? CanBeHitByProjectile(Projectile projectile) + { + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) + return false; + return null; + } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index cfb4e6eaa1..ec0115fc72 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -216,7 +216,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/Reaper.cs b/NPCs/Abyss/Reaper.cs index 88373753d8..3be5385cec 100644 --- a/NPCs/Abyss/Reaper.cs +++ b/NPCs/Abyss/Reaper.cs @@ -622,7 +622,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index a787b3490e..def272c924 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/Trasher.cs b/NPCs/Abyss/Trasher.cs index e05bb83557..8fcd369555 100644 --- a/NPCs/Abyss/Trasher.cs +++ b/NPCs/Abyss/Trasher.cs @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index ae77ce4572..6d27efdca2 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -219,7 +219,7 @@ namespace CalamityMod.NPCs.Abyss public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 0536dc7aaa..59f6fe5f8d 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.AquaticScourge public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return npc.Calamity().newAI[0] == 1f; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e5dbe8a7ab..ff0cc8b189 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4518,7 +4518,17 @@ namespace CalamityMod.NPCs chat = Main.npc[fapsol].GivenName + " is always trying to brighten my mood...even if, deep down, I know she's sad."; } } - + if ((npc.GivenName == "Amber" ? Main.rand.NextBool(10) : Main.rand.NextBool(15)) && Main.LocalPlayer.Calamity().pArtifact) + { + if (Main.LocalPlayer.Calamity().profanedCrystalBuffs) + { + chat = Main.rand.NextBool(2) ? "They look so cute and yet, I can feel their immense power just by being near them. What are you?" : "I hate to break it to you, but you don't have hair to cut or style, hun."; + } + else if (Main.LocalPlayer.Calamity().gDefense && Main.LocalPlayer.Calamity().gOffense) + { + chat = "Aww, they're so cute, do they have names?"; + } + } break; case NPCID.GoblinTinkerer: diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index cf8bd594b9..de6d14ce7a 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index fcfcf771f2..e7f7337063 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/NormalNPCs/Sunskater.cs b/NPCs/NormalNPCs/Sunskater.cs index 8ac94f0b2e..f6ab96e2f4 100644 --- a/NPCs/NormalNPCs/Sunskater.cs +++ b/NPCs/NormalNPCs/Sunskater.cs @@ -202,7 +202,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 984b6e6163..6eb7482655 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -24,8 +24,9 @@ using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; -using Terraria.ModLoader.Config; -using CalamityMod; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Typeless; + namespace CalamityMod.NPCs.Providence { [AutoloadBossHead] @@ -40,6 +41,7 @@ namespace CalamityMod.NPCs.Providence private int immuneTimer = 300; private int frameUsed = 0; private int healTimer = 0; + private bool challenge = true; //Used to determine if Profaned Soul Crystal should drop. public static float normalDR = 0.35f; public static float cocoonDR = 0.9f; @@ -1141,7 +1143,8 @@ namespace CalamityMod.NPCs.Providence //Accessories clientside only in Expert DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, biomeType != 2 && Main.expertMode); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, biomeType == 2 && Main.expertMode); - + bool psc = challenge && Main.expertMode; + DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, psc); //drops pre-scal, cannot be sold, does nothing aka purely vanity. Requires at least expert for consistency with other post scal dev items. // All other drops are contained in the bag, so they only drop directly on Normal if (!Main.expertMode) { @@ -1193,6 +1196,18 @@ namespace CalamityMod.NPCs.Providence } } + if (psc) + { + if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(Language.GetTextValue("Mods.CalamityMod.ProfanedBossText4"), Color.DarkOrange); + } + else if (Main.netMode == NetmodeID.Server) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey("Mods.CalamityMod.ProfanedBossText4"), Color.DarkOrange); + } + } + // Mark Providence as dead CalamityWorld.downedProvidence = true; CalamityMod.UpdateServerBoolean(); @@ -1319,6 +1334,18 @@ namespace CalamityMod.NPCs.Providence npc.damage = (int)(npc.damage * 0.8f); } + public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit) + { + bool goldenGun = projectile.type == ModContent.ProjectileType(); + if (challenge && (!goldenGun && (projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType()) || Main.player[projectile.owner].Calamity().profanedCrystal)) + challenge = false; + } + + public override void OnHitByItem(Player player, Item item, int damage, float knockback, bool crit) + { + challenge = false; + } + public override void HitEffect(int hitDirection, double damage) { if(npc.soundDelay == 0) diff --git a/NPCs/SunkenSea/BlindedAngler.cs b/NPCs/SunkenSea/BlindedAngler.cs index 8b4335eef4..870ea55717 100644 --- a/NPCs/SunkenSea/BlindedAngler.cs +++ b/NPCs/SunkenSea/BlindedAngler.cs @@ -239,7 +239,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/Clam.cs b/NPCs/SunkenSea/Clam.cs index c6e38b5803..2da9967774 100644 --- a/NPCs/SunkenSea/Clam.cs +++ b/NPCs/SunkenSea/Clam.cs @@ -162,7 +162,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs index ed88e73757..9e9fb8ae5a 100644 --- a/NPCs/SunkenSea/EutrophicRay.cs +++ b/NPCs/SunkenSea/EutrophicRay.cs @@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index d0afc16470..c78a3fa318 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/GhostBellSmall.cs b/NPCs/SunkenSea/GhostBellSmall.cs index bdd6b1b5c0..636460a826 100644 --- a/NPCs/SunkenSea/GhostBellSmall.cs +++ b/NPCs/SunkenSea/GhostBellSmall.cs @@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index 8a8836fa32..86f7a413dc 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -310,7 +310,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/NPCs/SunkenSea/PrismTurtle.cs b/NPCs/SunkenSea/PrismTurtle.cs index 80d8b15ba2..0f4a8058b3 100644 --- a/NPCs/SunkenSea/PrismTurtle.cs +++ b/NPCs/SunkenSea/PrismTurtle.cs @@ -246,7 +246,7 @@ namespace CalamityMod.NPCs.SunkenSea public override bool? CanBeHitByProjectile(Projectile projectile) { - if (projectile.minion) + if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { return hasBeenHit; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index aa475be2e3..7474ec5572 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -62,6 +62,8 @@ namespace CalamityMod.Projectiles public int lineColor = 0; //holy mother of god, Eater of Shoals was a pain in the ass public bool extorterBoost = false; + public bool overridesMinionDamagePrevention = false; + #region SetDefaults public override void SetDefaults(Projectile projectile) { @@ -1645,9 +1647,9 @@ namespace CalamityMod.Projectiles } else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]) { - if (modPlayer.pArtifact) + if (modPlayer.profanedCrystalBuffs || (modPlayer.pArtifact && !modPlayer.profanedCrystal)) { - target.AddBuff(ModContent.BuffType(), 300); + target.AddBuff(ModContent.BuffType(), modPlayer.profanedCrystalBuffs ? 600 : 300); } if (modPlayer.tearMinions) diff --git a/Projectiles/Summon/MiniGuardianAttack.cs b/Projectiles/Summon/MiniGuardianAttack.cs index 55282fa852..a4e1726638 100644 --- a/Projectiles/Summon/MiniGuardianAttack.cs +++ b/Projectiles/Summon/MiniGuardianAttack.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -9,9 +10,143 @@ namespace CalamityMod.Projectiles.Summon { public class MiniGuardianAttack : ModProjectile { + private void ai(int type, float num535, float num536, Player player) + { + switch (type) + { + case 1: //offensive bab (profaned soul artifact) + case 2: //Empowered bab WEEEEEEEEEE (profaned soul crystal) + if (projectile.ai[1] <= -1f) + { + projectile.ai[1] = 17f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] -= type; + } + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + + if (type == 2) + num550 *= 2f; + else if (player.Calamity().gDefense) + num550 *= 0.95f; + + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * (type == 1 ? 14f : 20f) + num551) / (type == 1 ? 15f : 21f); + projectile.velocity.Y = (projectile.velocity.Y * (type == 1 ? 14f : 20f) + num552) / (type == 1 ? 15f : 21f); + } + else + { + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) + { + projectile.velocity *= 1.05f; + } + } + break; + case 3: //bored bab - (idle) + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; + float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + + if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + break; + } + } + public override void SetStaticDefaults() { - DisplayName.SetDefault("Offensive Guardian"); + DisplayName.SetDefault("Offensive Guardian"); // *swears at u* Main.projFrames[projectile.type] = 4; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; @@ -31,6 +166,28 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft *= 5; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 6; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Main.player[projectile.owner].Calamity().profanedCrystalBuffs && !Main.player[projectile.owner].Calamity().magicHat && !Main.player[projectile.owner].Calamity().endoCooper) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + else + { + return true; + } + } + + public override bool? CanCutTiles() + { + if (projectile.damage == 0) + return false; + return null; } public override void AI() @@ -45,9 +202,11 @@ namespace CalamityMod.Projectiles.Summon { projectile.timeLeft = 2; } - if (!modPlayer.pArtifact || (!modPlayer.tarraSummon && !modPlayer.bloodflareSummon && + bool shouldKill = projectile.damage == 0 && (!modPlayer.profanedCrystal || modPlayer.profanedCrystalBuffs); + if (shouldKill || !modPlayer.pArtifact || (!modPlayer.profanedCrystal && !modPlayer.tarraSummon && !modPlayer.bloodflareSummon && !modPlayer.godSlayerSummon && !modPlayer.silvaSummon && !modPlayer.dsSetBonus && !modPlayer.omegaBlueSet && !modPlayer.fearmongerSet)) { + modPlayer.gOffense = false; projectile.active = false; return; } @@ -90,131 +249,16 @@ namespace CalamityMod.Projectiles.Summon num3 = num542; } } - if (!flag19) + if (!flag19 || projectile.damage == 0) { - float num16 = 0.5f; - projectile.tileCollide = false; - int num17 = 100; - Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; - float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; - num19 += (float)Main.rand.Next(-10, 21); - num18 += (float)Main.rand.Next(-10, 21); - num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); - num19 -= 60f; - float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); - float num21 = 18f; - - if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && - projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && - !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - if (projectile.velocity.Y < -6f) - { - projectile.velocity.Y = -6f; - } - } - if (num20 > 2000f) - { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (num20 < 50f) - { - if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) - { - projectile.velocity *= 0.90f; - } - num16 = 0.01f; - } - else - { - if (num20 < 100f) - { - num16 = 0.1f; - } - if (num20 > 300f) - { - num16 = 1f; - } - num20 = num21 / num20; - num18 *= num20; - num19 *= num20; - } - - if (projectile.velocity.X < num18) - { - projectile.velocity.X = projectile.velocity.X + num16; - if (num16 > 0.05f && projectile.velocity.X < 0f) - { - projectile.velocity.X = projectile.velocity.X + num16; - } - } - if (projectile.velocity.X > num18) - { - projectile.velocity.X = projectile.velocity.X - num16; - if (num16 > 0.05f && projectile.velocity.X > 0f) - { - projectile.velocity.X = projectile.velocity.X - num16; - } - } - if (projectile.velocity.Y < num19) - { - projectile.velocity.Y = projectile.velocity.Y + num16; - if (num16 > 0.05f && projectile.velocity.Y < 0f) - { - projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; - } - } - if (projectile.velocity.Y > num19) - { - projectile.velocity.Y = projectile.velocity.Y - num16; - if (num16 > 0.05f && projectile.velocity.Y > 0f) - { - projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; - } - } + ai(3, num535, num536, player); } else { - if (projectile.ai[1] == -1f) - { - projectile.ai[1] = 17f; - } - if (projectile.ai[1] > 0f) - { - projectile.ai[1] -= 1f; - } - if (projectile.ai[1] == 0f) - { - float num550 = 24f; //12 - Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num551 = num535 - vector43.X; - float num552 = num536 - vector43.Y; - float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); - if (num553 < 100f) - { - num550 = 28f; //14 - } - if (modPlayer.gDefense) - { - num550 *= 0.95f; - } - num553 = num550 / num553; - num551 *= num553; - num552 *= num553; - projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; - projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; - } + if (player.Calamity().profanedCrystalBuffs) + ai(2, num535, num536, player); else - { - if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) - { - projectile.velocity *= 1.05f; - } - } + ai(1, num535, num536, player); } if ((double)projectile.velocity.X > 0.25) { diff --git a/Projectiles/Summon/MiniGuardianDefense.cs b/Projectiles/Summon/MiniGuardianDefense.cs index 203df0a6f8..3cf214a242 100644 --- a/Projectiles/Summon/MiniGuardianDefense.cs +++ b/Projectiles/Summon/MiniGuardianDefense.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -9,6 +10,138 @@ namespace CalamityMod.Projectiles.Summon { public class MiniGuardianDefense : ModProjectile { + private void ai(int type, float num535, float num536, Player player) + { + switch (type) + { + case 1: //defensive bab (profaned soul artifact) + case 2: //Empowered bab WEEEEEEEEEE (profaned soul crystal) + if (projectile.ai[1] <= -1f) + { + projectile.ai[1] = 17f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] -= type; + } + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + if (type == 2) + num550 *= 2f; + else if (player.Calamity().gOffense) + num550 *= 0.95f; + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * (type == 1 ? 14f : 20f) + num551) / (type == 1 ? 15f : 21f); + projectile.velocity.Y = (projectile.velocity.Y * (type == 1 ? 14f : 20f) + num552) / (type == 1 ? 15f : 21f); + } + else + { + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) + { + projectile.velocity *= 1.05f; + } + } + break; + case 3: //bored bab - (idle) + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; + float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + + if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + break; + } + } + public override void SetStaticDefaults() { DisplayName.SetDefault("Defensive Guardian"); @@ -31,6 +164,27 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft *= 5; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 6; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override bool? CanCutTiles() + { + if (projectile.damage == 0) + return false; + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Main.player[projectile.owner].Calamity().profanedCrystalBuffs && !Main.player[projectile.owner].Calamity().magicHat && !Main.player[projectile.owner].Calamity().endoCooper) { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + else + { + return true; + } } public override void AI() @@ -45,8 +199,10 @@ namespace CalamityMod.Projectiles.Summon { projectile.timeLeft = 2; } - if (!modPlayer.pArtifact || player.maxMinions < 10) + bool shouldKill = projectile.damage == 0 && (!modPlayer.profanedCrystal || modPlayer.profanedCrystalBuffs); + if (shouldKill || !modPlayer.pArtifact || (modPlayer.minionSlotStat < 10 && !modPlayer.profanedCrystal)) { + modPlayer.gDefense = false; projectile.active = false; return; } @@ -89,131 +245,16 @@ namespace CalamityMod.Projectiles.Summon num3 = num542; } } - if (!flag19) + if (!flag19 || projectile.damage == 0) { - float num16 = 0.5f; - projectile.tileCollide = false; - int num17 = 100; - Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; - float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; - num19 += (float)Main.rand.Next(-10, 21); - num18 += (float)Main.rand.Next(-10, 21); - num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); - num19 -= 60f; - float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); - float num21 = 18f; - - if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && - projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && - !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - if (projectile.velocity.Y < -6f) - { - projectile.velocity.Y = -6f; - } - } - if (num20 > 2000f) - { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (num20 < 50f) - { - if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) - { - projectile.velocity *= 0.90f; - } - num16 = 0.01f; - } - else - { - if (num20 < 100f) - { - num16 = 0.1f; - } - if (num20 > 300f) - { - num16 = 1f; - } - num20 = num21 / num20; - num18 *= num20; - num19 *= num20; - } - - if (projectile.velocity.X < num18) - { - projectile.velocity.X = projectile.velocity.X + num16; - if (num16 > 0.05f && projectile.velocity.X < 0f) - { - projectile.velocity.X = projectile.velocity.X + num16; - } - } - if (projectile.velocity.X > num18) - { - projectile.velocity.X = projectile.velocity.X - num16; - if (num16 > 0.05f && projectile.velocity.X > 0f) - { - projectile.velocity.X = projectile.velocity.X - num16; - } - } - if (projectile.velocity.Y < num19) - { - projectile.velocity.Y = projectile.velocity.Y + num16; - if (num16 > 0.05f && projectile.velocity.Y < 0f) - { - projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; - } - } - if (projectile.velocity.Y > num19) - { - projectile.velocity.Y = projectile.velocity.Y - num16; - if (num16 > 0.05f && projectile.velocity.Y > 0f) - { - projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; - } - } + ai(3, num535, num536, player); } else { - if (projectile.ai[1] == -1f) - { - projectile.ai[1] = 17f; - } - if (projectile.ai[1] > 0f) - { - projectile.ai[1] -= 1f; - } - if (projectile.ai[1] == 0f) - { - float num550 = 24f; //12 - Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num551 = num535 - vector43.X; - float num552 = num536 - vector43.Y; - float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); - if (num553 < 100f) - { - num550 = 28f; //14 - } - if (modPlayer.gOffense) - { - num550 *= 0.95f; - } - num553 = num550 / num553; - num551 *= num553; - num552 *= num553; - projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; - projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; - } + if (player.Calamity().profanedCrystalBuffs) + ai(2, num535, num536, player); else - { - if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) - { - projectile.velocity *= 1.05f; - } - } + ai(1, num535, num536, player); } if ((double)projectile.velocity.X > 0.25) { diff --git a/Projectiles/Summon/MiniGuardianHealer.cs b/Projectiles/Summon/MiniGuardianHealer.cs index 37c644b2fc..555088e8b8 100644 --- a/Projectiles/Summon/MiniGuardianHealer.cs +++ b/Projectiles/Summon/MiniGuardianHealer.cs @@ -31,6 +31,15 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft *= 5; } + public override bool? CanCutTiles() + { + CalamityPlayer modPlayer = Main.player[projectile.owner].Calamity(); + bool psa = modPlayer.pArtifact && !modPlayer.profanedCrystal; + if (!psa && !modPlayer.profanedCrystalBuffs) + return false; + return null; + } + public override void AI() { Player player = Main.player[projectile.owner]; @@ -43,7 +52,7 @@ namespace CalamityMod.Projectiles.Summon { projectile.timeLeft = 2; } - if (!modPlayer.pArtifact) + if (!modPlayer.pArtifact || player.dead) { projectile.active = false; return; diff --git a/Projectiles/Summon/MiniGuardianSpear.png b/Projectiles/Summon/MiniGuardianSpear.png new file mode 100644 index 0000000000000000000000000000000000000000..e64b5053e6e8c14bd118a7adf35f98a732c23648 GIT binary patch literal 692 zcmV;l0!#ggP)h(&9!W$&RA@uxlgn+xFc3uDk54(L z0+*0JQcHkTlMd37Vp;Q6)=&#GF-0CSzyjXiJc6c9f7SGLndVU1PvgMT$25o1e(DDP zet(_jP+EY!-%Q=X*&}i=YWC>5gE4TUD^0P0$x*gftvv%EOB@B3vC06q5S@l!e1 zFfa?*)m6)u zX5j2|@H)T@TFWx(d@ z4h9H-oX}XzDSciT4g)KVM?;+hsohS)z%D@DfT%k-yK<$+X&Bh$2kE9^;Qyy#kLx+` a>GT88EQk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@@gz*sOR$mCa{tG{?mlUK;jex$^g zh2WXi6k3D)1dgURS%ocP%R6KQ$X?DpiA&v#2h=^TsegeT5Vg1|J* zKRnoqfT$$+RWP4ZA2CP%r+DZPI-IQ@BSvg4r{m!AAC7h!*Of^UI$Zi06w?DXS{p0oqVcbW|S!qDyA6?Zq%66gu53|R$Jpcdz literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/ProfanedCrystalMageFireballSplit.png b/Projectiles/Summon/ProfanedCrystalMageFireballSplit.png new file mode 100644 index 0000000000000000000000000000000000000000..edcdd5d8b75a571657180d108f8a542594f47667 GIT binary patch literal 1020 zcmVcKB!P z@r)C_+&0O+&;NLAkAM3eZHj)5inyB=_GG=Wfg8W@$oI(f0j{(1Xn``N3UDxL;>arJWBmYXksyOg^Xmw}~^Pv0IN zR4!pS`|#txqTGtpz%raLn?EJ{4SIh6*id!IuzO#ZCQ5j{z&`_6wB?QqX3{_kX#s)~CFRqXL-Rl0B z6;B7oVPN&Wx)qm!(fvtNJRHnS7+Hs{S#Iv*X~4|qVtw7LcsLkCY;}9O6_`f}>_DICc9tbl_t;SkA*lM~&`CMiv zK=#GyV8!imyFO+I0LNLc!6whU`*yy6Cc*kT%I7KrM}^$%SG#Q{(${Wqa|0A-UYob-*n51Efhl6q4 zYWKWYU%M5jgRMZ^D{1SwS#dfz>XwuH{5T!VY+|-}X!~MXWljTDuiPjbahBcYVsALu zZ6#{AoE{}>GZ?L_sm~P+URa5m_hGb|sKF+oP6tPM9yrda6|sUBcCa>A8YdFJZQPjE zxNmqmF{w9TZ}T&>nZ zw_@)DTK|8ZK5kXu{oeCYY)#H^#c5z|`^tRoZpG*_MF q+wX$VYp1GIaXHvJl}`WO;yp=Irrl{mNd5o-002ovPDHLkV1fWXF8Eyl literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/ProfanedCrystalMeleeSpear.png b/Projectiles/Summon/ProfanedCrystalMeleeSpear.png new file mode 100644 index 0000000000000000000000000000000000000000..e64b5053e6e8c14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cNajuzEAI~ zJRd!C)Mg1j-(k}UN8k91>Am3BNrnjkH zEak6g08-Ec+d`c{4zs0O-=li5l&_*7$Cc`wih9ucbT;_)M!KU(lkRBJRMd`|cCzU9 zIA7E#nwSzfdMc3iOrw&(@I4Y815~u4iS|f9iK3az{{Y?MZNMd` RbbkN<002ovPDHLkV1i9}bZ-Cv literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/ProfanedCrystalRangedSmalls.png b/Projectiles/Summon/ProfanedCrystalRangedSmalls.png new file mode 100644 index 0000000000000000000000000000000000000000..385e7d67b1213933a2ffcd4cd3dea059a9347180 GIT binary patch literal 596 zcmV-a0;~OrP)C@;<^9;0pUqR zK~!ko?U}Jk13?gmvvMzBp`=bHBDO&xl`kN6seJbrcuUkC8jRArJ4nH&AiA==Tjw4Gm0 zk?4!_v2Y%Hw4uOzB0)f*-7e$ALn#x3#NhVl5a&#wt98Hd|Kjkk$F_p9dg5W^<(ROB zoFdh2{Mm->lXf0008+Nkl zO-NKx6vuzhLb6YlB1bLL9D-crq@oChFkoRWlA;LuAh0%qv}@reh@f^d;7TEgAPA*J zqlOSjf+z{Os368POUFzZtqd!u+v2|C>%APt34%NS)ts4o&)oBS|9kIw7D>vN69k~4 zG7W(6$S-BbmK_5y`{7AadDD_z$p4a+Xn+vdm$3ps<|bY7*y0ui5WSxcKJJ=z|LYG`8xBDoWnC=2etr0?@a-AArvDCjn?`3n@FF z_M@HOOU4``UILlhw*fE_{ipyc{doXHYtGqIbS2MTE&&i2c;t#j_0>AA?9uZ_A~OnL zSJn=Drv_c)%^?CPfY`D=C;UF`_QQ2G0KA`^03dhp9smz->Pi}0b%HC*1JJiz2EgUx z+8ez??ms$Z=j-YpRBJ877$TN0C#b+#u}DZrg&jTJfI~z)(|qKTYn-U5Ed)3o6YVK1 za>ZT!gMdjyDh{0iV0vyr0d!t%aSad>Qt{(g&jAQE6#@>KvD;z5At4eXBas=v3VT7>$gtNybZ}cSxV4rPmttd|#bwyti`6C&Yxr^xOhq5)t_jkBrsmA+g?f zU}K0ReD@VOcaiR}Ht<~mv_HM0zqjuiuQyVTNJ5W@;(0~7dr`6^M5#waBqSQD3M_!! l(|6UMad>#@pB7>ak>Al3G8sAT)KLHc002ovPDHLkV1l0VW$^$2 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs new file mode 100644 index 0000000000..f320330c03 --- /dev/null +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -0,0 +1,1305 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using CalamityMod.NPCs.StormWeaver; +using CalamityMod.NPCs.SupremeCalamitas; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + #region Mage Projectiles + + #region Main Fireball + class ProfanedCrystalMageFireball : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Bab Fireball"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + private void Split(bool hit) + { + Player player = Main.player[projectile.owner]; + bool enrage = player.statLife <= (int)((double)player.statLifeMax2 * 0.5); + player.Calamity().rollBabSpears(hit ? 1 : 0); + int outerSplits = enrage ? 20 : 10; + int innerSplits = enrage ? 16 : 8; + float mult = enrage ? 0.4f : 0.6f; + if (!hit) + mult = enrage ? 0.2f : 0.1f; //punishing to miss + int damage = (int)((projectile.damage * 0.2f) * mult); + + float outerAngleVariance = MathHelper.TwoPi / (float)outerSplits; + float outerOffsetAngle = MathHelper.Pi / (2f * outerSplits); + float innerAngleVariance = MathHelper.TwoPi / (float)innerSplits; + float innerOffsetAngle = MathHelper.Pi / (2f * innerSplits); + Vector2 outerPosVec = new Vector2(8f, 0f).RotatedByRandom(MathHelper.TwoPi); + Vector2 innerPosVec = new Vector2(5f, 0f).RotatedByRandom(MathHelper.TwoPi); //Two vector variables since they get reassigned during the loop + + for (int i = 0; i < outerSplits; i++) //use outer since it has the higher number regardless + { + outerPosVec = outerPosVec.RotatedBy(outerAngleVariance); + Vector2 velocity = new Vector2(outerPosVec.X, outerPosVec.Y).RotatedBy(outerOffsetAngle); + velocity.Normalize(); + velocity *= 8f; + int proj = Projectile.NewProjectile(projectile.Center + outerPosVec, velocity, ModContent.ProjectileType(), damage, projectile.knockBack, projectile.owner, 0f, 0f); + if (proj != -1) + Main.projectile[proj].Calamity().forceMinion = true; + if (innerSplits > 0) //only runs if there's still inner splits to create + { + innerPosVec = innerPosVec.RotatedBy(innerAngleVariance); + velocity = new Vector2(innerPosVec.X, innerPosVec.Y).RotatedBy(innerOffsetAngle); + velocity.Normalize(); + velocity *= 5f; + proj = Projectile.NewProjectile(projectile.Center + innerPosVec, velocity, ModContent.ProjectileType(), damage, projectile.knockBack, projectile.owner, 0f, 0f); + if (proj != -1) + Main.projectile[proj].Calamity().forceMinion = true; + } + innerSplits--; + } + + } + + public override void SetDefaults() + { + projectile.width = 180; + projectile.height = 180; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.timeLeft = 75; + projectile.minion = true; + projectile.scale = 0.6f; + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + if (projectile.timeLeft == 50) + { + projectile.tileCollide = true; + } + if (projectile.wet && !projectile.lavaWet && projectile.timeLeft < 70) //timeleft check because projectile lavawet isn't set until after the first frame + { + projectile.Kill(); + } + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } + if (projectile.velocity.X < 0f) + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + else + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + return false; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 20, 4, 0); + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(250, 150, 0, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture2D13 = Main.projectileTexture[projectile.type]; + int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y6 = num214 * projectile.frame; + Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.myPlayer == projectile.owner) + { + Split(true); + } + projectile.active = false; + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (Main.myPlayer == projectile.owner) + { + Split(true); + } + projectile.active = false; + } + + public override void Kill(int timeLeft) + { + if (Main.myPlayer == projectile.owner) + { + Split(false); + } + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); + for (int num193 = 0; num193 < 6; num193++) + { + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 50, default, 1.5f); + } + for (int num194 = 0; num194 < 60; num194++) + { + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 0, default, 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 50, default, 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + } + } + #endregion + + #region Fireball Split + class ProfanedCrystalMageFireballSplit : ModProjectile + { + private int damage; + private int hits = 0; + private NPC target = null; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Bab Fire"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 26; + projectile.height = 26; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.extraUpdates = 1; + projectile.timeLeft = 600; + projectile.minion = true; + projectile.gfxOffY = -25f; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + return true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 5, 1, 0); + if (projectile.timeLeft == 600) + { + damage = projectile.damage; + projectile.damage = 0; + + } + if (projectile.timeLeft > 550) + projectile.velocity *= 0.95f; + int num469 = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; + + + if (projectile.timeLeft <= 550) + { + if (projectile.penetrate == -1) + projectile.damage = damage; + projectile.penetrate = 1; + if (projectile.timeLeft > 500) + projectile.velocity *= 1.06f; + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 3000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + target = ownerMinionAttackTargetNPC2; + } + } + if (!flag19) + { + int num3; + for (int num542 = 0; num542 < Main.npc.Length; num542 = num3 + 1) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + target = Main.npc[num542]; + } + } + num3 = num542; + } + } + if (flag19) + { + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(35); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(35); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (hits > 0) + { + damage -= (int)(damage * (0.1f * (hits / 10))); //loses 10% damage per 10 hits + } + } + + public override bool? CanHitNPC(NPC target) + { + bool instakill = target.type == ModContent.NPCType() || target.type == ModContent.NPCType() || target.type == ModContent.NPCType() + || target.type == ModContent.NPCType() || target.type == ModContent.NPCType() || target.type == ModContent.NPCType(); + if (!instakill && this.target != null && target != this.target) + { + if (projectile.getRect().Intersects(target.getRect())) + { + hits++; + if (hits >= 100) + projectile.Kill(); + } + return false; + } + return null; + } + + public override void Kill(int timeLeft) + { + + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = projectile.height = 200; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 4; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + + } + } + } + #endregion + + #endregion + + #region Melee Projectile + public class ProfanedCrystalMeleeSpear : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Friendly Spear"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = 1; + projectile.timeLeft = 50; + projectile.minion = true; + projectile.alpha = 100; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + projectile.velocity *= 1.06f; + projectile.rotation = projectile.velocity.ToRotation() + 1.57079637f; + Lighting.AddLight(projectile.Center, 5, 1, 0); + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + if (projectile.timeLeft == 50 && projectile.ai[1] == 1f) + projectile.penetrate = 3; + return true; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(projectile.localAI[0]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + projectile.localAI[0] = reader.ReadSingle(); + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.timeLeft > 133 && projectile.ai[0] < 2f) + return false; + return null; + } + + public override bool CanHitPvp(Player target) + { + return projectile.timeLeft <= 133 || projectile.ai[0] == 2f; + } + + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.ai[0] == 1f && projectile.penetrate == 1) + { + handleSpecialHit(target.Center); + } + int chance = projectile.ai[0] == 2f ? 20 : 10 * projectile.penetrate; + Main.player[projectile.owner].Calamity().rollBabSpears(chance); + } + + public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) + { + if (projectile.ai[0] == 1f && projectile.penetrate == 1) + { + handleSpecialHit(target.Center); + } + int chance = projectile.ai[0] == 2f ? 20 : 10 * projectile.penetrate; + Main.player[projectile.owner].Calamity().rollBabSpears(chance); + } + + private void handleSpecialHit(Vector2 targCenter) + { + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 10; ++i) + { + float startDist = Main.rand.NextFloat(450f, 500f); + Vector2 startDir = Main.rand.NextVector2Unit(); + Vector2 startPoint = targCenter + (startDir * startDist); + + float speed = Main.rand.NextFloat(15f, 18f); + Vector2 velocity = startDir * (-speed); + Projectile.NewProjectile(startPoint, velocity, ModContent.ProjectileType(), (int)(0.25f * projectile.damage), 0f, projectile.owner, 2f, 0f); + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + if (projectile.timeLeft > 133) + { + projectile.localAI[0] += 5f; + byte b2 = (byte)(((int)projectile.localAI[0]) * 3); + byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); + return new Color((int)b2, (int)b2, (int)b2, (int)a2); + } + return new Color(255, 255, 255, projectile.alpha); + } + } + #endregion + + #region Ranger Projectiles + + #region Meteors + public class ProfanedCrystalRangedHuges : ModProjectile + { + bool boomerSwarm = false; + bool kill = false; + NPC target = null; + + private void swarmAI() + { + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 2000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + target = ownerMinionAttackTargetNPC2; + } + } + if (!flag19) + { + for (int num542 = 0; num542 < Main.npc.Length; num542++) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + target = Main.npc[num542]; + } + } + } + } + if (flag19) + { + projectile.tileCollide = false; + if (projectile.timeLeft < 20) + { + projectile.timeLeft = 50; + kill = true; + } + + float num550 = 40f; + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + + } + else + { + if (kill) + projectile.Kill(); + projectile.tileCollide = true; + } + } + + private void swarm(Vector2 targetPos) + { + if (projectile.owner == Main.myPlayer) + { + float swarmAmount = Main.rand.Next(6, 10); //6-9 + for (float i = 0; i < swarmAmount; i++) + { + float x = targetPos.X + Main.rand.Next(-500, 501); + float y = targetPos.Y - 500 + Main.rand.Next(-200, 1); + Vector2 pos = new Vector2(x, y); + Vector2 correctedVelocity = projectile.position - pos; + correctedVelocity.Normalize(); + correctedVelocity *= 25f; + int proj = Projectile.NewProjectile(pos, correctedVelocity, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.5f), projectile.knockBack, projectile.owner, 2); + Main.projectile[proj].Calamity().forceMinion = true; + ((ProfanedCrystalRangedHuges)Main.projectile[proj].modProjectile).boomerSwarm = true; + } + } + } + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Bab Boomer"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + Main.projFrames[projectile.type] = 3; + } + + public override void SetDefaults() + { + projectile.width = 60; + projectile.height = 50; + projectile.friendly = true; + //projectile.minion = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.extraUpdates = 1; + projectile.penetrate = 1; + projectile.timeLeft = 175; + projectile.localNPCHitCooldown = -1; + projectile.usesLocalNPCImmunity = true; + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + bool begin = projectile.timeLeft == 175; + if (projectile.ai[0] >= 1 && begin) + { + projectile.scale = 1.5f; + projectile.width += 25; + projectile.height += 25; + boomerSwarm = projectile.ai[0] == 2; + if (boomerSwarm && projectile.ai[1] == 0f) + { + projectile.timeLeft = 200; + projectile.ai[1] = 1f; + } + } + return true; + } + + public override void AI() + { + if (projectile.timeLeft == 175 && projectile.scale == 1.5f) + Main.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, projectile.Center); + + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 2) + { + projectile.frame = 0; + } + if (projectile.timeLeft == 145 && projectile.ai[0] < 2f) + { + projectile.tileCollide = true; + } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + projectile.velocity *= boomerSwarm ? 1.03f : 1.02f; + + Lighting.AddLight(projectile.Center, 0.7f, 0.3f, 0f); + if (boomerSwarm) + swarmAI(); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override bool? CanHitNPC(NPC target) + { + bool instakill = target.type == ModContent.NPCType() || target.type == ModContent.NPCType() || target.type == ModContent.NPCType() + || target.type == ModContent.NPCType() || target.type == ModContent.NPCType() || target.type == ModContent.NPCType(); + if (!instakill && this.target != null && target != this.target) + return false; + return null; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(projectile.ai[0] == 1f ? 1 : 10); + if (projectile.scale == 1.5f && projectile.ai[0] != 2f) + swarm(target.Center); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(projectile.scale == 1.5f ? 1 : 10); + if (projectile.scale == 1.5f && projectile.ai[0] != 2f) + swarm(target.Center); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = projectile.height = 200; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 4; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } + if (projectile.scale != 1.5f) + return; + for (int num625 = 0; num625 < 3; num625++) + { + float scaleFactor10 = 0.33f; + if (num625 == 1) + { + scaleFactor10 = 0.66f; + } + if (num625 == 2) + { + scaleFactor10 = 1f; + } + int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + Gore gore = Main.gore[num626]; + gore.velocity *= scaleFactor10; + gore.velocity.X += 1f; + gore.velocity.Y += 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X -= 1f; + gore.velocity.Y += 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X += 1f; + gore.velocity.Y -= 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X -= 1f; + gore.velocity.Y -= 1f; + } + } + } + #endregion + + #region Fireballs + + public class ProfanedCrystalRangedSmalls : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Bab Boomer Orb"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.scale = 1.5f; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = 1; + projectile.timeLeft = 240; + //projectile.minion = true; + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + return true; + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + if (projectile.ai[0] == 0f) { + } + projectile.velocity.X *= 1.01f; + projectile.velocity.Y *= 1.01f; + if (projectile.timeLeft == 210) + projectile.tileCollide = true; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(250, 150, 0, projectile.alpha); + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.ai[0] == 1f && projectile.timeLeft > 210) + return false; + return null; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + if (!Main.rand.NextBool(3)) //1 in 3 chance for dust + return; + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 50; + projectile.height = 50; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 10; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 15; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 247, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(50); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(50); + } + } + + #endregion + + #endregion + + #region Rogue Projectile + + public class ProfanedCrystalRogueShard : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Holy Bab Crystal Shard"); + } + + public override void SetDefaults() + { + projectile.width = 34; + projectile.height = 34; + projectile.friendly = true; + projectile.alpha = 255; + projectile.penetrate = 1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.timeLeft = 150; + projectile.minion = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; + projectile.scale = 0.8f; + } + + private void ai() + { + if (projectile.timeLeft > 90) + { + projectile.rotation += 1f; + projectile.velocity.X *= 0.985f; + projectile.velocity.Y *= 0.985f; + } + else + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; + if (projectile.spriteDirection == -1) + { + projectile.rotation -= 1.57f; + } + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 2000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + } + } + if (!flag19) + { + int num3; + for (int num542 = 0; num542 < 200; num542 = num3 + 1) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + } + } + num3 = num542; + } + } + if (flag19) //target found + { + if (Main.rand.NextBool()) + projectile.timeLeft++; + projectile.tileCollide = false; + float num550 = 40f; + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + + } + else + { + projectile.tileCollide = true; + } + } + + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(projectile.localAI[0]); + writer.Write(projectile.localAI[1]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + projectile.localAI[0] = reader.ReadSingle(); + projectile.localAI[1] = reader.ReadSingle(); + } + + public override bool PreAI() + { + projectile.Calamity().overridesMinionDamagePrevention = true; + return true; + } + + public override void AI() + { + ai(); + Color newColor2 = Main.hslToRgb(projectile.ai[0], 1f, 0.5f); + if (projectile.alpha > 0) + { + projectile.alpha -= 8; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + if (projectile.alpha == 0) + { + Lighting.AddLight(projectile.Center, newColor2.ToVector3() * 0.5f); + } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; + int num3; + for (int num979 = 0; num979 < 2; num979 = num3 + 1) + { + if (Main.rand.NextBool(10)) + { + Vector2 value55 = Vector2.UnitY.RotatedBy((double)((float)num979 * 3.14159274f), default).RotatedBy((double)projectile.rotation, default); + Dust dust24 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)]; + dust24.noGravity = true; + dust24.noLight = true; + dust24.scale = projectile.Opacity * projectile.localAI[0]; + dust24.position = projectile.Center; + dust24.velocity = value55 * 2.5f; + } + num3 = num979; + } + for (int num980 = 0; num980 < 2; num980 = num3 + 1) + { + if (Main.rand.NextBool(10)) + { + Vector2 value56 = Vector2.UnitY.RotatedBy((double)((float)num980 * 3.14159274f), default); + Dust dust25 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)]; + dust25.noGravity = true; + dust25.noLight = true; + dust25.scale = projectile.Opacity * projectile.localAI[0]; + dust25.position = projectile.Center; + dust25.velocity = value56 * 2.5f; + } + num3 = num980; + } + if (Main.rand.NextBool(10)) + { + float scaleFactor13 = 1f + Main.rand.NextFloat() * 2f; + float fadeIn = 1f + Main.rand.NextFloat(); + float num981 = 1f + Main.rand.NextFloat(); + Vector2 vector136 = Utils.RandomVector2(Main.rand, -1f, 1f); + if (vector136 != Vector2.Zero) + { + vector136.Normalize(); + } + vector136 *= 20f + Main.rand.NextFloat() * 100f; + Vector2 vector137 = projectile.Center + vector136; + Point point3 = vector137.ToTileCoordinates(); + bool flag52 = true; + if (!WorldGen.InWorld(point3.X, point3.Y, 0)) + { + flag52 = false; + } + if (flag52 && WorldGen.SolidTile(point3.X, point3.Y)) + { + flag52 = false; + } + if (flag52) + { + Dust dust26 = Main.dust[Dust.NewDust(vector137, 0, 0, 267, 0f, 0f, 127, newColor2, 1f)]; + dust26.noGravity = true; + dust26.position = vector137; + dust26.velocity = -Vector2.UnitY * scaleFactor13 * (Main.rand.NextFloat() * 0.9f + 1.6f); + dust26.fadeIn = fadeIn; + dust26.scale = num981; + dust26.noLight = true; + Dust dust27 = Dust.CloneDust(dust26); + Dust dust = dust27; + dust.scale *= 0.65f; + dust = dust27; + dust.fadeIn *= 0.65f; + dust27.color = new Color(255, 255, 255, 255); + } + } + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.timeLeft > 90) + return false; + return null; + } + + public override bool CanHitPvp(Player target) + { + return projectile.timeLeft <= 90; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Main.player[projectile.owner].Calamity().rollBabSpears(projectile.ai[0] == 0f ? 0 : 10); + } + + public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) + { + Main.player[projectile.owner].Calamity().rollBabSpears(projectile.ai[0] == 0f ? 0 : 10); + } + + + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); + Vector2 spinningpoint = new Vector2(0f, -3f).RotatedByRandom(3.1415927410125732); + float num69 = (float)Main.rand.Next(7, 13); + Vector2 value5 = new Vector2(2.1f, 2f); + Color newColor = Main.hslToRgb(projectile.ai[0], 1f, 0.5f); + newColor.A = 255; + float num72; + for (float num70 = 0f; num70 < num69; num70 = num72 + 1f) + { + int num71 = Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f); + Main.dust[num71].position = projectile.Center; + Main.dust[num71].velocity = spinningpoint.RotatedBy((double)(6.28318548f * num70 / num69), default) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f); + Main.dust[num71].noGravity = true; + Main.dust[num71].scale = 2f; + Main.dust[num71].fadeIn = Main.rand.NextFloat() * 2f; + Dust dust11 = Dust.CloneDust(num71); + Dust dust = dust11; + dust.scale /= 2f; + dust = dust11; + dust.fadeIn /= 2f; + dust11.color = new Color(255, 255, 255, 255); + num72 = num70; + } + for (float num73 = 0f; num73 < num69; num73 = num72 + 1f) + { + int num74 = Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f); + Main.dust[num74].position = projectile.Center; + Main.dust[num74].velocity = spinningpoint.RotatedBy((double)(6.28318548f * num73 / num69), default) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f); + Dust dust = Main.dust[num74]; + dust.velocity *= Main.rand.NextFloat() * 0.8f; + dust.noGravity = true; + dust.scale = Main.rand.NextFloat() * 1f; + dust.fadeIn = Main.rand.NextFloat() * 2f; + Dust dust12 = Dust.CloneDust(num74); + dust = dust12; + dust.scale /= 2f; + dust = dust12; + dust.fadeIn /= 2f; + dust12.color = new Color(255, 255, 255, 255); + num72 = num73; + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); + } + } + + #endregion + + #region Bab Spears + + class MiniGuardianSpear : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bab Spear"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = 1; + projectile.alpha = 100; + projectile.timeLeft = 300; + projectile.extraUpdates = 1; + projectile.minion = true; + projectile.scale = 0.9f; + } + + public override void AI() + { + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; + if (projectile.timeLeft == 300) + { + projectile.velocity *= 0.01f; + } + else if (projectile.timeLeft > 250) + { + projectile.velocity *= 1.1f; + } + else if (projectile.timeLeft == 250) + { + projectile.velocity *= 5f; + } + if (projectile.timeLeft <= 250) + { + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 3000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + } + } + if (!flag19) + { + for (int num542 = 0; num542 < Main.npc.Length; num542++) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + } + } + } + } + if (flag19) + { + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + } + } + } + projectile.rotation = projectile.velocity.ToRotation() + 1.57079637f; + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.timeLeft > 250) + return false; + return null; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + if (Main.rand.NextBool(3)) + { + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = projectile.height = 200; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 4; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + + } + } + } + } + + #endregion +} From 7ad7bc3661691f97bb0fe3a96ed63c26788a7921 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 05:50:50 +0000 Subject: [PATCH 10/40] removed redundant comment --- Items/Accessories/ProfanedSoulCrystal.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 4546703dfe..03770bf427 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -104,7 +104,6 @@ namespace CalamityMod.Items.Accessories modPlayer.pArtifact = true; modPlayer.profanedCrystal = true; - //modPlayer.rDevil = false; if (hideVisual) modPlayer.profanedCrystalHide = true; From 127bcd9cc42b45278e6a9b2f3d61af445649b656 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 11:01:29 +0000 Subject: [PATCH 11/40] small drawing tweak for psc --- CalPlayer/CalamityPlayer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 64e4c58415..fffb177cc2 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5901,6 +5901,7 @@ namespace CalamityMod.CalPlayer player.wingFrame = profanedCrystalWingCounter.Key; profanedCrystalWingCounter = new KeyValuePair(profanedCrystalWingCounter.Key, profanedCrystalWingCounter.Value - 1); + player.armorEffectDrawOutlines = true; if (profanedCrystalBuffs) { player.armorEffectDrawShadow = true; From be34909676f902066a3ec3f2396a7e48789948a8 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 12:13:20 +0000 Subject: [PATCH 12/40] fixed aftertrail issue + made ranged meteors easier to notice --- Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index f320330c03..09dffb60fb 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -117,7 +117,9 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - Lighting.AddLight(projectile.Center, 20, 4, 0); + int num469 = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; } public override Color? GetAlpha(Color lightColor) @@ -131,7 +133,6 @@ namespace CalamityMod.Projectiles.Summon int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; int y6 = num214 * projectile.frame; Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); return false; } @@ -657,7 +658,9 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity *= boomerSwarm ? 1.03f : 1.02f; - Lighting.AddLight(projectile.Center, 0.7f, 0.3f, 0f); + int num469 = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; if (boomerSwarm) swarmAI(); } From a36d1b54f5dd532802fab70dc358f7899eb4f178 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 15:18:54 +0000 Subject: [PATCH 13/40] Added Snow Ruffian armour set. --- CalPlayer/CalamityPlayer.cs | 21 ++++- CalamityMod.cs | 2 + Items/Armor/SnowRuffianChestplate.cs | 43 +++++++++ Items/Armor/SnowRuffianChestplate.png | Bin 0 -> 603 bytes Items/Armor/SnowRuffianChestplate_Arms.png | Bin 0 -> 1840 bytes Items/Armor/SnowRuffianChestplate_Body.png | Bin 0 -> 4418 bytes Items/Armor/SnowRuffianGreaves.cs | 43 +++++++++ Items/Armor/SnowRuffianGreaves.png | Bin 0 -> 456 bytes Items/Armor/SnowRuffianGreaves_Legs.png | Bin 0 -> 2124 bytes Items/Armor/SnowRuffianMask.cs | 97 +++++++++++++++++++++ Items/Armor/SnowRuffianMask.png | Bin 0 -> 497 bytes Items/Armor/SnowRuffianMask_Head.png | Bin 0 -> 1159 bytes Items/Armor/SnowRuffianWings.png | Bin 0 -> 2714 bytes 13 files changed, 202 insertions(+), 4 deletions(-) create mode 100644 Items/Armor/SnowRuffianChestplate.cs create mode 100644 Items/Armor/SnowRuffianChestplate.png create mode 100644 Items/Armor/SnowRuffianChestplate_Arms.png create mode 100644 Items/Armor/SnowRuffianChestplate_Body.png create mode 100644 Items/Armor/SnowRuffianGreaves.cs create mode 100644 Items/Armor/SnowRuffianGreaves.png create mode 100644 Items/Armor/SnowRuffianGreaves_Legs.png create mode 100644 Items/Armor/SnowRuffianMask.cs create mode 100644 Items/Armor/SnowRuffianMask.png create mode 100644 Items/Armor/SnowRuffianMask_Head.png create mode 100644 Items/Armor/SnowRuffianWings.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index fffb177cc2..3af466213f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -454,6 +454,7 @@ namespace CalamityMod.CalPlayer // Armor Set + public bool snowRuffianSet = false; public bool eskimoSet = false; //vanilla armor public bool meteorSet = false; //vanilla armor, for space gun nerf public bool victideSet = false; @@ -1285,6 +1286,8 @@ namespace CalamityMod.CalPlayer astralStarRain = false; + snowRuffianSet = false; + eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf @@ -1815,6 +1818,7 @@ namespace CalamityMod.CalPlayer ataxiaFire = false; ataxiaVolley = false; ataxiaBlaze = false; + snowRuffianSet = false; eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf victideSet = false; @@ -5882,10 +5886,19 @@ namespace CalamityMod.CalPlayer public override void FrameEffects() { - bool psc = false; - if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide) + if (snowRuffianSet) + { + player.wings = mod.GetEquipSlot("SnowRuffWings", EquipType.Wings); + bool falling = player.gravDir == -1 ? player.velocity.Y < 0.05f : player.velocity.Y > 0.05f; + if (player.controlJump && falling) + { + player.velocity.Y *= 0.9f; + player.wingFrame = 3; + } + + } + else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide) { - psc = true; player.legs = mod.GetEquipSlot("ProviLegs", EquipType.Legs); player.body = mod.GetEquipSlot("ProviBody", EquipType.Body); player.head = mod.GetEquipSlot("ProviHead", EquipType.Head); @@ -5935,7 +5948,7 @@ namespace CalamityMod.CalPlayer player.body = mod.GetEquipSlot("SirenBodyAlt", EquipType.Body); player.head = mod.GetEquipSlot("SirenHeadAlt", EquipType.Head); } - else if (!psc) + else { if (profanedCrystalWingCounter.Key != 1) profanedCrystalWingCounter = new KeyValuePair(1, 7); diff --git a/CalamityMod.cs b/CalamityMod.cs index 20ab91bce5..ef8c893c17 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -88,6 +88,7 @@ using Terraria.ModLoader; using Terraria.ModLoader.Config; using Terraria.UI; using CalamityMod.Projectiles.Summon; +using CalamityMod.Items.Armor; namespace CalamityMod { @@ -268,6 +269,7 @@ namespace CalamityMod AddEquipTexture(new ProfanedCrystalLegs(), null, EquipType.Legs, "ProviLegs", "CalamityMod/Items/Accessories/ProfanedSoulTransLegs"); AddEquipTexture(new ProfanedCrystalWings(), null, EquipType.Wings, "ProviWings", "CalamityMod/Items/Accessories/Wings/ProfanedSoulTransWings"); + AddEquipTexture(new SnowRuffianWings(), null, EquipType.Wings, "SnowRuffWings", "CalamityMod/Items/Armor/SnowRuffianWings"); AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus"); AstralCactusGlowTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactusGlow"); diff --git a/Items/Armor/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffianChestplate.cs new file mode 100644 index 0000000000..74a50440d3 --- /dev/null +++ b/Items/Armor/SnowRuffianChestplate.cs @@ -0,0 +1,43 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Body)] + class SnowRuffianChestplate : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Snow Ruffian Chestplate"); + Tooltip.SetDefault("3% increased rogue critical strike chance"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 0, 75, 0); + item.rare = 1; + item.defense = 2; //4 + } + + public override void UpdateEquip(Player player) + { + player.Calamity().throwingCrit += 3; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SnowBlock, 30); + recipe.AddIngredient(ItemID.IceBlock, 15); + recipe.AddIngredient(ItemID.BorealWood, 45); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/SnowRuffianChestplate.png b/Items/Armor/SnowRuffianChestplate.png new file mode 100644 index 0000000000000000000000000000000000000000..5c989b094f88f72ab1768f52ee5dac551eecfe72 GIT binary patch literal 603 zcmV-h0;K(kP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00F5}VE#!t>yne#71V%4>kGW zgBnQNbwxI}oVWZty8?jbL*A@bqZksyE7J zGbvB5uoGy~0Qj7>CH-t@a--^2?Z<|Ov^X&-0OIHc0O^hZ(CevNEWJHmC|8EwI_9>? z>)Yg6&-C9kHtq?4PT&J@eR($2mp<{JMzf9pc literal 0 HcmV?d00001 diff --git a/Items/Armor/SnowRuffianChestplate_Arms.png b/Items/Armor/SnowRuffianChestplate_Arms.png new file mode 100644 index 0000000000000000000000000000000000000000..f3b23cdc8affa633e8236f3e2c700a95882f54c0 GIT binary patch literal 1840 zcma)6dsvcZ8-M*|8fCdp=USzoeT&4ViACk9^qXa#4 zr4ceK50xnD0uvC8RbyNY51475D^mo8Ou$56-K(u@`}2FB_j>Q=x}W#CfA{Y`6$J%& zZr{3lD*yo7y}eGIg`_nA!0=lPpdFp}2?Y`cF}|Lsfc1@aLvWi4DMa3xh`+biDsQcJJ<+PAtctz~bbab7{&UauQosJ@Rid)YxGUt?YW z9HLnzU@*vNes#}z$@Tn&Cmmz&rs*`6J^?o^m)yuMG$-*qplqSD- zGw{2qPTgv8!AvwOK6d~)(fvn&SJS~N2=NFG*u5} zty8)98QlMoS##gS>X9_ZKQyo zNyvyCOn3Q8RlcH_SKQLSfD*oQLXl6DOlg-0MCd3v*`hug8=E`7|1({AwnjI>Qn*@? zax%h*kYA3=>xfy!xVT?50xs@_!Urtw>OdbIjBE-5$C}1n8h;!$c5{`j{8Y?Jqok|? zOG||8_J`50ftkbYp-bAw^d$<9`zCwVtiG3!S9#q-#hP|8K23fY!gLk(>1VIJl+-Qb zUO<179-oM$^3~(ned(`p? zJN;7Je^|fK^~(*nfNQ?3znzYruqsI^#!xCLYG*O-B$-Z)&Y`QpHl)zY4)j;bh99Z& z131g@dhz3A$rUd<-HzbFN(TpFr&A^At?b3GqG0~^4bqI*3#qNfCkcCE(@e}s$)#79 zLiX=$2uyh!V(#s+Sc6GDw`gKiN8L7nY*#Dr)&j!_4g6o5ZUCiR@};F)D#Wdjh8#}X z+wZf6>Cc~!+3?mwHShqXM1Ay!TOXCTjT|X+k6x7Rb-InHEwbaUL}}o04)*)*)~Hmd zclijyR;qyHq0ax3Bg7Ei0|+ zY`meU^>cAM51Ss7pn-onAwI^r=;F8$1N&;Bi$A%G7MXy}#b`3`lTDP)aYSP7F`T-7)mf#>H z{@j#x70s^1ALQ5OYfX$u=zX)2DJflC=Kzfo=y`BmCPApF6U7N?i z*ZI?D+!w7Yr_b0)Y9g+Ca*vdy#{cKF^!WSA#QUq`Oh{<10an~UbruB) z;a9jTXsF}DGAZ>SY)09`rsEHSG`T5k(=Hw%pyhAC&?2DQ|G@vhyvqHN?P?Nc$u%(b z<8QOHh$b?giPUCGZ1CT3g{={d3AQ@H>z@s*4OPKr5-9BI$HY0W=!>lr$zB zP4ilT%Oys#c{8K^JCWf@U}yN{v=mmS-`8%!r@YPTo{>Mv&oHgxqf8qDKYpLg3iNU< z6IWv+=<&Og(?qZ@;C63;#?25v>Uf(&a2OwMAfV}e$Oi!Y?}v5ZxnZB)n}T8-WWa>z lfrDP})6RjZ@#hJ|bHw;$0&plFH>cV#@9hzAisg>a`x89&pyvPp literal 0 HcmV?d00001 diff --git a/Items/Armor/SnowRuffianChestplate_Body.png b/Items/Armor/SnowRuffianChestplate_Body.png new file mode 100644 index 0000000000000000000000000000000000000000..d6fd5e3c0d8a43fc51bca743c35d1da4ab8295df GIT binary patch literal 4418 zcmZu!3s_Rw+U877ja{Z0tuZsRlXxjd&9F#K9V;WerGt7**v0IkrUmTTUKjqA{wMhoHM=>h;e!LC|7`J<-)uLNJnJ^;0A zlTg#y5`M_n697mx1pqQH0RRfkr_7H4z_}d&z+@-@V1F9`&^ueyczCa7V0oB39ANEzeJzuS)T(09t(J;9?Hr?S63eU39pyUxwTh zGFd1-c>}Juuynla{hu#|*^WbGYPP?QW+i|vC!inmR_R&0<4ms@;3&02#a@yn5G(%x zt|c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ffianGreaves.cs new file mode 100644 index 0000000000..bddc78ce5f --- /dev/null +++ b/Items/Armor/SnowRuffianGreaves.cs @@ -0,0 +1,43 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Legs)] + class SnowRuffianGreaves : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Snow Ruffian Greaves"); + Tooltip.SetDefault("5% increased movement speed"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 0, 75, 0); + item.rare = 1; + item.defense = 1; //4 + } + + public override void UpdateEquip(Player player) + { + player.moveSpeed += 0.05f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SnowBlock, 20); + recipe.AddIngredient(ItemID.IceBlock, 10); + recipe.AddIngredient(ItemID.BorealWood, 30); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/SnowRuffianGreaves.png b/Items/Armor/SnowRuffianGreaves.png new file mode 100644 index 0000000000000000000000000000000000000000..dd0aefbb4dbad41bfefb7393f92175cf70eefd31 GIT binary patch literal 456 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g!!3HGbRrPd%6id3JuOkD)#(wTUiL5|AV{wqX z6T`Z5GB1G~g=CK)Uj~LMH3o);76yi2K%s^g3=E|P3=FRl7#OT(FffQ0%-I!a1C(G( z@^*J&_z!{$_AZ|cG)c_U#WBR<^xi2O{g@m@T+h#ly&x*W=_qpTkbqW>#)c34f0*ni z$}gPI>3TWGAB24yQ`-%%xbk{Sg*X&-fc6>1EUkn0hUvLJ$TH}aQ@|u6NT~_&9F4y?#e#h zxzGC|?sxj$JH^Xb(U-FR{`$Ay_h-4?{VOZJDVrfq&B$^)Z>mYml;#rA$m+>^Ci~rs z{CGikR=s&v2nyAjr1x*Zqt8xXiwlzjL=%`j>C1{Ev}wvG?S# vw%3<|VJ1}K8UaL}ZdU$9nW=dti6xo&c?^av5pUiDWf?qO{an^LB{Ts5M9{IQ literal 0 HcmV?d00001 diff --git a/Items/Armor/SnowRuffianGreaves_Legs.png b/Items/Armor/SnowRuffianGreaves_Legs.png new file mode 100644 index 0000000000000000000000000000000000000000..19fb8e856336855540eaaf62060a8178a7e88a3e GIT binary patch literal 2124 zcmZ`)3s6&68jdYR2r{iamE5{A5NPcr;-G(6 z&V*8Y1Z^E@D|lBolCraN4ae*@k-+1==98 zDkN|5wN@?$(|Hn!5kuBs<>9rAC1s11TgF~ZanV}!3s`8R6M|u5A4J}qZOV{$`Q*vB zi|fcWFdw#?;g-fyk5es_LJWIy@2T~L!afzPzmPZIS8RUB!ylT-F}0sf7|t7MhRhtv z=8ZqU4pF9kF)gp5RgM?T@>+52Y)Zu_1Yx0#A^*yIWi&Q5wO_Qbcme-@K^>>GV(Ag_ z>eo^IkaZtY2gQ0#3wx_!R+l9xcLMb8pC6xo+}%ef;sp@SM6QZUrHCdHB>SsjlT{zW zSK~n6S*lvQfuWB9WO@7%TUt~w?IFJ z7#`lDLvwiV7A}jBF8-M>_WZ$XPF4%5AqL{2PWnRFKJuQxZdm}|PzkNINpqI#@^07X zkyi5tUD}l+DQSxLWQs2oR(C)>qYHDPvM@^=yggQh8ks_Mf+OfYR&HXm;PDP<)i8R{ zT1c<=P8K}%?Vd)H8_3AdSI=5!#f_lAwmg*Wan~<~O4Bpa&VGtX*VWZUF$8{CO4WU$ z2qlW4WPKgr6hQ!2++Ttkd8pQb!MbazG2>_C@mIBTEDKs(BFiP=6s|;k$8*y|3X0UN zi;Y2JPd~K7kgJ+tq3_Msdg7hYbKp-_apQms-kExEN6}e02?b#WKX8<2rsWM87?-Q2y zKfmiHT6BtvICTOb>c5J#^U(tWwDlAGY>)Au=ZVjSm`d2>JQ0e4x6S$9X#_m*q_1mJ zIKiN?)TrV7^rvGS-lL)h4@1C=Q_58}S24zbCa7hX=f@}U!lcNEYmk{Y98d06#8J7! zIq~ujOse<}qgC8%KfC4lu6ovlOOA}Y)l??9Zb(FUbo*~#GF!8n%ErD2v_RgVptRm_ zQVuNh108=&PaH3>Zv0*ulOe4KLW(;8%wFFLe?msDz2XTia-pSxyJ= zf?J1vYjUvBB;OpHY@A?#%W)*;sRHM)WpG8c5jDaq0kl2DfP_0ycCM1R@XB_~Hy8tl zp}Vi1rZ{r=@(G82Wof32|5Bqk8!U=pt37OY6C@=CYP+^?e{prSi!^#s{}pn{_oLVInsKUJ-h>vZ&j~ogXAcz6o_v9+&wJb}`I5!!5{FnT%G265Cty8;ojd`S6KbyvdqyzF( zOD7p0DSv)Rf?`2ug|@Wo@!*K^7*Z~mYI5pORs^ms<;McN_;FLZWCdaN&@E@(@x$|B{~G+@Ly>G>jNrBwj2R&%9l*8>OX+b39Ua5TQS+25y$3KNhJ6X9id5 z`u{ER>s3N`$q6{QMi$scmUQfQM0C=cSnqG26KjFqp}|5BK>vdvgsh&}zKV>#l^*DQ z4;^~W1!!QDN~!Vpv>nl7=M_9^B7>Qsr?UZ1+<7o+$1uC1O+DVMU?PQS() && legs.type == ModContent.ItemType(); + } + + public override void UpdateArmorSet(Player player) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.snowRuffianSet = true; + modPlayer.rogueStealthMax += 0.5f; + player.setBonus = "5% increased rogue damage\n" + + "You can glide to negate fall damage\n" + + "Rogue stealth builds while not attacking and not moving, up to a max of 50\n" + + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().wearingRogueArmor = true; + if (player.controlJump) + { + player.noFallDmg = true; + player.UpdateJumpHeight(); + if (shouldBoost) + { + player.velocity.X *= 1.3f; + shouldBoost = false; + } + + } + else if (!shouldBoost && player.velocity.Y == 0) + { + shouldBoost = true; + } + } + + public override void UpdateEquip(Player player) + { + player.Calamity().throwingDamage += 0.02f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SnowBlock, 10); + recipe.AddIngredient(ItemID.IceBlock, 5); + recipe.AddIngredient(ItemID.BorealWood, 15); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } + public class SnowRuffianWings : EquipTexture + { + public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) + { + ascentWhenFalling = 0.5f; + ascentWhenRising = 0f; + maxCanAscendMultiplier = 0f; + maxAscentMultiplier = 0f; + constantAscend = 0f; + } + + public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) + { + speed = 2f; + acceleration *= 1.25f; + } + } +} diff --git a/Items/Armor/SnowRuffianMask.png b/Items/Armor/SnowRuffianMask.png new file mode 100644 index 0000000000000000000000000000000000000000..440ddd4bafe25d210e65ce7ce9d9ffad9c1111ad GIT binary patch literal 497 zcmV*L}fJ0bm+U0Ll+H01TliTz|hE0NkEo00I*srJ?a|6MDRM zT`H1&<-3vv5E>s7_KS>OVlkUs1fc!XRCc$$pHmuZ^^R1a}oaY04!}}m4e)*B#=s^g4M$#rQf{BD|daw zzCcg_++Gze=(!;hwh61B6##Pia{!LFRscwLcPw}7+_^qtvtcNSmy%5={poaxyhp-Diq9!C5D0r2{KZ$a;0u)MhkK&?<1tjsZRsLQI4_@nX$Ks+%6 zKrj+jT;dF=MEcyRq(`nPgfr1c4uDasS^)k)c;Eo1YvfFA#Q*Ai(P+HE@ z#WAGf*4tZ#-Lk174G%XbB`%(D$mL3j7~2)4-W9DYS{YrNdZTXqGX5iMHpyv&z!pI! zv5l9s5+)zwh`Ql=^oY`e-n&sMi|?F1_3oK&S^8(2yJzM;jN`j+UfxyC#?UqQ@V$a} zJH^Y>)8wlEygBwWe_hSS&DTr2<@fKedhveN%*qEV)VIuMfB*GZu)p1|!at{4%ges+ z%qxHPVY1CPVVf_zDjvNFmY!Vo`fs=N{QG;pem`^O&cCPqy`TN(@86uZ|L?0;XJl$7 zsi!yH-d$8JzQ63@RonNwza9SC`}p&D8*5|Z`L&;3o_S+`GTHth^ZQ5k`S)kdocTO{ z|AxZ4$n4WD(@yFM*Zw@*Z?^9L>(k!tzZ!uC?Z5Y00x7T2$}Gd7mr|MSwBGjn$DW}Cis`(Cy0#YJj6-Y(BBSKDTDe_Q$2qMB!4oQ;h? zf4D7w=FFM5+V9Vu;jH45t7ie7!0H~;;2wtw|~e_0rTQONLM#fvnpyFN>2 zuPia1nz!uI*^pf`z08AO0tI#Fp=fS?83{1OP^QB+&o> literal 0 HcmV?d00001 diff --git a/Items/Armor/SnowRuffianWings.png b/Items/Armor/SnowRuffianWings.png new file mode 100644 index 0000000000000000000000000000000000000000..46ae41a109cfa65b150df4c3b20793472acc9a96 GIT binary patch literal 2714 zcmZuzc|4Tc8$XsvT}8T;A%*N*Wvy%_Eh8aZ#vse!H*;rEVa85nxk7YJiWypzF2*us ziBMgaOlHV3GnSdTvSlsFGDiH~y7&Hf|2WV2yze>Zd7ktAe9!lJQk@;o%5H;g0|3av z&)K;^vpY0aw@N{lctRcnO=6)gXKg__OL+=_ZEkS8lWq~zxqK$po1@rvpZ*w;XMf8& z0A7oGDoa4ady=-x9-^3dx}`bWoB5Dkw4apXL{5joJkZ)2at?K`_8HFRdq_#op7tvI zOR6q)|Jj_<+cd?@L+9rMuS_m<#)fB3j25iiaw`y=L0ivT1;j1#R|=xL)K6?xO_a0! zW*(i!bW0qx@mbdZ58PuV0hh)BUEUK zZ3XgsdX%=GNKKJW{Qd?E&Hj*?(= zHiiW)a^Wo%n>cxJ`72{w3Q&)UTx7tl3mT({HBpVW=r-MPH(_>X{1++U7ic2PFKVt{ zH3NR{n*wa7gN(>Ls$_n2I`}xVAznp9dIaaB`kV{#ghUr zmgbd;+ijv&E`YK;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enncc zPKfZro=U8eom;$wp)PkiK|iU(ZG(jtHVavv4>wFrNX}s}t%n24A7}PJ9mN;e`9JQ_ z+N{Y^mC1w8L30<|rNV?IXZEC8kbVkU?^>kiyQJY{0|j-B*&CUmW_sPM%)z-<7I}*7 zkJ_}RwDe;vp%>g-aWIU6B(H?uu(x4Ys3_|F)4u&%5dZmnznL5&cBao9?&0&NG1P1V N_-RMGa$CRa{|CbkG8X^< literal 0 HcmV?d00001 From e2f8915a5e8c19e72b3fae3837ef9ddc7f6064bf Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 15:31:48 +0000 Subject: [PATCH 14/40] Updated all rogue armour tooltips to reflect the ability to gain stealth whilst moving. --- Items/Armor/AerospecHeadgear.cs | 2 +- Items/Armor/AtaxiaHood.cs | 2 +- Items/Armor/AuricTeslaPlumedHelm.cs | 2 +- Items/Armor/BloodflareHelm.cs | 2 +- Items/Armor/DaedalusVisor.cs | 2 +- Items/Armor/GodSlayerMask.cs | 2 +- Items/Armor/ReaverCap.cs | 2 +- Items/Armor/SilvaMask.cs | 2 +- Items/Armor/SnowRuffianMask.cs | 2 +- Items/Armor/StatigelMask.cs | 2 +- Items/Armor/SulfurHelmet.cs | 2 +- Items/Armor/TarragonHelmet.cs | 2 +- Items/Armor/UmbraphileHood.cs | 2 +- Items/Armor/VictideHeadgear.cs | 2 +- Items/Armor/WulfrumMask.cs | 2 +- Items/Armor/XerocMask.cs | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index 053e4310d6..d344d14dd4 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased movement speed and rogue critical strike chance\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 100\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index 7fec2a588f..cf67e49703 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor "Inferno effect when below 50% life\n" + "Rogue weapons have a 10% chance to unleash a volley of chaos flames around the player that chase enemies when used\n" + "You have a 20% chance to emit a blazing explosion when you are hit\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 110\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 110\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index 2cf2cba682..3005be8296 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + "Rogue weapon critical strikes will do 1.25 times damage while you are above 50% HP\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 130\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 130\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index 8619b5f27a..22cba89c92 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Armor "Being over 80% life boosts your defense by 30 and rogue crit by 5%\n" + "Being below 80% life boosts your rogue damage by 10%\n" + "Rogue critical strikes have a 50% chance to heal you\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 120\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 120\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index feab1d346b..cbddcd31ab 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "5% increased rogue damage\n" + "Rogue projectiles throw out crystal shards as they travel\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 105\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 105\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index 5c4d6454df..cf8f6ff59d 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor "While the cooldown for this effect is active you gain a 10% increase to all damage\n" + "While at full HP all of your rogue stats are boosted by 10%\n" + "If you take over 80 damage in one hit you will be given extra immunity frames\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 120\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 120\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/ReaverCap.cs b/Items/Armor/ReaverCap.cs index 71ce606364..546adfb0c3 100644 --- a/Items/Armor/ReaverCap.cs +++ b/Items/Armor/ReaverCap.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor modPlayer.rogueStealthMax += 1.1f; player.setBonus = "5% increased rogue damage\n" + "You emit a cloud of spores when you are hit\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 110\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 110\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index 4e5eb9fa2e..a937ccc73f 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor "Your max life will return to normal if you die\n" + "Rogue weapons have a faster throwing rate while you are above 50% life\n" + "After the silva invulnerability time your rogue weapons will do 10% more damage\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 125\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 125\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed\n" + diff --git a/Items/Armor/SnowRuffianMask.cs b/Items/Armor/SnowRuffianMask.cs index e27f7079be..3afac1a2cb 100644 --- a/Items/Armor/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffianMask.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor modPlayer.rogueStealthMax += 0.5f; player.setBonus = "5% increased rogue damage\n" + "You can glide to negate fall damage\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 50\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 50\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index 19f4ae0551..1d61ce5748 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 100\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/SulfurHelmet.cs b/Items/Armor/SulfurHelmet.cs index 61cfc507b6..1181974a1d 100644 --- a/Items/Armor/SulfurHelmet.cs +++ b/Items/Armor/SulfurHelmet.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Attacking and being attacked by enemies inflicts poison\n" + "Grants a sulphurous bubble jump that applies venom on hit\n" + "Slightly reduces breath loss in the abyss\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 100\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index e6087a4786..eb1d9f64e0 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Armor "After every 25 rogue critical hits you will gain 5 seconds of damage immunity\n" + "This effect can only occur once every 30 seconds\n" + "While under the effects of a debuff you gain 10% increased rogue damage\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 115\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 115\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/UmbraphileHood.cs b/Items/Armor/UmbraphileHood.cs index 82bfcf677e..97c76a0f23 100644 --- a/Items/Armor/UmbraphileHood.cs +++ b/Items/Armor/UmbraphileHood.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Rogue weapons have a chance to create explosions on hit\n" + "Stealth strikes always create an explosion\n" + "Penumbra potions always build stealth at max effectiveness\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 110\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 110\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index 50a02d3f2e..b71e5a1622 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Provides increased underwater mobility and slightly reduces breath loss in the abyss\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 90\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 90\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/WulfrumMask.cs b/Items/Armor/WulfrumMask.cs index 00fa02449a..c87bb01370 100644 --- a/Items/Armor/WulfrumMask.cs +++ b/Items/Armor/WulfrumMask.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); player.setBonus = "+3 defense\n" + "+5 defense when below 50% life\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 50\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 50\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 069aba5b57..8cff77074b 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "9% increased rogue damage and velocity\n" + "Rogue projectiles have special effects on enemy hits\n" + "Imbued with cosmic wrath and rage when you are damaged\n" + - "Rogue stealth builds while not attacking and not moving, up to a max of 115\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 115\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; From 4475534a94ad19294fd29c2893b3d597be39f3cb Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:16:15 -0400 Subject: [PATCH 15/40] Sparks and various other fixes --- Buffs/Pets/SparksBuff.cs | 28 ++ Buffs/Pets/SparksBuff.png | Bin 0 -> 632 bytes CalPlayer/CalamityPlayer.cs | 4 + Items/Pets/RadiatingCrystal.cs | 4 +- Items/Pets/SparksSummon.cs | 53 +++ Items/Pets/SparksSummon.png | Bin 0 -> 713 bytes Items/TreasureBags/ProvidenceBag.cs | 2 + Items/Weapons/Magic/TheWand.cs | 1 + Items/Weapons/Rogue/ToxicantTwister.cs | 12 - ModSupport/ModCalls.cs | 3 + NPCs/Providence/Providence.cs | 2 + Projectiles/Pets/BabyGhostBell.cs | 2 +- Projectiles/Pets/Sparks.cs | 456 +++++++++++++++++++++++++ Projectiles/Pets/Sparks.png | Bin 0 -> 1842 bytes Projectiles/Pets/SparksBlue.png | Bin 0 -> 1901 bytes Projectiles/Pets/SparksGreen.png | Bin 0 -> 1864 bytes Projectiles/Summon/HerringMinion.cs | 4 +- Projectiles/Summon/PurpleButterfly.cs | 2 +- Utilities/CalamityRecipes.cs | 17 +- 19 files changed, 564 insertions(+), 26 deletions(-) create mode 100644 Buffs/Pets/SparksBuff.cs create mode 100644 Buffs/Pets/SparksBuff.png create mode 100644 Items/Pets/SparksSummon.cs create mode 100644 Items/Pets/SparksSummon.png create mode 100644 Projectiles/Pets/Sparks.cs create mode 100644 Projectiles/Pets/Sparks.png create mode 100644 Projectiles/Pets/SparksBlue.png create mode 100644 Projectiles/Pets/SparksGreen.png diff --git a/Buffs/Pets/SparksBuff.cs b/Buffs/Pets/SparksBuff.cs new file mode 100644 index 0000000000..7c25bdd68c --- /dev/null +++ b/Buffs/Pets/SparksBuff.cs @@ -0,0 +1,28 @@ +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Pets +{ + public class SparksBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Sparks"); + Description.SetDefault("Eats butterflies"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.Calamity().sparks = true; + bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; + if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 50f, 0f); + } + } + } +} diff --git a/Buffs/Pets/SparksBuff.png b/Buffs/Pets/SparksBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..6fc861c7ef7e3425ff4f07b4251657de78ecd241 GIT binary patch literal 632 zcmV-;0*C#HP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00G8HL_t(o!{wJvC`3^d$A2SInA9^Y zjh)qGfkc@dvp@=)DVB<|n2qc#?4)F&EZ9+2l(0ZqjPf-sWW~zN8YLfPgT-^`UiXfV z#klg{-Sf`*-*^7!oOkaFgi3<|T;AM1lS70`g8_iNTyAPY0C)z7MyhkVaq{#GCltun z4eR~K01R%n0FX&v8v`eM3IM2T@N?)Iel+@3hCKjgTDJgbo2^xzyQe_%`T>Bcp?d%l z)1FZY$=n9XTzHcE4@N)t6j(g!1R(0|0uZnB-+VmX{4L^m-3kDO=S8o)Eq_D-skKaj zbnjx=+zS^6Ps&!`}ABZw1O1PFLWoSXkS0LxB%Hkf^@}pmy}s7;rom z0pM`%XK_=hpkjAVfzZHq)&R-yYNJN6m&H!9#=Y^T)M;=}fpA5+(Xph&@AA95d%gnQ z-^S~X0=CmiGSQ)*f@QJn{(); + item.buffType = ModContent.BuffType(); + item.value = Item.sellPrice(gold: 1); + item.Calamity().customRarity = CalamityRarity.Dedicated; + } + + public override void UseStyle(Player player) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(item.buffType, 3600, true); + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.GoldButterfly); + recipe.AddIngredient(ItemID.MonarchButterfly); + recipe.AddIngredient(ItemID.PurpleEmperorButterfly); + recipe.AddIngredient(ItemID.RedAdmiralButterfly); + recipe.AddIngredient(ItemID.UlyssesButterfly); + recipe.AddIngredient(ItemID.SulphurButterfly); + recipe.AddIngredient(ItemID.TreeNymphButterfly); + recipe.AddIngredient(ItemID.ZebraSwallowtailButterfly); + recipe.AddIngredient(ItemID.JuliaButterfly); + recipe.AddTile(TileID.CrystalBall); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Pets/SparksSummon.png b/Items/Pets/SparksSummon.png new file mode 100644 index 0000000000000000000000000000000000000000..ec611e6f7086e925e3e7ffe8ccf033287e62a722 GIT binary patch literal 713 zcmV;)0yh1LP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00I|DL_t(Y$IX^OPg6k2q-vCUH8?nD12jJ7rY2=RhBVJk<1K`Wv836C! z%mJ{z(X{}vZq-edv!0yBwJUv&4l2^dy1y(yryV$d2>@Qcl?l3@H)69IOxa%2VUpjJ z$Uh#%BlT;urvPN1G)DSS@+*;scqKOaI?ddU3Hi^K1$g#! zxo@J9=vnP0<^fn}lz@xeP(qblp{V|i^Y54VJcXO>-;snWN}73)0$?kY@wH6K>1&R> z-!4~(_V53Uaqn^FUeHGteyv3sZk@>)KN>4V>Idz^vc7V@-{WDC4vRd$TL&QR9y9&U zE+$9YUl4OOi0=ls3_z|>j6Q1@aXLO}py!_}F84DmS8db|sh#@Yub%iNHrhF_V6K)< z+?37OJ*wN@h{HpvJasGjq;dEAj#R$=>WKwdoJ|^lW?S^fjV1uw)gOL|{{jU9#Z=)t vG=KmA01|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjf#H2su literal 0 HcmV?d00001 diff --git a/Items/TreasureBags/ProvidenceBag.cs b/Items/TreasureBags/ProvidenceBag.cs index 56d9e3a24b..b8bdb90ccb 100644 --- a/Items/TreasureBags/ProvidenceBag.cs +++ b/Items/TreasureBags/ProvidenceBag.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.Providence; using Terraria; using Terraria.ModLoader; @@ -52,6 +53,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Equipment DropHelper.DropItemChance(player, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); diff --git a/Items/Weapons/Magic/TheWand.cs b/Items/Weapons/Magic/TheWand.cs index 91e64976cc..11f6805c22 100644 --- a/Items/Weapons/Magic/TheWand.cs +++ b/Items/Weapons/Magic/TheWand.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic { DisplayName.SetDefault("The Wand"); Tooltip.SetDefault("The ultimate wand"); + Item.staff[item.type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Rogue/ToxicantTwister.cs b/Items/Weapons/Rogue/ToxicantTwister.cs index 27694a9b21..0460a9222f 100644 --- a/Items/Weapons/Rogue/ToxicantTwister.cs +++ b/Items/Weapons/Rogue/ToxicantTwister.cs @@ -1,5 +1,4 @@ using CalamityMod.Projectiles.Rogue; -using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -51,16 +50,5 @@ namespace CalamityMod.Items.Weapons.Rogue } return false; } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.SunplateBlock, 3); - recipe.AddIngredient(ItemID.Cloud, 4); - recipe.AddTile(TileID.SkyMill); - recipe.SetResult(this); - recipe.AddRecipe(); - } } } diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index f33c0e8bb0..875e97d7e3 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -102,9 +102,12 @@ namespace CalamityMod case "the plaguebringer goliath": return CalamityWorld.downedPlaguebringer; + case "scavenger": // backwards compatibility case "ravager": return CalamityWorld.downedScavenger; + case "stargod": // backwards compatibility + case "star god": // backwards compatibility case "astrumdeus": case "astrum deus": return CalamityWorld.downedStarGod; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 984b6e6163..03a2e23487 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -12,6 +12,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Boss; using CalamityMod.Tiles.FurnitureProfaned; using CalamityMod.Tiles.Ores; @@ -1156,6 +1157,7 @@ namespace CalamityMod.NPCs.Providence DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), 40); diff --git a/Projectiles/Pets/BabyGhostBell.cs b/Projectiles/Pets/BabyGhostBell.cs index 3e751a52f9..cf33effb9a 100644 --- a/Projectiles/Pets/BabyGhostBell.cs +++ b/Projectiles/Pets/BabyGhostBell.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Pets num19 -= 60f; float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); float num21 = 18f; - if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && + if (num20 < (float)num17 && player.velocity.Y == 0f && projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { diff --git a/Projectiles/Pets/Sparks.cs b/Projectiles/Pets/Sparks.cs new file mode 100644 index 0000000000..f363c9165f --- /dev/null +++ b/Projectiles/Pets/Sparks.cs @@ -0,0 +1,456 @@ +using CalamityMod.CalPlayer; +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Pets +{ + public class Sparks : ModProjectile + { + private int color = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sparks"); + Main.projFrames[projectile.type] = 4; + Main.projPet[projectile.type] = true; + ProjectileID.Sets.LightPet[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 44; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + projectile.tileCollide = true; + projectile.ignoreWater = true; + } + + private void Pickup() + { + int defaultItemGrabRange = 38; + Player player = Main.player[projectile.owner]; + + for (int itemIndex = 0; itemIndex < Main.maxItems; itemIndex++) + { + Item item = Main.item[itemIndex]; + if (item.active && item.noGrabDelay == 0 && item.owner == projectile.owner && ItemLoader.CanPickup(item, player)) + { + int num = defaultItemGrabRange;//Player.defaultItemGrabRange; + + if (new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height).Intersects(new Rectangle((int)item.position.X, (int)item.position.Y, item.width, item.height))) + { + if (projectile.owner == Main.myPlayer && (player.inventory[player.selectedItem].type != 0 || player.itemAnimation <= 0)) + { + // TODO, fix this maybe? + if (!ItemLoader.OnPickup(item, player)) + { + Main.item[itemIndex] = new Item(); + if (Main.netMode == 1) + { + NetMessage.SendData(21, -1, -1, null, itemIndex, 0f, 0f, 0f, 0, 0, 0); + } + continue; + } + + if (ItemID.Sets.NebulaPickup[item.type]) + { + continue; + //Main.PlaySound(7, (int)player.position.X, (int)player.position.Y, 1); + //int num2 = item.buffType; + //Main.item[itemIndex] = new Item(); + //if (Main.netMode == 1) + //{ + // NetMessage.SendData(102, -1, -1, "", projectile.owner, (float)num2, player.Center.X, player.Center.Y, 0, 0, 0); + // NetMessage.SendData(21, -1, -1, "", itemIndex, 0f, 0f, 0f, 0, 0, 0); + //} + //else + //{ + // player.NebulaLevelup(num2); + //} + } + if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) + { + continue; + //Main.PlaySound(7, (int)player.position.X, (int)player.position.Y, 1); + //player.statLife += 20; + //if (Main.myPlayer == player.whoAmI) + //{ + // player.HealEffect(20, true); + //} + //if (player.statLife > player.statLifeMax2) + //{ + // player.statLife = player.statLifeMax2; + //} + //Main.item[itemIndex] = new Item(); + //if (Main.netMode == 1) + //{ + // NetMessage.SendData(21, -1, -1, "", itemIndex, 0f, 0f, 0f, 0, 0, 0); + //} + } + else if (item.type == ItemID.Star || item.type == ItemID.SoulCake || item.type == ItemID.SugarPlum) + { + continue; + //Main.PlaySound(7, (int)player.position.X, (int)player.position.Y, 1); + //player.statMana += 100; + //if (Main.myPlayer == player.whoAmI) + //{ + // player.ManaEffect(100); + //} + //if (player.statMana > player.statManaMax2) + //{ + // player.statMana = player.statManaMax2; + //} + //Main.item[itemIndex] = new Item(); + //if (Main.netMode == 1) + //{ + // NetMessage.SendData(21, -1, -1, "", itemIndex, 0f, 0f, 0f, 0, 0, 0); + //} + } + else + { + Main.item[itemIndex] = player.GetItem(projectile.owner, item, false, false); + if (Main.netMode == 1) + { + NetMessage.SendData(21, -1, -1, null, itemIndex, 0f, 0f, 0f, 0, 0, 0); + } + } + } + } + } + } + + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + if (npc.active && (npc.type == NPCID.Butterfly || npc.type == NPCID.GoldButterfly)) + { + if (new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height).Intersects(new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height))) + { + npc.life = 0; + npc.active = false; + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 2); + npc.netUpdate = true; + } + } + } + } + + private void PassiveAI() + { + Player player = Main.player[projectile.owner]; + float num16 = 0.5f; + projectile.tileCollide = false; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float xDist = player.position.X + (float)(player.width / 2) - vector3.X; + float yDist = player.position.Y + (float)(player.height / 2) - vector3.Y; + yDist += (float)Main.rand.Next(-10, 21); + xDist += (float)Main.rand.Next(-10, 21); + xDist += (float)(60 * -(float)player.direction); + yDist -= 60f; + float playerDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); + float num21 = 18f; + if (playerDist < 160f) + projectile.ai[0] = 0f; + if (playerDist < 100f && player.velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (playerDist > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (playerDist < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.99f; + } + num16 = 0.01f; + } + else + { + if (playerDist < 100f) + { + num16 = 0.1f; + } + if (playerDist > 300f) + { + num16 = 1f; + } + playerDist = num21 / playerDist; + xDist *= playerDist; + yDist *= playerDist; + } + if (projectile.velocity.X < xDist) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > xDist) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < yDist) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > yDist) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + + //Change color based on health + if (player.statLife >= (int)((double)player.statLifeMax2 * 0.75)) + { + if (Main.myPlayer == projectile.owner) + { + color = 0; //gold + } + } + else if (player.statLife >= (int)((double)player.statLifeMax2 * 0.5)) + { + if (Main.myPlayer == projectile.owner) + { + color = 1; //blue + } + } + else + { + if (Main.myPlayer == projectile.owner) + { + color = 2; //green + } + } + + //give off light based on Dragonfly color + if (color == 0) //gold + { + Lighting.AddLight(projectile.Center, 1.5f, 1.5f, 0.1f); + } + else if (color == 1) //blue + { + Lighting.AddLight(projectile.Center, 0.1f, 0.1f, 1.5f); + } + else //green + { + Lighting.AddLight(projectile.Center, 0.1f, 1.5f, 0.1f); + } + + //framing and sprite direction + projectile.spriteDirection = projectile.direction; + projectile.rotation = projectile.velocity.X * 0.05f; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= 4) + { + projectile.frame = 0; + } + if ((double)projectile.velocity.X >= 0.25) + { + projectile.direction = 1; + } + else if ((double)projectile.velocity.X < -0.25) + { + projectile.direction = -1; + } + + if (!player.active) + { + projectile.active = false; + return; + } + if (player.dead) + { + modPlayer.sparks = false; + } + if (modPlayer.sparks) + { + projectile.timeLeft = 2; + } + + Pickup(); //pickup items + + bool flag24 = false; + if (projectile.ai[0] == 2f) + { + projectile.ai[1] += 1f; + if (projectile.ai[1] > 30f) + { + projectile.ai[1] = 1f; + projectile.ai[0] = 0f; + projectile.numUpdates = 0; + projectile.netUpdate = true; + } + else + { + flag24 = true; + } + } + if (flag24) + { + return; + } + + //find a target + Vector2 targetLocation = projectile.position; + bool foundFood = false; + float range = 160f; //10 block range + + for (int itemIndex = 0; itemIndex < Main.maxItems; itemIndex++) + { + Item item = Main.item[itemIndex]; + if (item.active && item.noGrabDelay == 0 && item.owner == projectile.owner && ItemLoader.CanPickup(item, Main.player[item.owner]) && Main.player[item.owner].ItemSpace(item)) + { + if (ItemID.Sets.NebulaPickup[item.type]) + { + continue; + } + if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) + { + continue; + } + else if (item.type == ItemID.Star || item.type == ItemID.SoulCake || item.type == ItemID.SugarPlum) + { + continue; + } + + float itemDist = Vector2.Distance(item.Center, projectile.Center); + float distanceToPotential = Vector2.Distance(projectile.Center, targetLocation); + if (distanceToPotential < itemDist && itemDist < range) + { + range = itemDist; + targetLocation = item.Center; + foundFood = true; + } + } + } + //prioritize butterflies over items + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + if (npc.active && (npc.type == NPCID.Butterfly || npc.type == NPCID.GoldButterfly)) + { + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + float distanceToPotential = Vector2.Distance(projectile.Center, targetLocation); + if (distanceToPotential < npcDist && npcDist < range) + { + range = npcDist; + targetLocation = npc.Center; + foundFood = true; + } + } + } + + float num647 = 100f; + if (foundFood) + { + num647 = 200f; + } + if (Vector2.Distance(player.Center, projectile.Center) > num647) + { + projectile.ai[0] = 1f; + projectile.netUpdate = true; + } + if (foundFood && projectile.ai[0] == 0f) + { + Vector2 vector47 = targetLocation - projectile.Center; + float num648 = vector47.Length(); + vector47.Normalize(); + if (num648 > 200f) + { + float scaleFactor2 = 18f; + vector47 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + else + { + float num649 = 9f; + vector47 *= -num649; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + } + else + { + PassiveAI(); + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] += (float)Main.rand.Next(1, 3); + } + if (projectile.ai[1] > 30f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + if (projectile.ai[0] == 0f) + { + if (projectile.ai[1] == 0f && foundFood && range < 300f) + { + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner) + { + projectile.ai[0] = 2f; + Vector2 value20 = targetLocation - projectile.Center; + value20.Normalize(); + projectile.velocity = value20 * 12f; + projectile.netUpdate = true; + } + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + if (color == 1) + texture = ModContent.GetTexture("CalamityMod/Projectiles/Pets/SparksBlue"); + if (color == 2) + texture = ModContent.GetTexture("CalamityMod/Projectiles/Pets/SparksGreen"); + int height = texture.Height / Main.projFrames[projectile.type]; + int frameHeight = height * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, spriteEffects, 0f); + return false; + } + } +} \ No newline at end of file diff --git a/Projectiles/Pets/Sparks.png b/Projectiles/Pets/Sparks.png new file mode 100644 index 0000000000000000000000000000000000000000..04cd4bfba0b8d5a28ea2e55e30c727e4c6efe19b GIT binary patch literal 1842 zcmV-22hI42P)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00w|bL_t(&-tC%8a1>P(hQFJ~BqS5^ zBnc1-i|rj z@wovgEv*Bf?Dg{`L*t=205mn#0C4@)-0tdAW*nCh z;~pLFGa&Jr3JfEDUSnBYl${Ac-Qx%Vv%(<*aH*r$0jMd-vn-Ee#=2=DCenft1A}Yh ze0z^tZZVc!U`%|wVqOja7I zt?tali3o*V@A^a96)V>O5Dw=9aQlbp)`PTv)22=IDlMtE00)EG>V||AK}K za!hsph4o_N=}S`$z?sNG0BUP%^fHHD$b+s=8YFW`UvabxtwnBfm&0K!DoY!_< znY1H~(k^kYU$XsT(uo9yk(k$XK9ref=1N<=r$x34R_zyy)Vm-F|#?coPW} zBbH@qc_Mhvdl`y@VFU;aBg3Ax#;{%_(l;X=9~eeb>KY$708LFb2H?P!UjcYyOL@}q zq+mb&7*Tzrx%w}10Y=awRJrNe2pZ0Z(g0#9~LH5xhdjw4FF{!30N9? z`>j|vTDr#o6uX>FFBD$*`B5D#f%`dH_UZ(Z^d3z|~GsZZq;imeSMqwMeh8_DzN0 zGotTY)xTQ)peO186c6?TP&_vTz@nTRqeT09q5r13!|D!N6*>+;TaN^zd9x>uGVMD= z^SV)dZlN5nG%o?5JAwACA9dO{E(%Yoc@Kb_>w6EpYs`!@e^0#30 zYu{8_*9)imu-(zHSAPk!-M6HbJH-H)!SiXth_^#^i5EUfPQ0yro$>8=8FI?kNo#*X zB^Yo<5?Pjrso`Fq3c+J!1Qt8P9XJvMkC9Xs7iP(vTcZQ^4Z4p25Y2tX_qx)tvX7kp zOm^gjpZf1xfng-JqT|+xuVs}vSq5Nce#n7Ay;EW2yN5SUnX*`Hymd+#oVt34d<~fW znmjn|qIfS-&3NVa7p%5M@e4M``W;AvC_dptYD)6rGn?G&i8}XOl^2h(lXjW0lXk_d z42Sb$5qmrm^#_iTAzq^@UUU2E9q~;0;aHvMpOMBJ`DW~ zz?BCtIRKM#_8EY1WEudCkA4FnFMlckcW&$a*kqt|5(0 zh3+)-yL=VwKLbEd^bP=#zCVGuT16M$tb`Z8+<4Idtl#)80N-uA6>vrlY}hWAau$HT zhI2_P_J*6UX}j+jfU)D{QGu^9idAp+c1lNIr=7`C3pFpJ7`^!#Z~dw=(0s$qWR=Gl z7{aDsfBNTZ^c}a#HZg>O6?>Dv+fi4m_!Li(3jYCYzl58R5AXK?000tnMObu2SV=}Y gPjYExZggREX>V=-F@#v`?*IS*07*qoM6N<$f-wzTu>b%7 literal 0 HcmV?d00001 diff --git a/Projectiles/Pets/SparksBlue.png b/Projectiles/Pets/SparksBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..b170bd4e5341eeddfad96f06d613aec3e05240d6 GIT binary patch literal 1901 zcmV-z2a@=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JLx#jJ&Z{8=2%~f z91SMKLdnYrCU3sRUcV{~1e$cFTe6?_ybO~yU*nN`9B9$sMeGbT?D;(); if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Summon } else { - for (int num645 = 0; num645 < 200; num645++) + for (int num645 = 0; num645 < Main.maxNPCs; num645++) { NPC nPC2 = Main.npc[num645]; if (nPC2.CanBeChasedBy(projectile, false)) diff --git a/Projectiles/Summon/PurpleButterfly.cs b/Projectiles/Summon/PurpleButterfly.cs index 33da0be8cc..d8e40a7810 100644 --- a/Projectiles/Summon/PurpleButterfly.cs +++ b/Projectiles/Summon/PurpleButterfly.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Summon } } float num637 = 0.05f; - for (int num638 = 0; num638 < 1000; num638++) + for (int num638 = 0; num638 < Main.maxProjectiles; num638++) { bool flag23 = Main.projectile[num638].type == ModContent.ProjectileType(); if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index de1b630a4a..1bc8d2569b 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -143,15 +143,8 @@ namespace CalamityMod #region Astral Alternatives private static void AstralAlternatives() { - // Glass - ModRecipe r = GetNewRecipe(); - r.AddIngredient(ModContent.ItemType(), 2); - r.AddTile(TileID.Furnaces); - r.SetResult(ItemID.Glass); - r.AddRecipe(); - //Bowl - r = GetNewRecipe(); + ModRecipe r = GetNewRecipe(); r.AddIngredient(ModContent.ItemType(), 2); r.AddTile(TileID.Furnaces); r.SetResult(ItemID.Bowl); @@ -866,6 +859,14 @@ namespace CalamityMod public static void AddRecipeGroups() { + //Modify Vanilla Recipe Groups + RecipeGroup firefly = RecipeGroup.recipeGroups[RecipeGroup.recipeGroupIDs["Fireflies"]]; + firefly.ValidItems.Add(ModContent.ItemType()); + + RecipeGroup sand = RecipeGroup.recipeGroups[RecipeGroup.recipeGroupIDs["Sand"]]; + sand.ValidItems.Add(ModContent.ItemType()); + + //New Groups RecipeGroup group = new RecipeGroup(() => "Any Copper Bar", new int[] { ItemID.CopperBar, From 9cb741e2e61a09231040504197daf193c49ac198 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 10 Mar 2020 20:38:52 +0000 Subject: [PATCH 16/40] fixed dog mask not showing in boss checklist's drop pool --- ModSupport/WeakReferenceSupport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index a7d2a719b5..3b51b8de48 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -418,7 +418,7 @@ namespace CalamityMod calamity, "Devourer of Gods", (Func)(() => CalamityWorld.downedDoG), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType()}, + new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, "Use a [i:" + ModContent.ItemType() + "]", "[c/00FFFF:The Devourer of Gods has slain everyone and feasted on their essence.]", From d253a6d6f3572052dfbcdb87923ead920db053ce Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:47:30 -0400 Subject: [PATCH 17/40] various buffs and nerfs --- Items/Accessories/MutatedTruffle.cs | 2 +- Items/Weapons/Magic/AcidGun.cs | 4 ++-- Items/Weapons/Magic/Miasma.cs | 2 +- Items/Weapons/Magic/VitriolicViper.cs | 2 +- Items/Weapons/Melee/Basher.cs | 2 +- Items/Weapons/Ranged/Toxibow.cs | 2 +- Items/Weapons/Summon/CadaverousCarrion.cs | 2 +- Items/Weapons/Summon/CausticCroakerStaff.cs | 4 ++-- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 8 ++++---- Items/Weapons/Summon/DazzlingStabberStaff.cs | 2 +- Items/Weapons/Summon/DragonbloodDisgorger.cs | 4 ++-- Items/Weapons/Summon/EndoHydraStaff.cs | 2 +- Items/Weapons/Summon/FuelCellBundle.cs | 2 +- Items/Weapons/Summon/IgneousExaltation.cs | 4 ++-- Items/Weapons/Summon/RadiantResolution.cs | 10 +++++----- Projectiles/Summon/IgneousBlade.cs | 4 ++-- Projectiles/Summon/RadiantResolutionAura.cs | 2 +- Projectiles/Summon/YoungDuke.cs | 4 ++++ 18 files changed, 33 insertions(+), 29 deletions(-) diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index 65817da6e3..1ed626eccc 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories modPlayer.miniOldDuke = true; if (player.whoAmI == Main.myPlayer) { - const int damage = 2424; + const int damage = 2000; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs index bc5757dfed..c6289c58ac 100644 --- a/Items/Weapons/Magic/AcidGun.cs +++ b/Items/Weapons/Magic/AcidGun.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 29; + item.damage = 20; item.magic = true; item.mana = 9; item.width = 48; item.height = 30; - item.useTime = item.useAnimation = 15; + item.useTime = item.useAnimation = 20; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 1.5f; diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index 18e2518b3d..fdbfc32794 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 440; + item.damage = 123; item.magic = true; item.mana = 16; item.width = 50; diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index 0736d2ace4..1eff8574b4 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 250; + item.damage = 90; item.magic = true; item.mana = 15; item.width = 60; diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 41c179d76e..090b39816d 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 30; item.height = 52; - item.damage = 33; + item.damage = 22; item.melee = true; item.useAnimation = item.useTime = 26; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs index 833a2ebe90..a405ca513e 100644 --- a/Items/Weapons/Ranged/Toxibow.cs +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 17; + item.damage = 12; item.ranged = true; item.width = 20; item.height = 54; diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs index 5978e1d7cb..62ce5315b2 100644 --- a/Items/Weapons/Summon/CadaverousCarrion.cs +++ b/Items/Weapons/Summon/CadaverousCarrion.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 360; + item.damage = 400; item.mana = 32; item.summon = true; item.sentry = true; diff --git a/Items/Weapons/Summon/CausticCroakerStaff.cs b/Items/Weapons/Summon/CausticCroakerStaff.cs index 0b4c63cbe6..d1fcf1fd54 100644 --- a/Items/Weapons/Summon/CausticCroakerStaff.cs +++ b/Items/Weapons/Summon/CausticCroakerStaff.cs @@ -17,11 +17,11 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 38; + item.damage = 20; item.mana = 10; item.width = 10; item.height = 32; - item.useTime = item.useAnimation = 33; + item.useTime = item.useAnimation = 36; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; item.knockBack = 0f; diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 017084f5a4..00d8efe8f4 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Corvid Harbringer Staff"); - Tooltip.SetDefault("Summons a powerful raven which teleports and dashes\n" + - "'Nevermore'"); + Tooltip.SetDefault("Nevermore\n" + + "Summons a powerful raven which teleports and dashes"); } public override void SetDefaults() @@ -26,10 +26,10 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 999; + item.damage = 456; item.knockBack = 2f; item.autoReuse = true; - item.useTime = item.useAnimation = 21; + item.useTime = item.useAnimation = 36; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index 7c1eff0183..2b47d99d2a 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_DarkMageHealImpact; item.summon = true; item.mana = 12; - item.damage = 350; + item.damage = 111; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 21; diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index 75aaac0cd2..31a81446bb 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -21,11 +21,11 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 333; + item.damage = 300; item.mana = 30; item.width = 64; item.height = 62; - item.useTime = item.useAnimation = 21; + item.useTime = item.useAnimation = 36; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; item.knockBack = 4f; diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index f3b2c349c4..f6eefe1b04 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item60; item.summon = true; item.mana = 25; - item.damage = 3775; + item.damage = 2563; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs index 3d62a6a18d..76204b8f27 100644 --- a/Items/Weapons/Summon/FuelCellBundle.cs +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 10; - item.damage = 73; + item.damage = 50; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 32; item.height = 32; diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index 333654f57e..44214ef800 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -13,13 +13,13 @@ namespace CalamityMod.Items.Weapons.Summon { DisplayName.SetDefault("Igneous Exaltation"); Tooltip.SetDefault("Summons an orbiting blade\n" + - "If this item is used but you have no free minion slots, all knives are launched towards the mouse"); + "If this item is used when you have no free minion slots, all knives are launched towards the cursor"); Item.staff[item.type] = true; } public override void SetDefaults() { - item.damage = 47; + item.damage = 39; item.mana = 19; item.width = 52; item.height = 50; diff --git a/Items/Weapons/Summon/RadiantResolution.cs b/Items/Weapons/Summon/RadiantResolution.cs index 114a10c885..0e063a6a4e 100644 --- a/Items/Weapons/Summon/RadiantResolution.cs +++ b/Items/Weapons/Summon/RadiantResolution.cs @@ -13,11 +13,11 @@ namespace CalamityMod.Items.Weapons.Summon int radianceSlots; public override void SetStaticDefaults() { - DisplayName.SetDefault("Radiant Resolution"); - Tooltip.SetDefault("Summons a radiant aura\n" + + DisplayName.SetDefault("Saros Possession"); + Tooltip.SetDefault("Gain absolute control over light itself\n" + + "Summons a radiant aura\n" + "Consumes all of the remaining minion slots on use\n" + - "Increased power based on the number of minion slots used\n" + - "'Gain absolute control over light itself'"); + "Increased power based on the number of minion slots used"); } public override void SetDefaults() @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon item.summon = true; item.mana = 100; - item.damage = 555; + item.damage = 666; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index ff0e9cd6b9..4c1ad5ba09 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -94,8 +94,8 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[0] = 50; for (int i = 0; i < 3; i++) { - Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(16f)); - Projectile.NewProjectile(spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 18f, ModContent.ProjectileType(), + Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(8f)); + Projectile.NewProjectile(spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 24f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); } for (int i = 0; i < Main.rand.Next(28, 41); i++) diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs index 7fdee99d1b..8112d59c9f 100644 --- a/Projectiles/Summon/RadiantResolutionAura.cs +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public const float DistanceToCheck = 1600f; public override void SetStaticDefaults() { - DisplayName.SetDefault("Radiant Resolution Aura"); + DisplayName.SetDefault("Saros Possession"); ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; } diff --git a/Projectiles/Summon/YoungDuke.cs b/Projectiles/Summon/YoungDuke.cs index fb2948aa31..3b6a0275a3 100644 --- a/Projectiles/Summon/YoungDuke.cs +++ b/Projectiles/Summon/YoungDuke.cs @@ -88,6 +88,10 @@ namespace CalamityMod.Projectiles.Summon { projectile.timeLeft = 2; } + else + { + projectile.Kill(); + } } NPC potentialTarget = projectile.Center.ClosestNPCAt(1600f); if (potentialTarget != null) From 1a9d17beb19b4ccfbe09806a62b54c3243fc1163 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:49:34 -0400 Subject: [PATCH 18/40] added old duke's scales --- CalPlayer/CalamityPlayer.cs | 4 +-- CalPlayer/CalamityPlayerMiscEffects.cs | 4 +-- Items/Accessories/DukeScales.cs | 34 +++++++++++++++++++++++++ Items/Accessories/DukeScales.png | Bin 0 -> 688 bytes 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 Items/Accessories/DukeScales.cs create mode 100644 Items/Accessories/DukeScales.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 0e16c3e198..f9089617e3 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -408,7 +408,7 @@ namespace CalamityMod.CalPlayer public bool voltaicJelly = false; public bool jellyChargedBattery = false; public float jellyDmg; - //public bool dukeScales = false; + public bool dukeScales = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; public bool cloudWaifu = false; @@ -1261,7 +1261,7 @@ namespace CalamityMod.CalPlayer thiefsDime = false; dynamoStemCells = false; etherealExtorter = false; - //dukeScales = false; + dukeScales = false; blazingCore = false; voltaicJelly = false; jellyChargedBattery = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8dde11d236..e89292b151 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3165,7 +3165,7 @@ namespace CalamityMod.CalPlayer player.npcTypeNoAggro[ModContent.NPCType()] = true; } - /*if (modPlayer.dukeScales) + if (modPlayer.dukeScales) { player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[BuffID.Poisoned] = true; @@ -3185,7 +3185,7 @@ namespace CalamityMod.CalPlayer player.allDamage += 0.1f; modPlayer.AllCritBoost(5); } - }*/ + } if (modPlayer.auricSet && modPlayer.silvaMelee) { diff --git a/Items/Accessories/DukeScales.cs b/Items/Accessories/DukeScales.cs new file mode 100644 index 0000000000..8962086219 --- /dev/null +++ b/Items/Accessories/DukeScales.cs @@ -0,0 +1,34 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class DukeScales : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Old Duke's Scales"); + Tooltip.SetDefault("While under the effects of a damaging debuff, you gain 10% increased damage and 5% crit\n" + + "When below 75% life, you gain 3% increased damage and crit\n" + + "When below 50% life, you gain an additional 5% increased damage and crit\n" + + "Provides immunity to poisoned, venom, and sulphruic poisoning"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 26; + item.value = Item.buyPrice(0, 60, 0, 0); + item.accessory = true; + item.rare = 10; + item.Calamity().customRarity = (CalamityRarity)12; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.dukeScales = true; + } + } +} diff --git a/Items/Accessories/DukeScales.png b/Items/Accessories/DukeScales.png new file mode 100644 index 0000000000000000000000000000000000000000..77255ebea8b5b555a49daf24dc8f387bca2e9a1b GIT binary patch literal 688 zcmV;h0#E&kP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00I6iAVH0_@dGqL zVrr9^+%6`^IAg9Tlw9A6$;dCaoxu zyfFHOFck26OkRk&vW zfK*!VnKKik!0oJ)EVZ-Nt~>F5c3iV8ecuM4P%L}2m*(<%Cy_dIBa_Hq4`Q^%>u9AV z-X)T{y?2rUpu^vSCxpuF{Bx^Ik&uXY;+32xTL&qi>Rl>*?hRqX?m@Ehs!97g1F90S zL0ZZt3<4pu>sQEZ@0@~1gsyj*zD|8A9G+&Kn-SZRy0z~%{^mvnkjobz8KF&@xwr(N zcva$N#G!y6fOIx@=lxX3M0F?p2L Date: Tue, 10 Mar 2020 17:33:01 -0400 Subject: [PATCH 19/40] Massive Boss Checklist refactor --- ModSupport/WeakReferenceSupport.cs | 1449 ++++++++++++++-------------- Utilities/CalamityUtils.cs | 7 + Utilities/Downed.cs | 35 + 3 files changed, 741 insertions(+), 750 deletions(-) create mode 100644 Utilities/Downed.cs diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index a7d2a719b5..31586a28d2 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1,785 +1,734 @@ -using CalamityMod; -using CalamityMod.Items.Potions.Alcohol; -using CalamityMod.Items.Potions; -using CalamityMod.Items.SummonItems; +using CalamityMod.Buffs.Summon; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Wings; -using CalamityMod.Items.DifficultyItems; -using CalamityMod.Items.PermanentBoosters; -using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables; -using CalamityMod.Items.Placeables.FurnitureCosmilite; -using CalamityMod.Items.Placeables.Furniture.Trophies; -using CalamityMod.Items.Placeables.Furniture.CraftingStations; using CalamityMod.Items.Armor.Vanity; +using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.LoreItems; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture.CraftingStations; +using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Items.Placeables.FurnitureCosmilite; +using CalamityMod.Items.Potions; +using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.SummonItems; using CalamityMod.Items.Tools; using CalamityMod.Items.Tools.ClimateChange; using CalamityMod.Items.TreasureBags; -using CalamityMod.NPCs.DesertScourge; -using CalamityMod.NPCs.Crabulon; -using CalamityMod.NPCs.HiveMind; -using CalamityMod.NPCs.Perforator; -using CalamityMod.NPCs.SlimeGod; -using CalamityMod.NPCs.Cryogen; -using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.PlaguebringerGoliath; -using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.AstrumDeus; +using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.NPCs.Bumblebirb; +using CalamityMod.NPCs.Calamitas; +using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.NPCs.Crabulon; +using CalamityMod.NPCs.Cryogen; +using CalamityMod.NPCs.DesertScourge; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.GreatSandShark; +using CalamityMod.NPCs.HiveMind; +using CalamityMod.NPCs.Leviathan; +using CalamityMod.NPCs.Perforator; +using CalamityMod.NPCs.PlaguebringerGoliath; +using CalamityMod.NPCs.Polterghast; using CalamityMod.NPCs.ProfanedGuardians; using CalamityMod.NPCs.Providence; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.Polterghast; -using CalamityMod.NPCs.StormWeaver; -using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.NPCs.Ravager; using CalamityMod.NPCs.Signus; -using CalamityMod.NPCs.DevourerofGods; -using CalamityMod.NPCs.Yharon; -using CalamityMod.NPCs.Calamitas; -using CalamityMod.NPCs.SupremeCalamitas; +using CalamityMod.NPCs.SlimeGod; +using CalamityMod.NPCs.StormWeaver; using CalamityMod.NPCs.SunkenSea; -using CalamityMod.NPCs.GreatSandShark; +using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.TownNPCs; -using CalamityMod.Buffs.Summon; +using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Summon; using CalamityMod.World; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using System; using System.Collections.Generic; -using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Terraria.DataStructures; + +using static CalamityMod.Downed; +using static Terraria.ModLoader.ModContent; + namespace CalamityMod { - internal class WeakReferenceSupport - { - public static void Setup() - { - BossChecklistSupport(); - CensusSupport(); + internal class WeakReferenceSupport + { + private static readonly Dictionary BossDifficulty = new Dictionary + { + { "DesertScourge", 1.5f }, + { "GiantClam", 1.6f }, + { "Crabulon", 2.5f }, + { "HiveMind", 3.5f }, + { "Perforators", 3.5f }, + { "SlimeGod", 5.5f }, + { "Cryogen", 6.5f }, + { "BrimstoneElemental", 7.5f }, + { "AquaticScourge", 8.5f }, + { "Calamitas", 9.7f }, + { "GreatSandShark", 10.09f }, + { "Leviathan", 10.5f }, + { "AstrumAureus", 10.6f }, + { "PlaguebringerGoliath", 11.5f }, + { "Ravager", 12.5f }, + { "AstrumDeus", 13.5f }, + { "ProfanedGuardians", 14.5f }, + { "Bumblebirb", 14.6f }, + { "Providence", 15.01f }, // Thorium's Ragnarok is 15f + { "CeaselessVoid", 15.5f }, + { "StormWeaver", 15.51f }, + { "Signus", 15.52f }, + { "Polterghast", 16f }, + { "DevourerOfGods", 17f }, + { "Yharon", 18f }, + // { "Draedon", 18.5f }, + { "SupremeCalamitas", 19f }, + // { "Yharim", 20f }, + // { "Noxus", 120f }, + // { "Xeroc", 121f }, + }; + + public static void Setup() + { + BossChecklistSupport(); + FargosSupport(); + CensusSupport(); SummonersAssociationSupport(); - } - - private static void BossChecklistSupport() - { - Mod bossChecklist = ModLoader.GetMod("BossChecklist"); - Mod calamity = ModContent.GetInstance(); - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); - - if (bossChecklist != null) - { - // 14 is moonlord, 12 is duke fishron - - //Desert Scourge - bossChecklist.Call( - "AddBoss", - 1.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Desert Scourge", - (Func)(() => CalamityWorld.downedDesertScourge), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SandBlock, ModContent.ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.LesserHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Desert Biome", - "[c/EEE8AA:The scourge of the desert delved back into the sand.]", - "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist"); - - //Giant Clam - bossChecklist.Call( - "AddMiniBoss", - 1.6f, - ModContent.NPCType(), - calamity, - "Giant Clam", - (Func)(() => CalamityWorld.downedCLAM), - null, - null, - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Can spawn naturally in the Sunken Sea", - "[c/7FFFD4:The Giant Clam returns into hiding in its grotto.]"); - - //Crabulon - bossChecklist.Call( - "AddBoss", - 2.5f, - ModContent.NPCType(), - calamity, - "Crabulon", - (Func)(() => CalamityWorld.downedCrabulon), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Mushroom Biome", - "[c/6495ED:The mycelium crab has lost interest.]"); - - //Hive Mind - bossChecklist.Call( - "AddBoss", - 3.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Hive Mind", - (Func)(() => CalamityWorld.downedHiveMind), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "By killing a Cyst in the Corruption or use a [i:" + ModContent.ItemType() + "] in the Corruption", - "[c/9400D3:The corrupted colony began searching for a new breeding ground.]"); - - //Perforators - bossChecklist.Call( - "AddBoss", - 3.5f, - new List() {ModContent.NPCType()}, - calamity, - "The Perforators", - (Func)(() => CalamityWorld.downedPerforator), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.LesserHealingPotion}, - "By killing a Cyst in the Crimson or use a [i:" + ModContent.ItemType() + "] in the Crimson", - "[c/DC143C:The parasitic hive began searching for a new host.]"); - - //Slime God - bossChecklist.Call( - "AddBoss", - 5.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Slime God", - (Func)(() => CalamityWorld.downedSlimeGod), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.Gel, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HealingPotion}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/BA5533:The gelatinous monstrosity achieved vengeance for its breathren.]"); - - //Cryogen - bossChecklist.Call( - "AddBoss", - 6.5f, - ModContent.NPCType(), - calamity, - "Cryogen", - (Func)(() => CalamityWorld.downedCryogen), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SoulofMight, ModContent.ItemType(), ModContent.ItemType(), ItemID.FrostCore, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Snow Biome", - "[c/00FFFF:Cryogen drifts away, carried on a freezing wind.]", - "CalamityMod/NPCs/Cryogen/Cryogen_BossChecklist"); - - //Brimstone Elemental - bossChecklist.Call( - "AddBoss", - 7.5f, - ModContent.NPCType(), - calamity, - "Brimstone Elemental", - (Func)(() => CalamityWorld.downedBrimstoneElemental), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ItemID.SoulofFright, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Brimstone Crag", - "[c/DC143C:Brimstone Elemental withdraws to the ruins of her shrine.]"); - - //Aquatic Scourge - bossChecklist.Call( - "AddBoss", - 8.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Aquatic Scourge", - (Func)(() => CalamityWorld.downedAquaticScourge), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ItemID.SoulofSight, ModContent.ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea", - "[c/F0E68C:The Aquatic Scourge swam back into the open ocean.]", - "CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist"); - - //Calamitas - bossChecklist.Call( - "AddBoss", - 9.7f, - new List() {ModContent.NPCType()}, - calamity, - "Calamitas", - (Func)(() => CalamityWorld.downedCalamitas), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] at Night", - "[c/FFA500:If you wanted a fight, you should've came more prepared.]"); - - //Great Sand Shark - bossChecklist.Call( - "AddMiniBoss", - 10.09f, - ModContent.NPCType(), - calamity, - "Great Sand Shark", - (Func)(() => CalamityWorld.downedGSS), - ModContent.ItemType(), - new List() {ItemID.MusicBoxSandstorm}, - new List() {ModContent.ItemType(), ItemID.AncientBattleArmorMaterial}, - "Kill 10 sand sharks after defeating Plantera or use a [i:" + ModContent.ItemType() + "] in the Desert Biome", - "[c/DAA520:The apex predator of the sands disappears into the dunes...]"); - - //Leviathan and Siren - bossChecklist.Call( - "AddBoss", - 10.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Leviathan", - (Func)(() => CalamityWorld.downedLeviathan), - null, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HotlineFishingHook, ItemID.BottomlessBucket, ItemID.SuperAbsorbantSponge, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GreaterHealingPotion}, - "By killing an unknown entity in the Ocean Biome", - "[c/7FFFD4:The aquatic entities sink back beneath the ocean depths.]", - "CalamityMod/NPCs/Leviathan/SirenandLevi_BossChecklist"); - - //Astrum Aureus - bossChecklist.Call( - "AddBoss", - 10.6f, - ModContent.NPCType(), - calamity, - "Astrum Aureus", - (Func)(() => CalamityWorld.downedAstrageldon), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ItemID.FallenStar, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] at Night in the Astral Biome", - "[c/FFD700:Astrum Aureus’ program has been executed. Initiate recall.]", - "CalamityMod/NPCs/AstrumAureus/AstrumAureus_BossChecklist"); - - //Plaguebringer Goliath - bossChecklist.Call( - "AddBoss", - 11.5f, - ModContent.NPCType(), - calamity, - "Plaguebringer Goliath", - (Func)(() => CalamityWorld.downedPlaguebringer), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "] in the Jungle Biome", - "[c/00FF00:HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.]"); - - //Ravager - bossChecklist.Call( - "AddBoss", - 12.5f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Ravager", - (Func)(() => CalamityWorld.downedScavenger), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/B22222:The automaton of misshapen victims went looking for the true perpetrator.]", - "CalamityMod/NPCs/Ravager/Ravager_BossChecklist"); - - //Astrum Deus - bossChecklist.Call( - "AddBoss", - 13.5f, - new List() { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Astrum Deus", - (Func)(() => CalamityWorld.downedStarGod), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion}, - "Defeat 3 empowered astral titans or use a [i:" + ModContent.ItemType() + "] at Night", - "[c/FFD700:The infected deity retreats to the heavens.]", - "CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist"); - - //Profaned Guardians - bossChecklist.Call( - "AddBoss", - 14.5f, - new List() { ModContent.NPCType()}, - calamity, "Profaned Guardians", - (Func)(() => CalamityWorld.downedGuardians), - ModContent.ItemType(), - new List() { ModContent.ItemType(), ModContent.ItemType() }, - new List() { ModContent.ItemType(), ItemID.GreaterHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Hallow or Underworld Biomes", - "[c/FFA500:The guardians must protect their goddess at all costs.]", - "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist"); - - //Bumblebirb - bossChecklist.Call( - "AddBoss", - 14.6f, - ModContent.NPCType(), - calamity, - "Bumblebirb", - (Func)(() => CalamityWorld.downedBumble), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use [i:" + ModContent.ItemType() + "] in the Jungle Biome", - "[c/FFD700:The failed experiment returns into its reproductive routine.]"); - - //Providence - bossChecklist.Call( - "AddBoss", - 15f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Providence", - (Func)(() => CalamityWorld.downedProvidence), - new List() {ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Hallow or Underworld Biomes", - "[c/FFA500:The Profaned Goddess vanishes in a burning blaze.]", - "CalamityMod/NPCs/Providence/Providence_BossChecklist"); - - //Ceaseless Void - bossChecklist.Call( - "AddBoss", - 15.1f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Ceaseless Void", - (Func)(() => CalamityWorld.downedSentinel1), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, "Use a [i:" + ModContent.ItemType() + "] in the Dungeon", - "[c/4B0082:The rift in time and space has moved away from your reach.]"); - - //Storm Weaver - bossChecklist.Call( - "AddBoss", - 15.2f, - new List() {ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Storm Weaver", - (Func)(() => CalamityWorld.downedSentinel2), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in Space", - "[c/EE82EE:Storm Weaver hid itself once again within the stormfront.]", - "CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist"); - - //Signus - bossChecklist.Call( - "AddBoss", - 15.3f, - ModContent.NPCType(), - calamity, - "Signus", - (Func)(() => CalamityWorld.downedSentinel3), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Use a [i:" + ModContent.ItemType() + "] in the Underworld", - "[c/BA55D3:The Devourer's assassin has finished its easy task.]"); - - //Polterghast - bossChecklist.Call( - "AddBoss", - 15.5f, - new List() {ModContent.NPCType(), ModContent.NPCType()}, - calamity, - "Polterghast", - (Func)(() => CalamityWorld.downedPolterghast), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, - "Kill 30 phantom spirits or use a [i:" + ModContent.ItemType() + "] in the Dungeon", - "[c/B0E0E6:The volatile spirits disperse throughout the depths of the dungeon.]"); - - //Devourer of Gods - bossChecklist.Call( - "AddBoss", - 16f, - new List() {ModContent.NPCType()}, - calamity, - "Devourer of Gods", - (Func)(() => CalamityWorld.downedDoG), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use a [i:" + ModContent.ItemType() + "]", - "[c/00FFFF:The Devourer of Gods has slain everyone and feasted on their essence.]", - "CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist", - "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"); - - //Yharon - bossChecklist.Call( - "AddBoss", - 17f, - ModContent.NPCType(), - calamity, - "Yharon", - (Func)(() => CalamityWorld.downedYharon), - ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use a [i:" + ModContent.ItemType() + "] in the Jungle Biome", - (CalamityWorld.buffedEclipse ? "[c/FFA500:Yharon prepared itself for the worst possible outcome.]" : "[c/FFA500:Yharon found you too weak to stay near your gravestone.]"), - "CalamityMod/NPCs/Yharon/Yharon_BossChecklist"); - - //Supreme Calamitas - bossChecklist.Call( - "AddBoss", - 18f, - new List() {ModContent.NPCType()}, - calamity, - "Supreme Calamitas", - (Func)(() => CalamityWorld.downedSCal), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - "Use an [i:" + ModContent.ItemType() + "]", - "[c/FFA500:Please don't waste my time.]"); - - //King Slime - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "KingSlime", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "KingSlime", - new List() {ModContent.ItemType()}); - - //Eye of Cthulhu - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "EyeofCthulhu", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "EyeofCthulhu", - new List() {ModContent.ItemType()}); - - //Eater of Worlds - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "EaterofWorldsHead", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Brain of Cthulhu - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "BrainofCthulhu", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Queen Bee - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "QueenBee", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "QueenBee", - new List() {ModContent.ItemType()}); - - //Skeletron - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "SkeletronHead", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "SkeletronHead", - new List() {ModContent.ItemType()}); - - //Wall of Flesh - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "WallofFlesh", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "WallofFlesh", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //The Twins - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "TheTwins", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //The Destroyer - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "TheDestroyer", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "TheDestroyer", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Skeletron Prime - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "SkeletronPrime", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Plantera - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Plantera", - new List() {ModContent.ItemType(), ModContent.ItemType(), ItemID.JungleKey}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "Plantera", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Plantera", - new List() {ModContent.ItemType()}); - - //Golem - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Golem", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "Golem", - new List() {ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Golem", - new List() {ModContent.ItemType()}); - - //Duke Fishron - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "DukeFishron", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "DukeFishron", - new List() {ModContent.ItemType()}); - - //Lunatic Cultist - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "CultistBoss", - new List() {ModContent.ItemType()}); - - //Moon Lord - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "MoonLord", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossCollection", - "Terraria", - "MoonLord", - new List() {ModContent.ItemType()}); - - //Betsy - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "DD2Betsy", - new List() {ModContent.ItemType()}); - - //Blood Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Blood Moon", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - bossChecklist.Call( - "AddToBossSpawnItems", - "Terraria", - "Blood Moon", - new List() {ModContent.ItemType()}); - - //Goblin Army - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Goblin Army", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Pirates - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pirate Invasion", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Solar Eclipse - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Solar Eclipse", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Pumpkin Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pumpkin Moon", - new List() {ModContent.ItemType()}); - - //Pumpking - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Pumpking", - new List() {ModContent.ItemType()}); - - //Frost Moon - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Frost Moon", - new List() {ModContent.ItemType(), ModContent.ItemType()}); - - //Ice Queen - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Ice Queen", - new List() {ModContent.ItemType()}); - - //Martian Madness - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Martian Madness", - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}); - - //Martian Saucer - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Martian Saucer", - new List() {ModContent.ItemType()}); - - //Lunar Events - bossChecklist.Call( - "AddToBossLoot", - "Terraria", - "Lunar Event", - new List() {ModContent.ItemType()}); - } - } - - private static void CensusSupport() - { - Mod censusMod = ModLoader.GetMod("Census"); - if (censusMod != null) - { - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Defeat a Giant Clam after defeating the Desert Scourge"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Have a [i:" + ItemID.PlatinumCoin + "] in your inventory after defeating Skeletron"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Have [i:" + ModContent.ItemType() + "] in your inventory in Hardmode"); - censusMod.Call("TownNPCCondition", ModContent.NPCType(), "Defeat Cryogen"); - } - } + } + + // Wrapper function to add bosses to Boss Checklist. + private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon, + List loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddBoss", difficulty, npcType, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, bossHeadTex); + } + + // Wrapper function to add bosses with multiple segments or phases to Boss Checklist. + private static void AddBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, List npcTypes, Func downed, object summon, + List loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddBoss", difficulty, npcTypes, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, bossHeadTex); + } + + // Wrapper function to add minibosses to Boss Checklist. + private static void AddMiniBoss(Mod bossChecklist, Mod hostMod, string name, float difficulty, int npcType, Func downed, object summon, + List loot, List collection, string instructions, string despawn, string bossLogTex = null, string bossHeadTex = null) + { + bossChecklist.Call("AddMiniBoss", difficulty, npcType, hostMod, name, downed, summon ?? null, collection, loot, instructions, despawn, bossLogTex, bossHeadTex); + } + + // Wrapper function to add loot and collection items to vanilla bosses for Boss Checklist. + private static void AddLoot(Mod bossChecklist, string bossName, List loot = null, List collection = null) + => AddLoot(bossChecklist, "Terraria", bossName, loot, collection); + + // Wrapper function to add loot and collection items to other mods' bosses for Boss Checklist. + private static void AddLoot(Mod bossChecklist, string mod, string bossName, List loot = null, List collection = null) + { + if (loot != null) + bossChecklist.Call("AddToBossLoot", mod, bossName, loot); + if (collection != null) + bossChecklist.Call("AddToBossCollection", mod, bossName, collection); + } + + // Wrapper function to add summon items to vanilla bosses for Boss Checklist. + private static void AddSummons(Mod bossChecklist, string bossName, List summons) => AddSummons(bossChecklist, "Terraria", bossName, summons); + + // Wrapper function to add summon items to other mods' bosses for Boss Checklist. + private static void AddSummons(Mod bossChecklist, string mod, string bossName, List summons) => bossChecklist.Call("AddToBossSpawnItems", mod, bossName, summons); + + /// + /// 1.0 = King Slime
+ /// 2.0 = Eye of Cthulhu
+ /// 3.0 = Eater of Worlds / Brain of Cthulhu
+ /// 4.0 = Queen Bee
+ /// 5.0 = Skeletron
+ /// 6.0 = Wall of Flesh
+ /// 7.0 = The Twins
+ /// 8.0 = The Destroyer
+ /// 9.0 = Skeletron Prime
+ /// 10.0 = Plantera
+ /// 11.0 = Golem
+ /// 12.0 = Duke Fishron
+ /// 13.0 = Lunatic Cultist
+ /// 14.0 = Moon Lord + ///
+ private static void BossChecklistSupport() + { + Mod bossChecklist = ModLoader.GetMod("BossChecklist"); + Mod calamity = GetInstance(); + + // TODO -- calamity music mod should call boss checklist to add loot to calamity bosses on its own + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + + if (bossChecklist is null) + return; + + // Adds every single Calamity boss and miniboss to Boss Checklist's Boss Log. + AddCalamityBosses(bossChecklist, calamity); + + // Loot which Calamity adds to vanilla bosses and events is also added to Boss Checklist's Boss Log. + AddCalamityBossLoot(bossChecklist); + AddCalamityEventLoot(bossChecklist); + } + + private static void AddCalamityBosses(Mod bossChecklist, Mod calamity) + { + // Desert Scourge + { + BossDifficulty.TryGetValue("DesertScourge", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SandBlock, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Desert Biome"; + string despawn = CalamityUtils.ColorMessage("The scourge of the desert delved back into the sand.", new Color(0xEE, 0xE8, 0xAA)); + string bossLogTex = "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist"; + AddBoss(bossChecklist, calamity, "Desert Scourge", order, segments, DownedDesertScourge, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Giant Clam + { + BossDifficulty.TryGetValue("GiantClam", out float order); + int type = NPCType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = "Can spawn naturally in the Sunken Sea"; + string despawn = CalamityUtils.ColorMessage("The Giant Clam returns into hiding in its grotto.", new Color(0x7F, 0xFF, 0xD4)); + AddMiniBoss(bossChecklist, calamity, "Giant Clam", order, type, DownedGiantClam, null, loot, null, instructions, despawn); + } + + // Crabulon + { + BossDifficulty.TryGetValue("Crabulon", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.GlowingMushroom, ItemID.MushroomGrassSeeds, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Mushroom Biome"; + string despawn = CalamityUtils.ColorMessage("The mycleium crab has lost interest.", new Color(0x64, 0x95, 0xED)); + AddBoss(bossChecklist, calamity, "Crabulon", order, type, DownedCrabulon, summon, loot, collection, instructions, despawn); + } + + // Hive Mind + { + BossDifficulty.TryGetValue("HiveMind", out float order); + List phases = new List() { NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.DemoniteBar, ItemID.RottenChunk, ItemID.CursedFlame, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Kill a Cyst in the Corruption or use a [i:{summon}] in the Corruption"; + string despawn = CalamityUtils.ColorMessage("The corrupted colony began searching for a new breeding ground.", new Color(0x94, 0x00, 0xD3)); + AddBoss(bossChecklist, calamity, "Hive Mind", order, phases, DownedHiveMind, summon, loot, collection, instructions, despawn); + } + + // Perforators + { + BossDifficulty.TryGetValue("Perforators", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.CrimtaneBar, ItemID.Vertebrae, ItemID.Ichor, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.LesserHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Kill a Cyst in the Crimson or use a [i:{summon}] in the Crimson"; + string despawn = CalamityUtils.ColorMessage("The parasitic hive began searching for a new host.", new Color(0xDC, 0x14, 0x3C)); + AddBoss(bossChecklist, calamity, "The Perforators", order, type, DownedPerfs, summon, loot, collection, instructions, despawn); + } + + // Slime God + { + BossDifficulty.TryGetValue("SlimeGod", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.Gel, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The gelatinous monstrosity achieved vengeance for its breathren.", new Color(0xBA, 0x55, 0x33)); + AddBoss(bossChecklist, calamity, "Slime God", order, bosses, DownedSlimeGod, summon, loot, collection, instructions, despawn); + } + + // Cryogen + { + BossDifficulty.TryGetValue("Cryogen", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SoulofMight, ItemType(), ItemType(), ItemID.FrostCore, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FrozenKey, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Snow Biome"; + string despawn = CalamityUtils.ColorMessage("Cryogen drifts away, carried on a freezing wind.", new Color(0x00, 0xFF, 0xFF)); + string bossLogTex = "CalamityMod/NPCs/Cryogen/Cryogen_BossChecklist"; + AddBoss(bossChecklist, calamity, "Cryogen", order, type, DownedCryogen, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Brimstone Elemental + { + BossDifficulty.TryGetValue("BrimstoneElemental", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.SoulofFright, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Brimstone Crag"; + string despawn = CalamityUtils.ColorMessage("Brimstone Elemental withdraws to the ruins of her shrine.", new Color(0xDC, 0x14, 0x3C)); + AddBoss(bossChecklist, calamity, "Brimstone Elemental", order, type, DownedBrimstoneElemental, summon, loot, collection, instructions, despawn); + } + + // Aquatic Scourge + { + BossDifficulty.TryGetValue("AquaticScourge", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.SoulofSight, ItemType(), ItemID.Coral, ItemID.Seashell, ItemID.Starfish, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.AnglerTackleBag, ItemID.HighTestFishingLine, ItemID.TackleBox, ItemID.AnglerEarring, ItemID.FishermansGuide, ItemID.WeatherRadio, ItemID.Sextant, ItemID.AnglerHat, ItemID.AnglerVest, ItemID.AnglerPants, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GoldenBugNet, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea"; + string despawn = CalamityUtils.ColorMessage("The Aquatic Scourge swam back into the open ocean.", new Color(0xF0, 0xE6, 0x8C)); + string bossLogTex = "CalamityMod/NPCs/AquaticScourge/AquaticScourge_BossChecklist"; + AddBoss(bossChecklist, calamity, "Aquatic Scourge", order, segments, DownedAquaticScourge, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Calamitas + { + BossDifficulty.TryGetValue("Calamitas", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.BrokenHeroSword, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] at Night"; + string despawn = CalamityUtils.ColorMessage("If you wanted a fight, you should've came more prepared.", new Color(0xFF, 0xA5, 0x00)); + AddBoss(bossChecklist, calamity, "Calamitas", order, type, DownedCalamitas, summon, loot, collection, instructions, despawn); + } + + // Great Sand Shark + { + BossDifficulty.TryGetValue("GreatSandShark", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.AncientBattleArmorMaterial }; + List collection = new List() { ItemID.MusicBoxSandstorm }; + string instructions = $"Kill 10 sand sharks after defeating Plantera or use a [i:{summon}] in the Desert Biome"; + string despawn = CalamityUtils.ColorMessage("The apex predator of the sands disappears into the dunes...", new Color(0xDA, 0xA5, 0x20)); + AddMiniBoss(bossChecklist, calamity, "Great Sand Shark", order, type, DownedGSS, summon, loot, collection, instructions, despawn); + } + + // Siren and Leviathan + { + BossDifficulty.TryGetValue("Leviathan", out float order); + List bosses = new List() { NPCType(), NPCType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HotlineFishingHook, ItemID.BottomlessBucket, ItemID.SuperAbsorbantSponge, ItemID.FishingPotion, ItemID.SonarPotion, ItemID.CratePotion, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = "By killing an unknown entity in the Ocean Biome"; + string despawn = CalamityUtils.ColorMessage("The aquatic entities sink back beneath the ocean depths.", new Color(0x7F, 0xFF, 0xD4)); + string bossLogTex = "CalamityMod/NPCs/Leviathan/SirenandLevi_BossChecklist"; + AddBoss(bossChecklist, calamity, "Leviathan", order, bosses, DownedLeviathan, null, loot, collection, instructions, despawn, bossLogTex); + } + + // Astrum Aureus + { + BossDifficulty.TryGetValue("AstrumAureus", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemID.FallenStar, ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HallowedKey, ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] at Night in the Astral Biome"; + string despawn = CalamityUtils.ColorMessage("Astrum Aureus’ program has been executed. Initiate recall.", new Color(0xFF, 0xD7, 0x00)); + string bossLogTex = "CalamityMod/NPCs/AstrumAureus/AstrumAureus_BossChecklist"; + AddBoss(bossChecklist, calamity, "Astrum Aureus", order, type, DownedAureus, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Plaguebringer Goliath + { + BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}] in the Jungle Biome"; + string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00)); + AddBoss(bossChecklist, calamity, "Plaguebringer Goliath", order, type, DownedPBG, summon, loot, collection, instructions, despawn); + } + + // Ravager + { + BossDifficulty.TryGetValue("Ravager", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The automaton of misshapen victims went looking for the true perpetrator.", new Color(0xB2, 0x22, 0x22)); + string bossLogTex = "CalamityMod/NPCs/Ravager/Ravager_BossChecklist"; + AddBoss(bossChecklist, calamity, "Ravager", order, segments, DownedRavager, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Astrum Deus + { + BossDifficulty.TryGetValue("AstrumDeus", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.FragmentSolar, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentStardust, ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Defeat 3 empowered astral titans or use a [i:{summon}] at Night"; + string despawn = CalamityUtils.ColorMessage("The infected deity retreats to the heavens.", new Color(0xFF, 0xD7, 0x00)); + string bossLogTex = "CalamityMod/NPCs/AstrumDeus/AstrumDeus_BossChecklist"; + AddBoss(bossChecklist, calamity, "Astrum Deus", order, segments, DownedDeus, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Profaned Guardians + { + BossDifficulty.TryGetValue("ProfanedGuardians", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemID.GreaterHealingPotion }; + List collection = new List() { ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Hallow or Underworld Biomes"; + string despawn = CalamityUtils.ColorMessage("The guardians must protect their goddess at all costs.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist"; + AddBoss(bossChecklist, calamity, "Profaned Guardians", order, type, DownedGuardians, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Bumblebirb + { + BossDifficulty.TryGetValue("Bumblebirb", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use [i:{summon}] in the Jungle Biome"; + string despawn = CalamityUtils.ColorMessage("The failed experiment returns into its reproductive routine.", new Color(0xFF, 0xD7, 0x00)); + AddBoss(bossChecklist, calamity, "Bumblebirb", order, type, DownedBirb, summon, loot, collection, instructions, despawn); + } + + // Providence + { + BossDifficulty.TryGetValue("Providence", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + List summons = new List() { ItemType(), ItemType() }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use either [i:{ItemType()}] or [i:{ItemType()}] in the Hallow or Underworld Biomes"; + string despawn = CalamityUtils.ColorMessage("The Profaned Goddess vanishes in a burning blaze.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/Providence/Providence_BossChecklist"; + AddBoss(bossChecklist, calamity, "Providence", order, bosses, DownedProvidence, summons, loot, collection, instructions, despawn, bossLogTex); + } + + // Ceaseless Void + { + BossDifficulty.TryGetValue("CeaselessVoid", out float order); + List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Dungeon"; + string despawn = CalamityUtils.ColorMessage("The rift in time and space has moved away from your reach.", new Color(0x4B, 0x00, 0x82)); + AddBoss(bossChecklist, calamity, "Ceaseless Void", order, bosses, DownedCeaselessVoid, summon, loot, collection, instructions, despawn); + } + + // Storm Weaver + { + BossDifficulty.TryGetValue("StormWeaver", out float order); + List segments = new List() { NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in Space"; + string despawn = CalamityUtils.ColorMessage("Storm Weaver hid itself once again within the stormfront.", new Color(0xEE, 0x82, 0xEE)); + string bossLogTex = "CalamityMod/NPCs/StormWeaver/StormWeaver_BossChecklist"; + AddBoss(bossChecklist, calamity, "Storm Weaver", order, segments, DownedStormWeaver, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Signus + { + BossDifficulty.TryGetValue("Signus", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Underworld"; + string despawn = CalamityUtils.ColorMessage("The Devourer's assassin has finished its easy task.", new Color(0xBA, 0x55, 0xD3)); + AddBoss(bossChecklist, calamity, "Signus", order, type, DownedSignus, summon, loot, collection, instructions, despawn); + } + + // Polterghast + { + BossDifficulty.TryGetValue("Polterghast", out float order); + List bosses = new List() { NPCType(), NPCType() }; + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Kill 30 phantom spirits or use a [i:{summon}] in the Dungeon"; + string despawn = CalamityUtils.ColorMessage("The volatile spirits disperse throughout the depths of the dungeon.", new Color(0xB0, 0xE0, 0xE6)); + AddBoss(bossChecklist, calamity, "Polterghast", order, bosses, DownedPolterghast, summon, loot, collection, instructions, despawn); + } + + // Devourer of Gods + { + BossDifficulty.TryGetValue("DevourerOfGods", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("The Devourer of Gods has slain everyone and feasted on their essence.", new Color(0x00, 0xFF, 0xFF)); + string bossLogTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGods_BossChecklist"; + string bossHeadTex = "CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead_Head_Boss"; + AddBoss(bossChecklist, calamity, "Devourer of Gods", order, type, DownedDoG, summon, loot, collection, instructions, despawn, bossLogTex, bossHeadTex); + } + + // Yharon + { + BossDifficulty.TryGetValue("Yharon", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + string instructions = $"Use a [i:{summon}] in the Jungle Biome"; + // TODO -- this setup code is only run once, so the despawn message can't be changed post-eclipse. Find a way around this. + string despawn = CalamityUtils.ColorMessage("Yharon found you too weak to stay near your gravestone.", new Color(0xFF, 0xA5, 0x00)); + string bossLogTex = "CalamityMod/NPCs/Yharon/Yharon_BossChecklist"; + AddBoss(bossChecklist, calamity, "Yharon", order, type, DownedYharon, summon, loot, collection, instructions, despawn, bossLogTex); + } + + // Supreme Calamitas + { + BossDifficulty.TryGetValue("SupremeCalamitas", out float order); + int type = NPCType(); + int summon = ItemType(); + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType() }; + string instructions = $"Use an [i:{summon}]"; + string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00)); + AddBoss(bossChecklist, calamity, "Supreme Calamitas", order, type, DownedSCal, summon, loot, collection, instructions, despawn); + } + } + + private static void AddCalamityBossLoot(Mod bossChecklist) + { + // King Slime + AddLoot(bossChecklist, "KingSlime", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Eye of Cthulhu + AddLoot(bossChecklist, "EyeofCthulhu", + new List() { ItemType(), ItemType(), ItemType() }, + new List() { ItemType() } + ); + + // Eater of Worlds + AddLoot(bossChecklist, "EaterofWorldsHead", + null, + new List() { ItemType(), ItemType() } + ); + + // Brain of Cthulhu + AddLoot(bossChecklist, "BrainofCthulhu", + null, + new List() { ItemType(), ItemType() } + ); + + // Queen Bee + AddLoot(bossChecklist, "QueenBee", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Skeletron + AddLoot(bossChecklist, "SkeletronHead", + new List() { ItemType() }, + new List() { ItemType() } + ); + + // Wall of Flesh + AddLoot(bossChecklist, "WallofFlesh", + new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.CorruptionKey, ItemID.CrimsonKey }, + new List() { ItemType(), ItemType(), ItemType() } + ); + + // The Twins + AddLoot(bossChecklist, "TheTwins", + null, + new List() { ItemType(), ItemType() } + ); + + // The Destroyer + AddLoot(bossChecklist, "TheDestroyer", + new List() { ItemType() }, + new List() { ItemType(), ItemType() } + ); + + // Skeletron Prime + AddLoot(bossChecklist, "SkeletronPrime", + null, + new List() { ItemType(), ItemType() } + ); + + // Plantera + AddLoot(bossChecklist, "Plantera", + new List() { ItemType(), ItemType(), ItemID.JungleKey }, + new List() { ItemType() } + ); + AddSummons(bossChecklist, "Plantera", new List() { ItemType() }); + + // Golem + AddLoot(bossChecklist, "Golem", + new List() { ItemType(), ItemType() }, + new List() { ItemType() } + ); + AddSummons(bossChecklist, "Golem", new List() { ItemType() }); + + // Duke Fishron + AddLoot(bossChecklist, "DukeFishron", + new List() { ItemType(), ItemType() }, + new List() { ItemType() } + ); + + // Betsy + AddLoot(bossChecklist, "DD2Betsy", + null, + new List() { ItemType() } + ); + + // Lunatic Cultist + AddLoot(bossChecklist, "CultistBoss", + new List() { ItemType(), ItemType() }, + new List() { ItemType(), ItemType() } + ); + AddSummons(bossChecklist, "CultistBoss", new List() { ItemType() }); + + // Moon Lord + AddLoot(bossChecklist, "MoonLord", + new List() { ItemType(), ItemType(), ItemType(), ItemType() }, + new List() { ItemType() } + ); + } + + private static void AddCalamityEventLoot(Mod bossChecklist) + { + // Blood Moon + AddLoot(bossChecklist, "Blood Moon", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + AddSummons(bossChecklist, "Blood Moon", new List() { ItemType() }); + + // Goblin Army + AddLoot(bossChecklist, "Goblin Army", + new List() { ItemType(), ItemType(), ItemType(), ItemType() }, + null + ); + + // Pirates + AddLoot(bossChecklist, "Pirate Invasion", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + + // Solar Eclipse + AddLoot(bossChecklist, "Solar Eclipse", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + + // Pumpkin Moon + AddLoot(bossChecklist, "Pumpkin Moon", + new List() { ItemType() }, + null + ); + AddLoot(bossChecklist, "Pumpking", + new List() { ItemType() }, + null + ); + + // Frost Moon + AddLoot(bossChecklist, "Frost Moon", + new List() { ItemType(), ItemType() }, + null + ); + AddLoot(bossChecklist, "Ice Queen", + new List() { ItemType() }, + null + ); + + // Martian Madness + AddLoot(bossChecklist, "Martian Madness", + new List() { ItemType(), ItemType(), ItemType() }, + null + ); + AddLoot(bossChecklist, "Martian Saucer", + new List() { ItemType() }, + null + ); + + // Lunar Events + AddLoot(bossChecklist, "Lunar Event", + new List() { ItemType() }, + null + ); + } + + private static void FargosSupport() + { + Mod fargos = ModLoader.GetMod("Fargowiltas"); + if (fargos is null) + return; + + // fargos.Call... + } + + private static void CensusSupport() + { + Mod censusMod = ModLoader.GetMod("Census"); + if (censusMod != null) + { + censusMod.Call("TownNPCCondition", NPCType(), "Defeat a Giant Clam after defeating the Desert Scourge"); + censusMod.Call("TownNPCCondition", NPCType(), "Have a [i:" + ItemID.PlatinumCoin + "] in your inventory after defeating Skeletron"); + censusMod.Call("TownNPCCondition", NPCType(), "Have [i:" + ItemType() + "] in your inventory in Hardmode"); + censusMod.Call("TownNPCCondition", NPCType(), "Defeat Cryogen"); + } + } private static void SummonersAssociationSupport() { Mod SummonersAssociation = ModLoader.GetMod("SummonersAssociation"); if(SummonersAssociation != null) { - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), new List() {ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType()}, new List() {(1f-0.6666666f), 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), new List() {ModContent.ProjectileType(), ModContent.ProjectileType()}); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType(), 1f); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ModContent.ItemType(), ModContent.BuffType(), ModContent.ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); } } - } + } } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 1caae24bfc..99ebfccb94 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -2151,6 +2151,13 @@ namespace CalamityMod break; } } + + public static string ColorMessage(string msg, Color color) + { + StringBuilder sb = new StringBuilder(msg.Length + 12); + sb.Append("[c/").Append(color.Hex3()).Append(':').Append(msg).Append(']'); + return sb.ToString(); + } #endregion #region Miscellaneous Utilities diff --git a/Utilities/Downed.cs b/Utilities/Downed.cs new file mode 100644 index 0000000000..64a17c4610 --- /dev/null +++ b/Utilities/Downed.cs @@ -0,0 +1,35 @@ +using CalamityMod.World; +using System; + +namespace CalamityMod +{ + internal class Downed + { + public static readonly Func DownedDesertScourge = () => CalamityWorld.downedDesertScourge; + public static readonly Func DownedGiantClam = () => CalamityWorld.downedCLAM; + public static readonly Func DownedCrabulon = () => CalamityWorld.downedCrabulon; + public static readonly Func DownedHiveMind = () => CalamityWorld.downedHiveMind; + public static readonly Func DownedPerfs = () => CalamityWorld.downedPerforator; + public static readonly Func DownedSlimeGod = () => CalamityWorld.downedSlimeGod; + public static readonly Func DownedCryogen = () => CalamityWorld.downedCryogen; + public static readonly Func DownedBrimstoneElemental = () => CalamityWorld.downedBrimstoneElemental; + public static readonly Func DownedAquaticScourge = () => CalamityWorld.downedAquaticScourge; + public static readonly Func DownedCalamitas = () => CalamityWorld.downedCalamitas; + public static readonly Func DownedGSS = () => CalamityWorld.downedGSS; + public static readonly Func DownedLeviathan = () => CalamityWorld.downedLeviathan; + public static readonly Func DownedAureus = () => CalamityWorld.downedAstrageldon; + public static readonly Func DownedPBG = () => CalamityWorld.downedPlaguebringer; + public static readonly Func DownedRavager = () => CalamityWorld.downedScavenger; + public static readonly Func DownedDeus = () => CalamityWorld.downedStarGod; + public static readonly Func DownedGuardians = () => CalamityWorld.downedGuardians; + public static readonly Func DownedBirb = () => CalamityWorld.downedBumble; + public static readonly Func DownedProvidence = () => CalamityWorld.downedProvidence; + public static readonly Func DownedCeaselessVoid = () => CalamityWorld.downedSentinel1; + public static readonly Func DownedStormWeaver = () => CalamityWorld.downedSentinel2; + public static readonly Func DownedSignus = () => CalamityWorld.downedSentinel3; + public static readonly Func DownedPolterghast = () => CalamityWorld.downedPolterghast; + public static readonly Func DownedDoG = () => CalamityWorld.downedDoG; + public static readonly Func DownedYharon = () => CalamityWorld.downedYharon; + public static readonly Func DownedSCal = () => CalamityWorld.downedSCal; + } +} From 91459254c6b44cf9c0980550835b90d3aad06f3b Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Tue, 10 Mar 2020 16:56:39 -0500 Subject: [PATCH 20/40] Eternity fixes/changes --- Items/Weapons/Magic/Eternity.cs | 2 +- Projectiles/Magic/EternityBook.cs | 2 +- Projectiles/Magic/EternityHex.cs | 33 ++++++++++++++++++++++++++++--- Utilities/CalamityUtils.cs | 2 +- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/Magic/Eternity.cs b/Items/Weapons/Magic/Eternity.cs index 0dc96923a5..be91cb12dc 100644 --- a/Items/Weapons/Magic/Eternity.cs +++ b/Items/Weapons/Magic/Eternity.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic { public class Eternity : ModItem { - public const int BaseDamage = 4770; + public const int BaseDamage = 7777; public const int ExplosionDamage = 50000; public const int MaxHomers = 40; public const int dustID = 16; diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs index 39ed20b136..2eb7bb14ca 100644 --- a/Projectiles/Magic/EternityBook.cs +++ b/Projectiles/Magic/EternityBook.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ai[0]++; if (projectile.ai[0] == 1f) { - NPC target = projectile.Center.ClosestNPCAt(4400f); + NPC target = projectile.Center.ClosestNPCAt(4400f, true); if (target != null) { diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index d760974a89..690b44b3ec 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Magic projectile.tileCollide = false; projectile.timeLeft = int.MaxValue; //Killed manually projectile.extraUpdates = extraUpdateCount; + projectile.alpha = 255; } public override void AI() { @@ -38,9 +39,35 @@ namespace CalamityMod.Projectiles.Magic if (!target.active) { - DeathDust(); - projectile.Kill(); - return; + NPC potentialNPC = projectile.Center.ClosestNPCAt(4400f, true); + if (potentialNPC != null) + { + projectile.ai[0] = potentialNPC.whoAmI; + target = Main.npc[(int)projectile.ai[0]]; + for (int i = 0; i < Main.projectile.Length; i++) + { + Projectile proj = Main.projectile[i]; + if ((proj.whoAmI == projectile.whoAmI || + proj.type == ModContent.ProjectileType()) && + proj.active && proj.owner == projectile.owner) + { + if (proj.type == ModContent.ProjectileType()) + proj.ai[0] = projectile.ai[0]; + for (int j = 0; j < 44; j++) + { + Dust dust = Dust.NewDustPerfect(proj.Center, Eternity.dustID, newColor: new Color(245, 112, 218)); + dust.velocity = Utils.NextVector2Unit(Main.rand) * Main.rand.NextFloat(2f, 6f); + dust.noGravity = true; + } + } + } + } + else + { + DeathDust(); + projectile.Kill(); + return; + } } if (projectile.localAI[1] >= Main.projectile.Length || projectile.localAI[0] < 0) diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 1caae24bfc..c482cea687 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -155,7 +155,7 @@ namespace CalamityMod { for (int index = 0; index < Main.npc.Length; index++) { - if (Main.npc[index].CanBeChasedBy(null, false) && Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1)) + if (Main.npc[index].CanBeChasedBy(null, false)) { if (Vector2.Distance(origin, Main.npc[index].Center) < distance) { From b995ca95f2e115e4069e1afa6b5edaa3805a7fdf Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Tue, 10 Mar 2020 17:19:32 -0500 Subject: [PATCH 21/40] Fixed a dumb oversight I made --- NPCs/CalamityGlobalNPC.cs | 16 ++++++++++++++++ NPCs/CalamityGlobalNPCLoot.cs | 13 +++++++++++++ 2 files changed, 29 insertions(+) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ff0cc8b189..a29aa9f10b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -7,6 +7,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Buffs.Potions; using CalamityMod.CalPlayer; using CalamityMod.Dusts; +using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Ammo; using CalamityMod.Items.Materials; @@ -56,6 +57,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.Localization; @@ -3666,6 +3668,12 @@ namespace CalamityMod.NPCs { spawnRate = (int)(spawnRate * 0.7); maxSpawns = (int)(maxSpawns * 1.2f); + + if (player.Calamity().ZoneSulphur && !player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid) + { + spawnRate = 23; + maxSpawns = 20; + } } } else if (player.Calamity().ZoneAbyss) @@ -3794,6 +3802,14 @@ namespace CalamityMod.NPCs { pool[0] = 0f; } + if (spawnInfo.player.Calamity().ZoneSulphur && !spawnInfo.player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid) + { + pool.Clear(); + foreach (int enemy in AcidRainEvent.PossibleEnemies.Select(enemyType => enemyType.Item1)) + { + pool.Add(enemy, 1f); + } + } } #endregion diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 5c92d6e53f..271eff59aa 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; +using CalamityMod.Events; using CalamityMod.Items; using CalamityMod.Items.Accessories; using CalamityMod.Items.DifficultyItems; @@ -32,6 +33,7 @@ using CalamityMod.NPCs.StormWeaver; using CalamityMod.Tiles.Ores; using CalamityMod.World; using Microsoft.Xna.Framework; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.Localization; @@ -755,6 +757,7 @@ namespace CalamityMod.NPCs if (CalamityWorld.armageddon) ArmageddonLoot(npc); + AcidRainProgression(npc); CheckBossSpawn(npc); ArmorSetLoot(npc); RareLoot(npc); @@ -1579,6 +1582,16 @@ namespace CalamityMod.NPCs } #endregion + #region Acid Rain + private void AcidRainProgression(NPC npc) + { + if (AcidRainEvent.PossibleEnemies.Select(enemy => enemy.Item1).Contains(npc.type) && CalamityWorld.rainingAcid) + { + Main.invasionSize -= AcidRainEvent.PossibleEnemies.Find(enemy => enemy.Item1 == npc.type).Item2; + } + } + #endregion + #region Common Loot private void CommonLoot(NPC npc) { From f9214aa8587004f86df48a2e4e51167743d8a372 Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Tue, 10 Mar 2020 17:21:48 -0500 Subject: [PATCH 22/40] Invasion update occurs when AR enemies are killed --- NPCs/CalamityGlobalNPCLoot.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 271eff59aa..924c75378f 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1589,6 +1589,7 @@ namespace CalamityMod.NPCs { Main.invasionSize -= AcidRainEvent.PossibleEnemies.Find(enemy => enemy.Item1 == npc.type).Item2; } + AcidRainEvent.UpdateInvasion(); } #endregion From 96c4f7ba5dc227d6c3020beb7e7f00034b2bb491 Mon Sep 17 00:00:00 2001 From: DominicKarma Date: Tue, 10 Mar 2020 17:54:05 -0500 Subject: [PATCH 23/40] Summon tweaks and other balancing --- Items/Accessories/MutatedTruffle.cs | 2 +- Items/Weapons/Magic/AcidGun.cs | 2 +- Items/Weapons/Magic/Miasma.cs | 2 +- Items/Weapons/Magic/VitriolicViper.cs | 2 +- Items/Weapons/Melee/Basher.cs | 2 +- Items/Weapons/Ranged/Toxibow.cs | 2 +- Items/Weapons/Summon/CausticCroakerStaff.cs | 2 +- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- Items/Weapons/Summon/DazzlingStabberStaff.cs | 2 +- Items/Weapons/Summon/DragonbloodDisgorger.cs | 2 +- Items/Weapons/Summon/EndoHydraStaff.cs | 2 +- Items/Weapons/Summon/FuelCellBundle.cs | 2 +- Items/Weapons/Summon/RadiantResolution.cs | 2 +- Projectiles/Magic/MiasmaGas.cs | 2 +- Projectiles/Magic/VitriolicViperFang.cs | 2 +- Projectiles/Magic/VitriolicViperSpit.cs | 2 +- Projectiles/Rogue/ToxicantTwisterProjectile.cs | 2 +- Projectiles/Summon/IgneousBlade.cs | 2 +- Projectiles/Summon/OldDukeHeadCorpse.cs | 2 +- Projectiles/Summon/PlaguebringerMK2.cs | 8 +++++--- Projectiles/Summon/SkeletalDragonMother.cs | 12 ++++++++++++ 21 files changed, 36 insertions(+), 22 deletions(-) diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index 1ed626eccc..d605292c76 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories modPlayer.miniOldDuke = true; if (player.whoAmI == Main.myPlayer) { - const int damage = 2000; + const int damage = 1750; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs index c6289c58ac..90591e1f9d 100644 --- a/Items/Weapons/Magic/AcidGun.cs +++ b/Items/Weapons/Magic/AcidGun.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 20; + item.damage = 14; item.magic = true; item.mana = 9; item.width = 48; diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index fdbfc32794..f82f82d2f0 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 123; + item.damage = 78; item.magic = true; item.mana = 16; item.width = 50; diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index 1eff8574b4..8870676bdf 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 90; + item.damage = 47; item.magic = true; item.mana = 15; item.width = 60; diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 090b39816d..0570277584 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 30; item.height = 52; - item.damage = 22; + item.damage = 17; item.melee = true; item.useAnimation = item.useTime = 26; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs index a405ca513e..3dd7444c46 100644 --- a/Items/Weapons/Ranged/Toxibow.cs +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 12; + item.damage = 9; item.ranged = true; item.width = 20; item.height = 54; diff --git a/Items/Weapons/Summon/CausticCroakerStaff.cs b/Items/Weapons/Summon/CausticCroakerStaff.cs index d1fcf1fd54..d8f1a68e22 100644 --- a/Items/Weapons/Summon/CausticCroakerStaff.cs +++ b/Items/Weapons/Summon/CausticCroakerStaff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 20; + item.damage = 17; item.mana = 10; item.width = 10; item.height = 32; diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 00d8efe8f4..66cf896919 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 456; + item.damage = 200; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index 2b47d99d2a..a9de6fa95a 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_DarkMageHealImpact; item.summon = true; item.mana = 12; - item.damage = 111; + item.damage = 51; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 21; diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index 31a81446bb..c62ab72828 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 300; + item.damage = 276; item.mana = 30; item.width = 64; item.height = 62; diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index f6eefe1b04..fec291fa6d 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item60; item.summon = true; item.mana = 25; - item.damage = 2563; + item.damage = 1450; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs index 76204b8f27..a4ae6ab025 100644 --- a/Items/Weapons/Summon/FuelCellBundle.cs +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 10; - item.damage = 50; + item.damage = 44; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 32; item.height = 32; diff --git a/Items/Weapons/Summon/RadiantResolution.cs b/Items/Weapons/Summon/RadiantResolution.cs index 0e063a6a4e..0909331196 100644 --- a/Items/Weapons/Summon/RadiantResolution.cs +++ b/Items/Weapons/Summon/RadiantResolution.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon item.summon = true; item.mana = 100; - item.damage = 666; + item.damage = 720; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Projectiles/Magic/MiasmaGas.cs b/Projectiles/Magic/MiasmaGas.cs index b1e7b012fd..18cde801de 100644 --- a/Projectiles/Magic/MiasmaGas.cs +++ b/Projectiles/Magic/MiasmaGas.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Magic projectile.timeLeft = 600; projectile.penetrate = 10; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 3; + projectile.localNPCHitCooldown = 7; projectile.magic = true; } diff --git a/Projectiles/Magic/VitriolicViperFang.cs b/Projectiles/Magic/VitriolicViperFang.cs index a68265f43e..84d21e24f6 100644 --- a/Projectiles/Magic/VitriolicViperFang.cs +++ b/Projectiles/Magic/VitriolicViperFang.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = 4; projectile.timeLeft = 300; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 6; } public override void AI() diff --git a/Projectiles/Magic/VitriolicViperSpit.cs b/Projectiles/Magic/VitriolicViperSpit.cs index b69c9fa2bc..a267716701 100644 --- a/Projectiles/Magic/VitriolicViperSpit.cs +++ b/Projectiles/Magic/VitriolicViperSpit.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = 1; projectile.timeLeft = 300; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 6; + projectile.localNPCHitCooldown = 8; } public override void AI() diff --git a/Projectiles/Rogue/ToxicantTwisterProjectile.cs b/Projectiles/Rogue/ToxicantTwisterProjectile.cs index d6a0533f7d..a1a85be682 100644 --- a/Projectiles/Rogue/ToxicantTwisterProjectile.cs +++ b/Projectiles/Rogue/ToxicantTwisterProjectile.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike) { - if (projectile.timeLeft % 18f == 0f) + if (projectile.timeLeft % 25f == 0f) { for (int i = 0; i < 2; i++) { diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index 4c1ad5ba09..74cd54deb3 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon { Vector2 spawnPosition = target.Center - new Vector2(0f, 550f).RotatedByRandom(MathHelper.ToRadians(8f)); Projectile.NewProjectile(spawnPosition, Vector2.Normalize(target.Center - spawnPosition) * 24f, ModContent.ProjectileType(), - projectile.damage, projectile.knockBack, projectile.owner); + (int)(projectile.damage * 0.666), projectile.knockBack, projectile.owner); } for (int i = 0; i < Main.rand.Next(28, 41); i++) { diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index d22db8cf4f..ef269b7f5f 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f); angle *= Math.Sign(target.Center.X - projectile.Center.X); Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f, - new Vector2(0f, -Main.rand.NextFloat(14f, 23f)).RotatedBy(angle), + new Vector2(0f, -Main.rand.NextFloat(21f, 30.5f)).RotatedBy(angle), ModContent.ProjectileType(), projectile.damage, 5f, projectile.owner); } diff --git a/Projectiles/Summon/PlaguebringerMK2.cs b/Projectiles/Summon/PlaguebringerMK2.cs index 35e71fec58..b634d60803 100644 --- a/Projectiles/Summon/PlaguebringerMK2.cs +++ b/Projectiles/Summon/PlaguebringerMK2.cs @@ -78,19 +78,19 @@ namespace CalamityMod.Projectiles.Summon Vector2 velocity = projectile.DirectionTo(destination) * projectile.Distance(destination) / 36f; projectile.velocity = velocity; } - int timeNeeded = (int)MathHelper.Lerp(60f, 10f, MathHelper.Clamp(projectile.localAI[1] / 320f, 0f, 1f)); + int timeNeeded = (int)MathHelper.Lerp(60f, 18f, MathHelper.Clamp(projectile.localAI[1] / 320f, 0f, 1f)); if (projectile.ai[0] >= timeNeeded) { Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * 14f, ModContent.ProjectileType(), - projectile.damage / 2, + (int)(projectile.damage / 0.3), 3f, projectile.owner); Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * 11.5f, ModContent.ProjectileType(), - projectile.damage / 2, + (int)(projectile.damage / 0.3), 3f, projectile.owner); projectile.ai[0] = 0; @@ -116,6 +116,8 @@ namespace CalamityMod.Projectiles.Summon } Vector2 velocity = distanceToDestination.SafeNormalize(projectile.direction * Vector2.UnitX) * speed; projectile.velocity = (projectile.velocity * 20f + velocity) / 21f; + if (distance > 2250f) + projectile.Center = player.Center; } else { diff --git a/Projectiles/Summon/SkeletalDragonMother.cs b/Projectiles/Summon/SkeletalDragonMother.cs index e63817584b..9c81b9aac4 100644 --- a/Projectiles/Summon/SkeletalDragonMother.cs +++ b/Projectiles/Summon/SkeletalDragonMother.cs @@ -115,6 +115,18 @@ namespace CalamityMod.Projectiles.Summon { projectile.ai[1] = 0f; projectile.velocity = (projectile.velocity * 24f + projectile.DirectionTo(player.Center) * 13f) / 25f; + if (projectile.Distance(player.Center) > 3250f) + { + projectile.Center = player.Center; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && + Main.projectile[i].type == ModContent.ProjectileType()) + { + Main.projectile[i].Center = player.Center; + } + } + } } projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); From 96223f85c942d34fb407da1ab753eb5166fb4d9f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2020 19:30:12 -0400 Subject: [PATCH 24/40] Fixed netcode typo causing Yharon MP desyncs. --- NPCs/Yharon/Yharon.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 9f662c66d2..da1c5cb0e3 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -144,7 +144,6 @@ namespace CalamityMod.NPCs.Yharon useTornado = bb[5]; startSecondAI = bb[6]; npc.dontTakeDamage = bb[7]; - BitsByte bb2 = reader.ReadByte(); healCounter = reader.ReadInt32(); secondPhasePhase = reader.ReadInt32(); teleportLocation = reader.ReadInt32(); From 226d2de962da31883f619c6e3ef6cf89759adb36 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2020 20:03:16 -0400 Subject: [PATCH 25/40] Added support for Fargo's Mutant Mod. --- CalamityMod.cs | 12 +++++++----- ModSupport/WeakReferenceSupport.cs | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index ef8c893c17..422fb90619 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -5,9 +5,10 @@ using CalamityMod.CalPlayer; using CalamityMod.ILEditing; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; +using CalamityMod.Items.Armor; using CalamityMod.Items.Fishing.AstralCatches; -using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Tools; @@ -49,8 +50,8 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; -using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Typeless; using CalamityMod.Skies; @@ -87,8 +88,6 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Config; using Terraria.UI; -using CalamityMod.Projectiles.Summon; -using CalamityMod.Items.Armor; namespace CalamityMod { @@ -198,7 +197,9 @@ namespace CalamityMod public static List hornetList; public static List mossHornetList; - private Mod thorium = null; + // TODO -- Calamity should check for other mods existing in exactly one place + internal Mod thorium = null; + public bool fargosMutant = false; internal static Configs CalamityConfig; internal static CalamityMod instance; @@ -402,6 +403,7 @@ namespace CalamityMod mossHornetList = null; thorium = null; + fargosMutant = false; CalamityConfig = null; instance = null; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 31586a28d2..f2e7c322bf 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -51,10 +51,10 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.TownNPCs; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Summon; -using CalamityMod.World; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -71,7 +71,7 @@ namespace CalamityMod { "GiantClam", 1.6f }, { "Crabulon", 2.5f }, { "HiveMind", 3.5f }, - { "Perforators", 3.5f }, + { "Perforators", 3.51f }, { "SlimeGod", 5.5f }, { "Cryogen", 6.5f }, { "BrimstoneElemental", 7.5f }, @@ -680,7 +680,25 @@ namespace CalamityMod if (fargos is null) return; - // fargos.Call... + // Mark Fargo's Mutant Mod as loaded so that Calamity doesn't add ANY boss summons to vanilla NPCs, even for its own bosses + GetInstance().fargosMutant = true; + + void AddToMutantShop(string bossName, string summonItemName, Func downed, int price) + { + BossDifficulty.TryGetValue(bossName, out float order); + fargos.Call("AddSummon", order, "CalamityMod", summonItemName, downed, price); + } + + AddToMutantShop("Crabulon", "DecapoditaSprout", DownedCrabulon, Item.buyPrice(gold: 4)); + AddToMutantShop("HiveMind", "Teratoma", DownedHiveMind, Item.buyPrice(gold: 10)); + AddToMutantShop("Perforators", "BloodyWormFood", DownedPerfs, Item.buyPrice(gold: 10)); + AddToMutantShop("SlimeGod", "OverloadedSludge", DownedSlimeGod, Item.buyPrice(gold: 15)); + AddToMutantShop("BrimstoneElemental", "CharredIdol", DownedBrimstoneElemental, Item.buyPrice(gold: 20)); + AddToMutantShop("AstrumAureus", "AstralChunk", DownedAureus, Item.buyPrice(gold: 25)); + AddToMutantShop("PlaguebringerGoliath", "Abombination", DownedPBG, Item.buyPrice(gold: 50)); + AddToMutantShop("Ravager", "AncientMedallion", DownedRavager, Item.buyPrice(gold: 50)); + AddToMutantShop("ProfanedGuardians", "ProfanedShard", DownedGuardians, Item.buyPrice(platinum: 5)); + AddToMutantShop("Bumblebirb", "BirbPheromones", DownedBirb, Item.buyPrice(platinum: 5)); } private static void CensusSupport() From 04067bf9256500e2b1969951da85a55834d3e889 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 20:19:43 -0400 Subject: [PATCH 26/40] fixes and summoner association support --- Items/Weapons/Summon/BensUmbrella.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 72 ++++++++++++++----------- Projectiles/Summon/EndoHydraBody.cs | 2 +- Projectiles/Summon/MK2RocketHoming.cs | 9 ++++ Projectiles/Summon/MK2RocketNormal.cs | 9 ++++ Projectiles/Summon/OldDukeHeadCorpse.cs | 2 +- 6 files changed, 61 insertions(+), 35 deletions(-) diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs index 3e9f9987e3..f4d3f85284 100644 --- a/Items/Weapons/Summon/BensUmbrella.cs +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 99; - item.damage = 3001; + item.damage = 1234; item.useStyle = 1; item.width = 74; item.height = 72; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 31586a28d2..489b4fe785 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -347,7 +347,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("PlaguebringerGoliath", out float order); int type = NPCType(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}] in the Jungle Biome"; string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00)); @@ -410,7 +410,7 @@ namespace CalamityMod BossDifficulty.TryGetValue("Providence", out float order); List bosses = new List() { NPCType(), NPCType(), NPCType(), NPCType() }; List summons = new List() { ItemType(), ItemType() }; - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; + List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.SuperHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType() }; string instructions = $"Use either [i:{ItemType()}] or [i:{ItemType()}] in the Hallow or Underworld Biomes"; string despawn = CalamityUtils.ColorMessage("The Profaned Goddess vanishes in a burning blaze.", new Color(0xFF, 0xA5, 0x00)); @@ -697,37 +697,45 @@ namespace CalamityMod private static void SummonersAssociationSupport() { - Mod SummonersAssociation = ModLoader.GetMod("SummonersAssociation"); - if(SummonersAssociation != null) + Mod sAssociation = ModLoader.GetMod("SummonersAssociation"); + if(sAssociation != null) { - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); - SummonersAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); + //Entropy's Vigil is a bruh moment + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType()}); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType(), 1f); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); } } } diff --git a/Projectiles/Summon/EndoHydraBody.cs b/Projectiles/Summon/EndoHydraBody.cs index e5ede3f428..ba170ca56b 100644 --- a/Projectiles/Summon/EndoHydraBody.cs +++ b/Projectiles/Summon/EndoHydraBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Summon projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; - projectile.minionSlots = 1f; + projectile.minionSlots = 0f; projectile.timeLeft = 18000; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Projectiles/Summon/MK2RocketHoming.cs b/Projectiles/Summon/MK2RocketHoming.cs index b35947ef92..29d7cf5828 100644 --- a/Projectiles/Summon/MK2RocketHoming.cs +++ b/Projectiles/Summon/MK2RocketHoming.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -54,9 +55,17 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(ModContent.BuffType(), 180); } + public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item14, projectile.Center); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 599) + return false; + return true; + } } } diff --git a/Projectiles/Summon/MK2RocketNormal.cs b/Projectiles/Summon/MK2RocketNormal.cs index c3dbf12eba..0babae7582 100644 --- a/Projectiles/Summon/MK2RocketNormal.cs +++ b/Projectiles/Summon/MK2RocketNormal.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -48,9 +49,17 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(ModContent.BuffType(), 180); } + public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item14, projectile.Center); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 599) + return false; + return true; + } } } diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index ef269b7f5f..0ee335caf3 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f); angle *= Math.Sign(target.Center.X - projectile.Center.X); Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f, - new Vector2(0f, -Main.rand.NextFloat(21f, 30.5f)).RotatedBy(angle), + new Vector2(0f, -Main.rand.NextFloat(30f, 40f)).RotatedBy(angle), ModContent.ProjectileType(), projectile.damage, 5f, projectile.owner); } From 3f0973f6e6d95dfa88cbe6f24bfea312a64ece1d Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 20:27:31 -0400 Subject: [PATCH 27/40] I hate balancing --- Items/Accessories/MutatedTruffle.cs | 2 +- Items/Weapons/Magic/AcidGun.cs | 2 +- Items/Weapons/Magic/Miasma.cs | 2 +- Items/Weapons/Magic/VitriolicViper.cs | 2 +- Items/Weapons/Melee/Basher.cs | 2 +- Items/Weapons/Ranged/Toxibow.cs | 2 +- Items/Weapons/Summon/CausticCroakerStaff.cs | 2 +- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- Items/Weapons/Summon/DazzlingStabberStaff.cs | 2 +- Items/Weapons/Summon/DragonbloodDisgorger.cs | 2 +- Items/Weapons/Summon/EndoHydraStaff.cs | 2 +- Items/Weapons/Summon/FuelCellBundle.cs | 2 +- Items/Weapons/Summon/RadiantResolution.cs | 2 +- Projectiles/Summon/OldDukeHeadCorpse.cs | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index d605292c76..1ed626eccc 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories modPlayer.miniOldDuke = true; if (player.whoAmI == Main.myPlayer) { - const int damage = 1750; + const int damage = 2000; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs index 90591e1f9d..c6289c58ac 100644 --- a/Items/Weapons/Magic/AcidGun.cs +++ b/Items/Weapons/Magic/AcidGun.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 14; + item.damage = 20; item.magic = true; item.mana = 9; item.width = 48; diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index f82f82d2f0..fdbfc32794 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 78; + item.damage = 123; item.magic = true; item.mana = 16; item.width = 50; diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index 8870676bdf..1eff8574b4 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 47; + item.damage = 90; item.magic = true; item.mana = 15; item.width = 60; diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 0570277584..090b39816d 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 30; item.height = 52; - item.damage = 17; + item.damage = 22; item.melee = true; item.useAnimation = item.useTime = 26; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs index 3dd7444c46..a405ca513e 100644 --- a/Items/Weapons/Ranged/Toxibow.cs +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 9; + item.damage = 12; item.ranged = true; item.width = 20; item.height = 54; diff --git a/Items/Weapons/Summon/CausticCroakerStaff.cs b/Items/Weapons/Summon/CausticCroakerStaff.cs index d8f1a68e22..d1fcf1fd54 100644 --- a/Items/Weapons/Summon/CausticCroakerStaff.cs +++ b/Items/Weapons/Summon/CausticCroakerStaff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 17; + item.damage = 20; item.mana = 10; item.width = 10; item.height = 32; diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 66cf896919..00d8efe8f4 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 200; + item.damage = 456; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index a9de6fa95a..2b47d99d2a 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_DarkMageHealImpact; item.summon = true; item.mana = 12; - item.damage = 51; + item.damage = 111; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 21; diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index c62ab72828..31a81446bb 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 276; + item.damage = 300; item.mana = 30; item.width = 64; item.height = 62; diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index fec291fa6d..f6eefe1b04 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item60; item.summon = true; item.mana = 25; - item.damage = 1450; + item.damage = 2563; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs index a4ae6ab025..76204b8f27 100644 --- a/Items/Weapons/Summon/FuelCellBundle.cs +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 10; - item.damage = 44; + item.damage = 50; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 32; item.height = 32; diff --git a/Items/Weapons/Summon/RadiantResolution.cs b/Items/Weapons/Summon/RadiantResolution.cs index 0909331196..0e063a6a4e 100644 --- a/Items/Weapons/Summon/RadiantResolution.cs +++ b/Items/Weapons/Summon/RadiantResolution.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon item.summon = true; item.mana = 100; - item.damage = 720; + item.damage = 666; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 36; diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index 0ee335caf3..ef269b7f5f 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon float angle = (float)Math.Atan(Math.Abs(target.Center.X - projectile.Center.X) / 450f); angle *= Math.Sign(target.Center.X - projectile.Center.X); Projectile.NewProjectile(projectile.Top + Vector2.UnitY * 7f, - new Vector2(0f, -Main.rand.NextFloat(30f, 40f)).RotatedBy(angle), + new Vector2(0f, -Main.rand.NextFloat(21f, 30.5f)).RotatedBy(angle), ModContent.ProjectileType(), projectile.damage, 5f, projectile.owner); } From 93643e630849a44b368b31bca696ebe4ce622eb5 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2020 20:37:23 -0400 Subject: [PATCH 28/40] Added Mod.Call to set post-ML rarity --- ModSupport/ModCalls.cs | 2944 ++++++++++++++++++++-------------------- 1 file changed, 1486 insertions(+), 1458 deletions(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 875e97d7e3..a6741293fe 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Items; using CalamityMod.Projectiles; using CalamityMod.World; using System; @@ -6,336 +7,336 @@ using Terraria; namespace CalamityMod { - public class ModCalls - { - #region Boss / Event Downed - /// - /// Returns whether the Calamity boss or event corresponding to the given string has been defeated. - /// - /// The boss or event name to check. Many aliases are accepted. - /// Whether the boss or event has been defeated. - public static bool GetBossDowned(string boss) - { - switch (boss.ToLower()) - { - default: - return false; + public class ModCalls + { + #region Boss / Event Downed + /// + /// Returns whether the Calamity boss or event corresponding to the given string has been defeated. + /// + /// The boss or event name to check. Many aliases are accepted. + /// Whether the boss or event has been defeated. + public static bool GetBossDowned(string boss) + { + switch (boss.ToLower()) + { + default: + return false; - case "desertscourge": - case "desert scourge": - return CalamityWorld.downedDesertScourge; + case "desertscourge": + case "desert scourge": + return CalamityWorld.downedDesertScourge; - case "clam": - case "giantclam": - case "giant clam": - return CalamityWorld.downedCLAM; + case "clam": + case "giantclam": + case "giant clam": + return CalamityWorld.downedCLAM; - case "crabulon": - return CalamityWorld.downedCrabulon; + case "crabulon": + return CalamityWorld.downedCrabulon; - case "hivemind": - case "hive mind": - case "thehivemind": - case "the hive mind": - return CalamityWorld.downedHiveMind; + case "hivemind": + case "hive mind": + case "thehivemind": + case "the hive mind": + return CalamityWorld.downedHiveMind; - case "perforator": - case "perforators": - case "theperforators": - case "the perforators": - case "perforatorhive": - case "perforator hive": - case "theperforatorhive": - case "the perforator hive": - return CalamityWorld.downedPerforator; + case "perforator": + case "perforators": + case "theperforators": + case "the perforators": + case "perforatorhive": + case "perforator hive": + case "theperforatorhive": + case "the perforator hive": + return CalamityWorld.downedPerforator; - case "slimegod": - case "slime god": - case "theslimegod": - case "the slime god": - return CalamityWorld.downedSlimeGod; + case "slimegod": + case "slime god": + case "theslimegod": + case "the slime god": + return CalamityWorld.downedSlimeGod; - case "cryogen": - return CalamityWorld.downedCryogen; + case "cryogen": + return CalamityWorld.downedCryogen; - case "brimstoneelemental": - case "brimstone elemental": - return CalamityWorld.downedBrimstoneElemental; + case "brimstoneelemental": + case "brimstone elemental": + return CalamityWorld.downedBrimstoneElemental; - case "calamitas": - case "clone": - case "calamitasclone": - case "calamitas clone": - case "clonelamitas": - case "calamitasdoppelganger": - case "calamitas doppelganger": - return CalamityWorld.downedCalamitas; + case "calamitas": + case "clone": + case "calamitasclone": + case "calamitas clone": + case "clonelamitas": + case "calamitasdoppelganger": + case "calamitas doppelganger": + return CalamityWorld.downedCalamitas; - case "gss": - case "greatsandshark": - case "great sand shark": - return CalamityWorld.downedGSS; + case "gss": + case "greatsandshark": + case "great sand shark": + return CalamityWorld.downedGSS; - case "siren": - case "thesiren": - case "the siren": - case "leviathan": - case "theleviathan": - case "the leviathan": - case "sirenleviathan": - case "siren leviathan": - case "sirenandleviathan": - case "siren and leviathan": - case "the siren and the leviathan": - return CalamityWorld.downedLeviathan; + case "siren": + case "thesiren": + case "the siren": + case "leviathan": + case "theleviathan": + case "the leviathan": + case "sirenleviathan": + case "siren leviathan": + case "sirenandleviathan": + case "siren and leviathan": + case "the siren and the leviathan": + return CalamityWorld.downedLeviathan; - case "aureus": - case "astrumaureus": - case "astrum aureus": - return CalamityWorld.downedAstrageldon; + case "aureus": + case "astrumaureus": + case "astrum aureus": + return CalamityWorld.downedAstrageldon; - case "pbg": - case "plaguebringer": - case "plaguebringergoliath": - case "plaguebringer goliath": - case "theplaguebringergoliath": - case "the plaguebringer goliath": - return CalamityWorld.downedPlaguebringer; + case "pbg": + case "plaguebringer": + case "plaguebringergoliath": + case "plaguebringer goliath": + case "theplaguebringergoliath": + case "the plaguebringer goliath": + return CalamityWorld.downedPlaguebringer; - case "scavenger": // backwards compatibility - case "ravager": - return CalamityWorld.downedScavenger; + case "scavenger": // backwards compatibility + case "ravager": + return CalamityWorld.downedScavenger; - case "stargod": // backwards compatibility - case "star god": // backwards compatibility - case "astrumdeus": - case "astrum deus": - return CalamityWorld.downedStarGod; + case "stargod": // backwards compatibility + case "star god": // backwards compatibility + case "astrumdeus": + case "astrum deus": + return CalamityWorld.downedStarGod; - case "guardians": - case "donuts": - case "profanedguardians": - case "profaned guardians": - case "theprofanedguardians": - case "the profaned guardians": - return CalamityWorld.downedGuardians; + case "guardians": + case "donuts": + case "profanedguardians": + case "profaned guardians": + case "theprofanedguardians": + case "the profaned guardians": + return CalamityWorld.downedGuardians; - case "bumblebirb": - case "bumblefuck": - return CalamityWorld.downedBumble; + case "bumblebirb": + case "bumblefuck": + return CalamityWorld.downedBumble; - case "providence": - case "providencetheprofanedgoddess": - case "providence the profaned goddess": - case "providence, the profaned goddess": - return CalamityWorld.downedProvidence; + case "providence": + case "providencetheprofanedgoddess": + case "providence the profaned goddess": + case "providence, the profaned goddess": + return CalamityWorld.downedProvidence; - case "polterghast": - case "necroghast": - case "necroplasm": - return CalamityWorld.downedPolterghast; + case "polterghast": + case "necroghast": + case "necroplasm": + return CalamityWorld.downedPolterghast; - case "sentinel1": // backwards compatibility - case "void": - case "ceaselessvoid": - case "ceaseless void": - return CalamityWorld.downedSentinel1; + case "sentinel1": // backwards compatibility + case "void": + case "ceaselessvoid": + case "ceaseless void": + return CalamityWorld.downedSentinel1; - case "sentinel2": // backwards compatibility - case "stormweaver": - case "storm weaver": - return CalamityWorld.downedSentinel2; + case "sentinel2": // backwards compatibility + case "stormweaver": + case "storm weaver": + return CalamityWorld.downedSentinel2; - case "sentinel3": // backwards compatibility - case "cosmicwraith": - case "cosmic wraith": - case "signus": - case "signusenvoyofthedevourer": - case "signus envoy of the devourer": - case "signus, envoy of the devourer": - return CalamityWorld.downedSentinel3; + case "sentinel3": // backwards compatibility + case "cosmicwraith": + case "cosmic wraith": + case "signus": + case "signusenvoyofthedevourer": + case "signus envoy of the devourer": + case "signus, envoy of the devourer": + return CalamityWorld.downedSentinel3; - case "sentinelany": // backwards compatibility - case "anysentinel": - case "any sentinel": - case "onesentinel": - case "one sentinel": - case "sentinel": - return CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 || CalamityWorld.downedSentinel3; + case "sentinelany": // backwards compatibility + case "anysentinel": + case "any sentinel": + case "onesentinel": + case "one sentinel": + case "sentinel": + return CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 || CalamityWorld.downedSentinel3; - case "sentinelall": // backwards compatibility - case "sentinels": - case "allsentinel": - case "allsentinels": - case "all sentinels": - return CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3; + case "sentinelall": // backwards compatibility + case "sentinels": + case "allsentinel": + case "allsentinels": + case "all sentinels": + return CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3; - case "dog": - case "devourerofgods": - case "devourer of gods": - case "thedevourerofgods": - case "the devourer of gods": - return CalamityWorld.downedDoG; + case "dog": + case "devourerofgods": + case "devourer of gods": + case "thedevourerofgods": + case "the devourer of gods": + return CalamityWorld.downedDoG; - case "darksun": - case "darksuneclipse": - case "darksun eclipse": - case "buffedeclipse": - case "buffed eclipse": - case "mothron": - case "darksunmothron": - case "darksun mothron": - case "buffedmothron": - case "buffed mothron": - return CalamityWorld.downedBuffedMothron; + case "darksun": + case "darksuneclipse": + case "darksun eclipse": + case "buffedeclipse": + case "buffed eclipse": + case "mothron": + case "darksunmothron": + case "darksun mothron": + case "buffedmothron": + case "buffed mothron": + return CalamityWorld.downedBuffedMothron; - case "yharon": - case "jungledragonyharon": - case "jungle dragon yharon": - case "jungle dragon, yharon": - return CalamityWorld.downedYharon; + case "yharon": + case "jungledragonyharon": + case "jungle dragon yharon": + case "jungle dragon, yharon": + return CalamityWorld.downedYharon; - case "scal": - case "supremecalamitas": - case "supreme calamitas": - return CalamityWorld.downedSCal; - } - } - #endregion + case "scal": + case "supremecalamitas": + case "supreme calamitas": + return CalamityWorld.downedSCal; + } + } + #endregion - #region Player in Zone / Area - /// - /// Returns whether the specified player is in the Calamity biome or area corresponding to the given string. - /// - /// The player whose locale is being questioned. - /// The zone or area name to check. Many aliases are accepted. - /// Whether the player is currently in the zone. - public static bool GetInZone(Player p, string zone) - { - CalamityPlayer mp = p.Calamity(); - switch (zone.ToLower()) - { - default: - return false; + #region Player in Zone / Area + /// + /// Returns whether the specified player is in the Calamity biome or area corresponding to the given string. + /// + /// The player whose locale is being questioned. + /// The zone or area name to check. Many aliases are accepted. + /// Whether the player is currently in the zone. + public static bool GetInZone(Player p, string zone) + { + CalamityPlayer mp = p.Calamity(); + switch (zone.ToLower()) + { + default: + return false; - case "calamity": // backwards compatibility - case "calamitybiome": - case "calamity biome": - case "crag": - case "crags": + case "calamity": // backwards compatibility + case "calamitybiome": + case "calamity biome": + case "crag": + case "crags": - case "profanedcrag": // remove these four when the actual profaned biome is added - case "profaned crag": - case "profanedcrags": - case "profaned crags": + case "profanedcrag": // remove these four when the actual profaned biome is added + case "profaned crag": + case "profanedcrags": + case "profaned crags": - case "brimstone": - case "brimstonecrag": - case "brimstone crag": - case "brimstonecrags": - case "brimstone crags": - return mp.ZoneCalamity; + case "brimstone": + case "brimstonecrag": + case "brimstone crag": + case "brimstonecrags": + case "brimstone crags": + return mp.ZoneCalamity; - case "astral": - case "astralbiome": - case "astral biome": - case "astralinfection": - case "astral infection": - return mp.ZoneAstral; + case "astral": + case "astralbiome": + case "astral biome": + case "astralinfection": + case "astral infection": + return mp.ZoneAstral; - case "sunkensea": - case "sunken sea": - case "thesunkensea": - case "the sunken sea": - return mp.ZoneSunkenSea; + case "sunkensea": + case "sunken sea": + case "thesunkensea": + case "the sunken sea": + return mp.ZoneSunkenSea; - case "sulfur": - case "sulphur": - case "sulfursea": - case "sulfur sea": - case "sulphursea": - case "sulphur sea": - case "sulfuroussea": - case "sulfurous sea": - case "sulphuroussea": - case "sulphurous sea": - return mp.ZoneSulphur; + case "sulfur": + case "sulphur": + case "sulfursea": + case "sulfur sea": + case "sulphursea": + case "sulphur sea": + case "sulfuroussea": + case "sulfurous sea": + case "sulphuroussea": + case "sulphurous sea": + return mp.ZoneSulphur; - case "abyss": - case "theabyss": - case "the abyss": - case "anyabyss": - case "any abyss": - case "abyssany": - case "any abyss layer": - return mp.ZoneAbyss; + case "abyss": + case "theabyss": + case "the abyss": + case "anyabyss": + case "any abyss": + case "abyssany": + case "any abyss layer": + return mp.ZoneAbyss; - case "abyss1": - case "abyss 1": - case "abyss_1": - case "layer1": - case "layer 1": - case "layer_1": - case "abysslayer1": - case "abyss layer 1": - return mp.ZoneAbyssLayer1; + case "abyss1": + case "abyss 1": + case "abyss_1": + case "layer1": + case "layer 1": + case "layer_1": + case "abysslayer1": + case "abyss layer 1": + return mp.ZoneAbyssLayer1; - case "abyss2": - case "abyss 2": - case "abyss_2": - case "layer2": - case "layer 2": - case "layer_2": - case "abysslayer2": - case "abyss layer 2": - return mp.ZoneAbyssLayer2; + case "abyss2": + case "abyss 2": + case "abyss_2": + case "layer2": + case "layer 2": + case "layer_2": + case "abysslayer2": + case "abyss layer 2": + return mp.ZoneAbyssLayer2; - case "abyss3": - case "abyss 3": - case "abyss_3": - case "layer3": - case "layer 3": - case "layer_3": - case "abysslayer3": - case "abyss layer 3": - return mp.ZoneAbyssLayer3; + case "abyss3": + case "abyss 3": + case "abyss_3": + case "layer3": + case "layer 3": + case "layer_3": + case "abysslayer3": + case "abyss layer 3": + return mp.ZoneAbyssLayer3; - case "abyss4": - case "abyss 4": - case "abyss_4": - case "layer4": - case "layer 4": - case "layer_4": - case "abysslayer4": - case "abyss layer 4": - return mp.ZoneAbyssLayer4; - } - } - #endregion + case "abyss4": + case "abyss 4": + case "abyss_4": + case "layer4": + case "layer 4": + case "layer_4": + case "abysslayer4": + case "abyss layer 4": + return mp.ZoneAbyssLayer4; + } + } + #endregion - #region Difficulty Modes - /// - /// Returns whether the Calamity difficulty modifier corresponding to the given string is currently active. - /// - /// The difficulty modifier to check for. - /// Whether the difficulty is currently active. - public static bool GetDifficultyActive(string difficulty) - { - switch (difficulty.ToLower()) - { - default: - return false; + #region Difficulty Modes + /// + /// Returns whether the Calamity difficulty modifier corresponding to the given string is currently active. + /// + /// The difficulty modifier to check for. + /// Whether the difficulty is currently active. + public static bool GetDifficultyActive(string difficulty) + { + switch (difficulty.ToLower()) + { + default: + return false; - case "revengeance": - case "rev": - case "revengeancemode": - case "revengeance mode": - return CalamityWorld.revenge; + case "revengeance": + case "rev": + case "revengeancemode": + case "revengeance mode": + return CalamityWorld.revenge; - case "death": - case "deathmode": - case "death mode": - return CalamityWorld.death; + case "death": + case "deathmode": + case "death mode": + return CalamityWorld.death; case "br": case "bossrush": @@ -345,53 +346,53 @@ namespace CalamityMod return CalamityWorld.bossRushActive; case "defiled": - case "defiledrune": - case "defiled rune": - case "defiledmode": - case "defiled mode": - return CalamityWorld.defiled; + case "defiledrune": + case "defiled rune": + case "defiledmode": + case "defiled mode": + return CalamityWorld.defiled; - case "armageddon": - case "arma": - case "instakill": - case "instagib": - case "armageddonmode": - case "armageddon mode": - return CalamityWorld.armageddon; + case "armageddon": + case "arma": + case "instakill": + case "instagib": + case "armageddonmode": + case "armageddon mode": + return CalamityWorld.armageddon; - case "ironheart": - case "iron heart": - case "steelsoul": - case "steel soul": - case "permadeath": - return CalamityWorld.ironHeart; - } - } + case "ironheart": + case "iron heart": + case "steelsoul": + case "steel soul": + case "permadeath": + return CalamityWorld.ironHeart; + } + } - /// - /// Either enables or disables the Calamity difficulty modifier corresponding to the given string.

- /// Unlike the in-game mode changing items, this has no ancillary effects such as failing if a boss is alive or instantly killing players. - ///
- /// The difficulty modifier to edit. - /// Whether to enable or disable the difficulty. - /// - public static bool SetDifficultyActive(string difficulty, bool enabled) - { - switch (difficulty.ToLower()) - { - default: - return false; + /// + /// Either enables or disables the Calamity difficulty modifier corresponding to the given string.

+ /// Unlike the in-game mode changing items, this has no ancillary effects such as failing if a boss is alive or instantly killing players. + ///
+ /// The difficulty modifier to edit. + /// Whether to enable or disable the difficulty. + /// + public static bool SetDifficultyActive(string difficulty, bool enabled) + { + switch (difficulty.ToLower()) + { + default: + return false; - case "revengeance": - case "rev": - case "revengeancemode": - case "revengeance mode": - return CalamityWorld.revenge = enabled; + case "revengeance": + case "rev": + case "revengeancemode": + case "revengeance mode": + return CalamityWorld.revenge = enabled; - case "death": - case "deathmode": - case "death mode": - return CalamityWorld.death = enabled; + case "death": + case "deathmode": + case "death mode": + return CalamityWorld.death = enabled; case "br": case "bossrush": @@ -401,1133 +402,1160 @@ namespace CalamityMod return CalamityWorld.bossRushActive = enabled; case "defiled": - case "defiledrune": - case "defiled rune": - case "defiledmode": - case "defiled mode": - return CalamityWorld.defiled = enabled; - - case "armageddon": - case "arma": - case "instakill": - case "instagib": - case "armageddonmode": - case "armageddon mode": - return CalamityWorld.armageddon = enabled; - - case "ironheart": - case "iron heart": - case "steelsoul": - case "steel soul": - case "permadeath": - return CalamityWorld.ironHeart = enabled; - } - } - #endregion - - #region Rogue Class - /// - /// Gets a player's current rogue damage stat. - /// - /// The player whose rogue damage is being queried. - /// Current rogue damage boost. 1f is no bonus, 2f is +100%. - public static float GetRogueDamage(Player p) => p?.Calamity()?.throwingDamage ?? 1f; - - /// - /// Adds a flat amount of rogue damage stat to a player. This amount can be negative. - /// - /// The player whose rogue damage is being modified. - /// The amount of rogue damage to add or subtract (if negative). - /// The player's new rogue damage stat. - public static float AddRogueDamage(Player p, float add) => p is null ? 1f : (p.Calamity().throwingDamage += add); - - /// - /// Gets a player's current rogue critical strike chance. - /// - /// The player whose rogue crit is being queried. - /// Current rogue critical strike chance. 0 is no additional crit, 8 is +8% crit chance. - public static int GetRogueCrit(Player p) => p?.Calamity()?.throwingCrit ?? 0; - - /// - /// Adds a flat amount of rogue crit to a player. This amount can be negative. - /// - /// The player whose rogue crit is being modified. - /// The amount of rogue crit to add or subtract (if negative). - /// The player's new rogue crit stat. - public static int AddRogueCrit(Player p, int add) => p is null ? 0 : (p.Calamity().throwingCrit += add); - - /// - /// Gets a player's current rogue projectile velocity multiplier. - /// - /// The player whose rogue velocity is being queried. - /// Current rogue projectile velocity multiplier. 1f is no bonus, 2f doubles projectile speed. - public static float GetRogueVelocity(Player p) => p?.Calamity()?.throwingVelocity ?? 1f; - - /// - /// Adds a flat amount of rogue velocity stat to a player. This amount can be negative. - /// - /// The player whose rogue velocity is being modified. - /// The amount of rogue velocity to add or subtract (if negative). - /// The player's new rogue velocity stat. - public static float AddRogueVelocity(Player p, float add) => p is null ? 1f : (p.Calamity().throwingVelocity += add); - - public static float GetCurrentStealth(Player p) => p?.Calamity()?.rogueStealth ?? 0f; - - public static float GetMaxStealth(Player p) => p?.Calamity()?.rogueStealthMax ?? 0f; - - public static float AddMaxStealth(Player p, float add) => p is null ? 0f : (p.Calamity().rogueStealthMax += add); - - /// - /// Gets whether the given projectile is classified as rogue. - /// - /// The projectile which is being checked. - /// Whether the projectile is rogue. - public static bool IsRogue(Projectile p) - { - if (p is null || p.Calamity() is null) - return false; - CalamityGlobalProjectile cgp = p.Calamity(); - return cgp.rogue | cgp.forceRogue; - } - - /// - /// Sets whether the given projectile is classified as rogue. If set to true, also forces the projectile to be rogue every single frame. - /// - /// The projectile whose rogue classification is being toggled. - /// The value to apply. - /// Whether the projectile is now rogue. - public static bool SetRogue(Projectile p, bool isRogue) - { - if (p is null || p.Calamity() is null) - return false; - CalamityGlobalProjectile cgp = p.Calamity(); - cgp.forceRogue = cgp.rogue = isRogue; - return cgp.rogue; - } - #endregion - - #region Player Armor Set Bonuses - /// - /// Returns whether the specified player has the set bonus corresponding to the given string. - /// - /// The player whose set bonuses are being questioned. - /// The set bonus to check for. - /// Whether the player currently has the set bonus. - public static bool GetSetBonus(Player p, string setBonus) - { - CalamityPlayer mp = p.Calamity(); - - setBonus = setBonus.ToLower(); - - // LATER -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function - - // Victide - if (setBonus == "victide_summon" || setBonus == "victide summon") - return mp.urchin; // the bool set directly by VictideHelmet.UpdateArmorSet - else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) - return mp.victideSet; - - // Aerospec - if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") - return mp.valkyrie; // the bool set directly by AerospecHelmet.UpdateArmorSet - else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) - return mp.aeroSet; - - // Statigel - if (setBonus == "statigel_summon" || setBonus == "statigel summon") - return mp.slimeGod; // the bool set directly by StatigelHood.UpdateArmorSet - if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) - return mp.statigelSet; - - // Mollusk - if (setBonus == "mollusk") - return mp.molluskSet; - - // Daedalus - switch (setBonus) - { - default: - break; - case "daedalus": - return mp.daedalusReflect || mp.daedalusShard || mp.daedalusAbsorb || mp.daedalusCrystal || mp.daedalusSplit; - case "daedalus_melee": - case "daedalus melee": - return mp.daedalusReflect; - case "daedalus_ranged": - case "daedalus ranged": - return mp.daedalusShard; - case "daedalus_magic": - case "daedalus magic": - return mp.daedalusAbsorb; - case "daedalus_summon": - case "daedalus summon": - return mp.daedalusCrystal; - case "daedalus_rogue": - case "daedalus rogue": - return mp.daedalusSplit; - } - - // Reaver - switch (setBonus) - { - default: - break; - case "reaver": - return mp.reaverBlast || mp.reaverDoubleTap || mp.reaverBurst || mp.reaverOrb || mp.reaverSpore; - case "reaver_melee": - case "reaver melee": - return mp.reaverBlast; - case "reaver_ranged": - case "reaver ranged": - return mp.reaverDoubleTap; - case "reaver_magic": - case "reaver magic": - return mp.reaverBurst; - case "reaver_summon": - case "reaver summon": - return mp.reaverOrb; - case "reaver_rogue": - case "reaver rogue": - return mp.reaverSpore; - } - - // Umbraphile - if (setBonus == "umbraphile") - return mp.umbraphileSet; - - // Ataxia - switch (setBonus) - { - default: - break; - case "ataxia": - return mp.ataxiaBlaze; - case "ataxia_melee": - case "ataxia melee": - return mp.ataxiaGeyser; - case "ataxia_ranged": - case "ataxia ranged": - return mp.ataxiaBolt; - case "ataxia_magic": - case "ataxia magic": - return mp.ataxiaMage; - case "ataxia_summon": - case "ataxia summon": - return mp.chaosSpirit; - case "ataxia_rogue": - case "ataxia rogue": - return mp.ataxiaVolley; - } - - // Plague Reaper - if (setBonus == "plaguereaper" || setBonus == "plague reaper") - return mp.plagueReaper; - - // Astral - if (setBonus == "astral") - return mp.astralStarRain; - - // Xeroc - if (setBonus == "xeroc") - return mp.xerocSet; - - // Tarragon - switch (setBonus) - { - default: - break; - case "tarragon": - return mp.tarraSet; - case "tarragon_melee": - case "tarragon melee": - return mp.tarraMelee; - case "tarragon_ranged": - case "tarragon ranged": - return mp.tarraRanged; - case "tarragon_magic": - case "tarragon magic": - return mp.tarraMage; - case "tarragon_summon": - case "tarragon summon": - return mp.tarraSummon; - case "tarragon_rogue": - case "tarragon rogue": - return mp.tarraThrowing; - } - - // Bloodflare - switch (setBonus) - { - default: - break; - case "bloodflare": - return mp.bloodflareSet; - case "bloodflare_melee": - case "bloodflare melee": - return mp.bloodflareMelee; - case "bloodflare_ranged": - case "bloodflare ranged": - return mp.bloodflareRanged; - case "bloodflare_magic": - case "bloodflare magic": - return mp.bloodflareMage; - case "bloodflare_summon": - case "bloodflare summon": - return mp.bloodflareSummon; - case "bloodflare_rogue": - case "bloodflare rogue": - return mp.bloodflareThrowing; - } - - // Omega Blue - if (setBonus == "omegablue" || setBonus == "omega blue") - return mp.omegaBlueSet; - - // God Slayer - switch (setBonus) - { - default: - break; - case "godslayer": - case "god slayer": - return mp.godSlayer; - case "godslayer_melee": - case "godslayer melee": - case "god slayer melee": - return mp.godSlayerDamage; // melee helm's unique damage reducing property - case "godslayer_ranged": - case "godslayer ranged": - case "god slayer ranged": - return mp.godSlayerRanged; - case "godslayer_magic": - case "godslayer magic": - case "god slayer magic": - return mp.godSlayerMage; - case "godslayer_summon": - case "godslayer summon": - case "god slayer summon": - return mp.godSlayerSummon; - case "godslayer_rogue": - case "godslayer rogue": - case "god slayer rogue": - return mp.godSlayerThrowing; - } - - // Fearmonger - if (setBonus == "fearmonger") - return mp.fearmongerSet; - - // Silva - switch (setBonus) - { - default: - break; - case "silva": - return mp.silvaSet; - case "silva_melee": - case "silva melee": - return mp.silvaMelee; - case "silva_ranged": - case "silva ranged": - return mp.silvaRanged; - case "silva_magic": - case "silva magic": - return mp.silvaMage; - case "silva_summon": - case "silva summon": - return mp.silvaSummon; - case "silva_rogue": - case "silva rogue": - return mp.silvaThrowing; - } - - // Auric Tesla - if (setBonus == "auric" || setBonus == "aurictesla" || setBonus == "auric tesla") - return mp.auricSet; - - // Demonshade - if (setBonus == "demonshade") - return mp.dsSetBonus; - - return false; - } - - /// - /// Turns the set bonus corresponding to the given string on or off for the specified player. - /// - /// The player whose set bonuses are being toggled. - /// The set bonus to check for. - /// Whether the set bonus should be enabled (true) or disabled (false). - /// Whether any set bonus was adjusted. - public static bool SetSetBonus(Player p, string setBonus, bool enabled) - { - CalamityPlayer mp = p.Calamity(); - setBonus = setBonus.ToLower(); - - // Victide - if (setBonus == "victide_summon" || setBonus == "victide summon") - { - mp.victideSet = enabled; - mp.urchin = enabled; // LATER -- remove this when player.urchin actually controls victide summoner - return true; - } - else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) - { - mp.victideSet = true; - return true; - } - - // Aerospec - if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") - { - mp.aeroSet = enabled; - mp.valkyrie = enabled; // LATER -- remove this when player.valkyrie actually controls aerospec summoner - return true; - } - else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) - { - mp.aeroSet = enabled; - return true; - } - - // Statigel - if (setBonus == "statigel_summon" || setBonus == "statigel summon") - { - mp.statigelSet = enabled; - mp.slimeGod = enabled; // LATER -- remove this when player.slimeGod actually controls statigel summoner - return true; - } - else if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) - { - mp.statigelSet = enabled; - return true; - } - - // Mollusk - if (setBonus == "mollusk") - { - mp.molluskSet = enabled; - return true; - } - - // Daedalus - switch (setBonus) - { - default: - break; - case "daedalus_melee": - case "daedalus melee": - mp.daedalusReflect = enabled; - return true; - case "daedalus_ranged": - case "daedalus ranged": - mp.daedalusShard = enabled; - return true; - case "daedalus_magic": - case "daedalus magic": - mp.daedalusAbsorb = enabled; - return true; - case "daedalus_summon": - case "daedalus summon": - mp.daedalusCrystal = enabled; // LATER -- remove this when player.daedalusCrystal actually controls daedalus summoner - return true; - case "daedalus_rogue": - case "daedalus rogue": - mp.daedalusSplit = enabled; - return true; - } - - // Reaver - switch (setBonus) - { - default: - break; - case "reaver_melee": - case "reaver melee": - mp.reaverBlast = enabled; - return true; - case "reaver_ranged": - case "reaver ranged": - mp.reaverDoubleTap = enabled; - return true; - case "reaver_magic": - case "reaver magic": - mp.reaverBurst = enabled; - return true; - case "reaver_summon": - case "reaver summon": - mp.reaverOrb = enabled; // LATER -- remove this when player.reaverOrb actually controls reaver summoner - return true; - case "reaver_rogue": - case "reaver rogue": - mp.reaverSpore = enabled; - return true; - } - - // Umbraphile - if (setBonus == "umbraphile") - { - mp.umbraphileSet = enabled; - return true; - } - - // Ataxia - switch (setBonus) - { - default: - break; - case "ataxia": - mp.ataxiaBlaze = enabled; - return true; - case "ataxia_melee": - case "ataxia melee": - mp.ataxiaBlaze = enabled; - mp.ataxiaGeyser = enabled; - return true; - case "ataxia_ranged": - case "ataxia ranged": - mp.ataxiaBlaze = enabled; - mp.ataxiaBolt = enabled; - return true; - case "ataxia_magic": - case "ataxia magic": - mp.ataxiaBlaze = enabled; - mp.ataxiaMage = enabled; - return true; - case "ataxia_summon": - case "ataxia summon": - mp.ataxiaBlaze = enabled; - mp.chaosSpirit = enabled; // LATER -- remove this when player.chaosSpirit actually controls ataxia summoner - return true; - case "ataxia_rogue": - case "ataxia rogue": - mp.ataxiaBlaze = enabled; - mp.ataxiaVolley = enabled; - return true; - } - - // Plague Reaper - if (setBonus == "plaguereaper" || setBonus == "plague reaper") - { - mp.plagueReaper = enabled; - return true; - } - - // Astral - if (setBonus == "astral") - { - mp.astralStarRain = enabled; - return true; - } - - // Xeroc - if (setBonus == "xeroc") - { - mp.xerocSet = enabled; - return true; - } - - // Tarragon - switch (setBonus) - { - default: - break; - case "tarragon": - mp.tarraSet = enabled; - return true; - case "tarragon_melee": - case "tarragon melee": - mp.tarraSet = enabled; - mp.tarraMelee = enabled; - return true; - case "tarragon_ranged": - case "tarragon ranged": - mp.tarraSet = enabled; - mp.tarraRanged = enabled; - return true; - case "tarragon_magic": - case "tarragon magic": - mp.tarraSet = enabled; - mp.tarraMage = enabled; - return true; - case "tarragon_summon": - case "tarragon summon": - mp.tarraSet = enabled; - mp.tarraSummon = enabled; // LATER -- remove this when player.tarraSummon actually controls life aura - return true; - case "tarragon_rogue": - case "tarragon rogue": - mp.tarraSet = enabled; - mp.tarraThrowing = enabled; - return true; - } - - // Bloodflare - switch (setBonus) - { - default: - break; - case "bloodflare": - mp.bloodflareSet = enabled; - return true; - case "bloodflare_melee": - case "bloodflare melee": - mp.bloodflareSet = enabled; - mp.bloodflareMelee = enabled; - return true; - case "bloodflare_ranged": - case "bloodflare ranged": - mp.bloodflareSet = enabled; - mp.bloodflareRanged = enabled; - return true; - case "bloodflare_magic": - case "bloodflare magic": - mp.bloodflareSet = enabled; - mp.bloodflareMage = enabled; - return true; - case "bloodflare_summon": - case "bloodflare summon": - mp.bloodflareSet = enabled; - mp.bloodflareSummon = enabled; // LATER -- remove this when player.bloodflareSummon actually controls bloodflare orbs - return true; - case "bloodflare_rogue": - case "bloodflare rogue": - mp.bloodflareSet = enabled; - mp.bloodflareThrowing = enabled; - return true; - } - - // Omega Blue - if (setBonus == "omegablue" || setBonus == "omega blue") - { - mp.omegaBlueSet = enabled; - return true; - } - - // God Slayer - switch (setBonus) - { - default: - break; - case "godslayer": - case "god slayer": - mp.godSlayer = enabled; - return true; - case "godslayer_melee": - case "godslayer melee": - case "god slayer melee": - mp.godSlayer = enabled; - mp.godSlayerDamage = enabled; // melee helm's unique damage reducing property - return true; - case "godslayer_ranged": - case "godslayer ranged": - case "god slayer ranged": - mp.godSlayer = enabled; - mp.godSlayerRanged = enabled; - return true; - case "godslayer_magic": - case "godslayer magic": - case "god slayer magic": - mp.godSlayer = enabled; - mp.godSlayerMage = enabled; - return true; - case "godslayer_summon": - case "godslayer summon": - case "god slayer summon": - mp.godSlayer = enabled; - mp.godSlayerSummon = enabled; // LATER -- remove this when player.godSlayerSummon actually controls mechworm - return true; - case "godslayer_rogue": - case "godslayer rogue": - case "god slayer rogue": - mp.godSlayer = enabled; - mp.godSlayerThrowing = enabled; - return true; - } - - // Fearmonger - if (setBonus == "fearmonger") - { - mp.fearmongerSet = enabled; - return true; - } - - // Silva - switch (setBonus) - { - default: - break; - case "silva": - mp.silvaSet = enabled; - return true; - case "silva_melee": - case "silva melee": - mp.silvaSet = enabled; - mp.silvaMelee = enabled; - return true; - case "silva_ranged": - case "silva ranged": - mp.silvaSet = enabled; - mp.silvaRanged = enabled; - return true; - case "silva_magic": - case "silva magic": - mp.silvaSet = enabled; - mp.silvaMage = enabled; - return true; - case "silva_summon": - case "silva summon": - mp.silvaSet = enabled; - mp.silvaSummon = enabled; // LATER -- remove this when player.silvaSummon actually controls silva crystal - return true; - case "silva_rogue": - case "silva rogue": - mp.silvaSet = enabled; - mp.silvaThrowing = enabled; - return true; - } - - // Auric Tesla (includes all components) - switch (setBonus) - { - default: - break; - case "auric": - case "aurictesla": - case "auric tesla": - mp.tarraSet = enabled; - mp.bloodflareSet = enabled; - mp.godSlayer = enabled; - mp.silvaSet = enabled; - mp.auricSet = enabled; - return true; - case "auric_melee": - case "auric melee": - case "aurictesla_melee": - case "aurictesla melee": - case "auric tesla melee": - mp.tarraSet = enabled; - mp.tarraMelee = enabled; - mp.bloodflareSet = enabled; - mp.bloodflareMelee = enabled; - mp.godSlayer = enabled; - mp.godSlayerDamage = enabled; - mp.silvaSet = enabled; - mp.silvaMelee = enabled; - mp.auricSet = enabled; - return true; - case "auric_ranged": - case "auric ranged": - case "aurictesla_ranged": - case "aurictesla ranged": - case "auric tesla ranged": - mp.tarraSet = enabled; - mp.tarraRanged = enabled; - mp.bloodflareSet = enabled; - mp.bloodflareRanged = enabled; - mp.godSlayer = enabled; - mp.godSlayerRanged = enabled; - mp.silvaSet = enabled; - mp.silvaRanged = enabled; - mp.auricSet = enabled; - return true; - case "auric_magic": - case "auric magic": - case "aurictesla_magic": - case "aurictesla magic": - case "auric tesla magic": - mp.tarraSet = enabled; - mp.tarraMage = enabled; - mp.bloodflareSet = enabled; - mp.bloodflareMage = enabled; - mp.godSlayer = enabled; - mp.godSlayerMage = enabled; - mp.silvaSet = enabled; - mp.silvaMage = enabled; - mp.auricSet = enabled; - return true; - case "auric_summon": - case "auric summon": - case "aurictesla_summon": - case "aurictesla summon": - case "auric tesla summon": - mp.tarraSet = enabled; - mp.tarraSummon = enabled; - mp.bloodflareSet = enabled; - mp.bloodflareSummon = enabled; - mp.godSlayer = enabled; - mp.godSlayerSummon = enabled; - mp.silvaSet = enabled; - mp.silvaSummon = enabled; - mp.auricSet = enabled; - return true; - case "auric_rogue": - case "auric rogue": - case "aurictesla_rogue": - case "aurictesla rogue": - case "auric tesla rogue": - mp.tarraSet = enabled; - mp.tarraThrowing = enabled; - mp.bloodflareSet = enabled; - mp.bloodflareThrowing = enabled; - mp.godSlayer = enabled; - mp.godSlayerThrowing = enabled; - mp.silvaSet = enabled; - mp.silvaThrowing = enabled; - mp.auricSet = enabled; - return true; - } - - // Demonshade - if (setBonus == "demonshade") - { - mp.dsSetBonus = enabled; - mp.rDevil = enabled; // LATER -- remove this when player.rDevil controls demonshade summoned minion - return true; - } - - return false; - } - #endregion - - #region Other Player Stats - public static int GetLightStrength(Player p) => p?.Calamity()?.GetTotalLightStrength() ?? 0; - - public static void AddAbyssLightStrength(Player p, int add) - { - if (p != null) - p.Calamity().externalAbyssLight += add; - } - - public static bool MakeColdImmune(Player p) => p is null ? false : (p.Calamity().externalColdImmunity = true); - public static bool MakeHeatImmune(Player p) => p is null ? false : (p.Calamity().externalHeatImmunity = true); - #endregion - - #region Set Damage Reduction - public static float SetDamageReduction(int npcID, float dr) - { - CalamityMod.DRValues.TryGetValue(npcID, out float oldDR); - CalamityMod.DRValues.Remove(npcID); - CalamityMod.DRValues.Add(npcID, dr); - return oldDR; - } - #endregion - - #region Boss Health Bars - public static bool BossHealthBarVisible() => Main.LocalPlayer.Calamity().drawBossHPBar; - - public static bool SetBossHealthBarVisible(bool visible) => Main.LocalPlayer.Calamity().drawBossHPBar = visible; - #endregion - - #region Call - public static object Call(params object[] args) - { - bool isValidPlayerArg(object o) => o is int || o is Player; - bool isValidProjectileArg(object o) => o is int || o is Projectile; - - Player castPlayer(object o) - { - if (o is int i) - return Main.player[i]; - else if (o is Player p) - return p; - return null; - } - - Projectile castProjectile(object o) - { - if (o is int i) - return Main.projectile[i]; - else if (o is Projectile p) - return p; - return null; - } - - if (args is null || args.Length <= 0) - return new ArgumentNullException("ERROR: No function name specified. First argument must be a function name."); - if (!(args[0] is string)) - return new ArgumentException("ERROR: First argument must be a string function name."); - - string methodName = args[0].ToString(); - switch (methodName) - { - case "Downed": - case "GetDowned": - case "BossDowned": - case "GetBossDowned": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a boss or event name as a string."); - if (!(args[1] is string)) - return new ArgumentException("ERROR: The argument to \"Downed\" must be a string."); - return GetBossDowned(args[1].ToString()); - - case "Zone": - case "GetZone": - case "InZone": - case "GetInZone": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a zone name as a string."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify a zone name as a string."); - if (!(args[2] is string)) - return new ArgumentException("ERROR: The second argument to \"InZone\" must be a string."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"InZone\" must be a Player or an int."); - return GetInZone(castPlayer(args[1]), args[2].ToString()); - - case "Difficulty": - case "GetDifficulty": - case "DifficultyActive": - case "GetDifficultyActive": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a difficulty mode name as a string."); - if (!(args[1] is string)) - return new ArgumentException("ERROR: The argument to \"Difficulty\" must be a string."); - return GetDifficultyActive(args[1].ToString()); - - case "SetDifficulty": - case "SetDifficultyActive": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a difficulty mode name as a string and a bool."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify a bool."); - if (!(args[2] is bool enabled)) - return new ArgumentException("ERROR: The second argument to \"SetDifficulty\" must be a bool."); - if (!(args[1] is string)) - return new ArgumentException("ERROR: The first argument to \"SetDifficulty\" must be a string."); - return SetDifficultyActive(args[1].ToString(), enabled); - - case "GetLight": - case "GetLightLevel": - case "GetLightStrength": - case "GetAbyssLight": - case "GetAbyssLightLevel": - case "GetAbyssLightStrength": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if(!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"GetLightStrength\" must be a Player or an int."); - return GetLightStrength(castPlayer(args[1])); - - case "AddLight": - case "AddLightLevel": - case "AddLightStrength": - case "AddAbyssLight": - case "AddAbyssLightLevel": - case "AddAbyssLightStrength": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and light strength change as an int."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify light strength change as an int."); - if (!(args[2] is int light)) - return new ArgumentException("ERROR: The second argument to \"AddLightStrength\" must be an int."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddLightStrength\" must be a Player or an int."); - AddAbyssLightStrength(castPlayer(args[1]), light); - return null; - - case "ColdImmune": - case "ColdImmunity": - case "GiveColdImmunity": - case "MakeColdImmune": - case "DeathModeCold": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"DeathModeCold\" must be a Player or an int."); - return MakeColdImmune(castPlayer(args[1])); - - case "HeatImmune": - case "HeatImmunity": - case "GiveHeatImmunity": - case "MakeHeatImmune": - case "DeathModeHeat": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"DeathModeHeat\" must be a Player or an int."); - return MakeHeatImmune(castPlayer(args[1])); - - case "GetRogueDamage": - case "GetRogueDmg": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"GetRogueDamage\" must be a Player or an int."); - return GetRogueDamage(castPlayer(args[1])); - - case "GetRogueCrit": - case "GetRogueCritChance": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"GetRogueCrit\" must be a Player or an int."); - return GetRogueCrit(castPlayer(args[1])); - - case "GetRogueVelocity": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The argument to \"GetRogueVelocity\" must be a Player or an int."); - return GetRogueVelocity(castPlayer(args[1])); - - case "AddRogueDamage": - case "AddRogueDmg": - case "ModifyRogueDamage": - case "ModifyRogueDmg": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue damage change as a float."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify rogue damage change as a float."); - if (!(args[2] is float damage)) - return new ArgumentException("ERROR: The second argument to \"AddRogueDamage\" must be a float."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddRogueDamage\" must be a Player or an int."); - return AddRogueDamage(castPlayer(args[1]), damage); - - case "AddRogueCrit": - case "AddRogueCritChance": - case "ModifyRogueCrit": - case "ModifyRogueCritChance": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue crit change as an int."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify rogue crit change as a float."); - if (!(args[2] is int crit)) - return new ArgumentException("ERROR: The second argument to \"AddRogueCrit\" must be an int."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddRogueCrit\" must be a Player or an int."); - return AddRogueCrit(castPlayer(args[1]), crit); - - case "AddRogueVelocity": - case "ModifyRogueVelocity": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue velocity change as a float."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify rogue velocity change as a float."); - if (!(args[2] is float velocity)) - return new ArgumentException("ERROR: The second argument to \"AddRogueVelocity\" must be a float."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddRogueVelocity\" must be a Player or an int."); - return AddRogueVelocity(castPlayer(args[1]), velocity); - - case "GetStealth": - case "GetCurrentStealth": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"GetStealth\" must be a Player or an int."); - return GetCurrentStealth(castPlayer(args[1])); - - case "GetMaxStealth": - case "GetStealthCap": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"GetMaxStealth\" must be a Player or an int."); - return GetMaxStealth(castPlayer(args[1])); - - case "AddMaxStealth": - case "ModifyMaxStealth": - case "ModifyStealthCap": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue max stealth as a float."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify rogue max stealth as a float."); - if (!(args[2] is float maxStealth)) - return new ArgumentException("ERROR: The second argument to \"AddMaxStealth\" must be a float."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddMaxStealth\" must be a Player or an int."); - return AddMaxStealth(castPlayer(args[1]), maxStealth); - - case "IsRogue": - case "IsProjRogue": - case "IsProjectileRogue": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Projectile object (or int index of a Projectile)."); - if (!isValidProjectileArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"IsRogue\" must be a Projectile or an int."); - return IsRogue(castProjectile(args[1])); - - case "SetRogue": - case "SetProjRogue": - case "SetProjectileRogue": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Projectile object (or int index of a Projectile) and a bool."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify rogue status as a bool."); - if (!(args[2] is bool isRogue)) - return new ArgumentException("ERROR: The second argument to \"SetRogue\" must be a bool."); - if (!isValidProjectileArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"SetRogue\" must be a Projectile or an int."); - return SetRogue(castProjectile(args[1]), isRogue); - - case "SetBonus": - case "SetBonusActive": - case "HasSetBonus": - case "GetSetBonus": - case "GetSetBonusActive": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a set bonus name as a string."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify a set bonus name as a string."); - if (!(args[2] is string)) - return new ArgumentException("ERROR: The second argument to \"SetBonus\" must be a string."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); - return GetSetBonus(castPlayer(args[1]), args[2].ToString()); - - case "SetSetBonus": - case "ToggleSetBonus": - case "SetSetBonusActive": - case "ToggleSetBonusActive": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player), a set bonus name as a string, and a bool."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify a set bonus name as a string and a bool."); - if (args.Length < 4) - return new ArgumentNullException("ERROR: Must specify a bool."); - if (!(args[3] is bool setBonusEnabled)) - return new ArgumentException("ERROR: The third argument to \"SetSetBonus\" must be a bool."); - if (!(args[2] is string)) - return new ArgumentException("ERROR: The second argument to \"SetSetBonus\" must be a string."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"SetSetBonus\" must be a Player or an int."); - return SetSetBonus(castPlayer(args[1]), args[2].ToString(), setBonusEnabled); - - case "DR": - case "DamageReduction": - case "SetDR": - case "SetDamageReduction": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both NPC ID as an int and damage reduction as a float or double."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify damage reduction as a float or double."); - if (!(args[2] is float) && !(args[2] is double)) - return new ArgumentException("ERROR: The second argument to \"SetDamageReduction\" must be a float or a double."); - if (!(args[1] is string)) - return new ArgumentException("ERROR: The first argument to \"SetDamageReduction\" must be an int."); - - int npcID = (int)args[1]; - float DR = (float)args[2]; - return SetDamageReduction(npcID, DR); - - case "BossHealthBarVisible": - case "BossHealthBarsVisible": - case "GetBossHealthBarVisible": - case "GetBossHealthBarsVisible": - return BossHealthBarVisible(); - - case "SetBossHealthBarVisible": - case "SetBossHealthBarsVisible": - if (args.Length < 2 || !(args[1] is bool bossBarEnabled)) - return new ArgumentNullException("ERROR: Must specify a bool."); - return SetBossHealthBarVisible(bossBarEnabled); - - default: - return new ArgumentException("ERROR: Invalid method name."); - } - } - #endregion - } + case "defiledrune": + case "defiled rune": + case "defiledmode": + case "defiled mode": + return CalamityWorld.defiled = enabled; + + case "armageddon": + case "arma": + case "instakill": + case "instagib": + case "armageddonmode": + case "armageddon mode": + return CalamityWorld.armageddon = enabled; + + case "ironheart": + case "iron heart": + case "steelsoul": + case "steel soul": + case "permadeath": + return CalamityWorld.ironHeart = enabled; + } + } + #endregion + + #region Rogue Class + /// + /// Gets a player's current rogue damage stat. + /// + /// The player whose rogue damage is being queried. + /// Current rogue damage boost. 1f is no bonus, 2f is +100%. + public static float GetRogueDamage(Player p) => p?.Calamity()?.throwingDamage ?? 1f; + + /// + /// Adds a flat amount of rogue damage stat to a player. This amount can be negative. + /// + /// The player whose rogue damage is being modified. + /// The amount of rogue damage to add or subtract (if negative). + /// The player's new rogue damage stat. + public static float AddRogueDamage(Player p, float add) => p is null ? 1f : (p.Calamity().throwingDamage += add); + + /// + /// Gets a player's current rogue critical strike chance. + /// + /// The player whose rogue crit is being queried. + /// Current rogue critical strike chance. 0 is no additional crit, 8 is +8% crit chance. + public static int GetRogueCrit(Player p) => p?.Calamity()?.throwingCrit ?? 0; + + /// + /// Adds a flat amount of rogue crit to a player. This amount can be negative. + /// + /// The player whose rogue crit is being modified. + /// The amount of rogue crit to add or subtract (if negative). + /// The player's new rogue crit stat. + public static int AddRogueCrit(Player p, int add) => p is null ? 0 : (p.Calamity().throwingCrit += add); + + /// + /// Gets a player's current rogue projectile velocity multiplier. + /// + /// The player whose rogue velocity is being queried. + /// Current rogue projectile velocity multiplier. 1f is no bonus, 2f doubles projectile speed. + public static float GetRogueVelocity(Player p) => p?.Calamity()?.throwingVelocity ?? 1f; + + /// + /// Adds a flat amount of rogue velocity stat to a player. This amount can be negative. + /// + /// The player whose rogue velocity is being modified. + /// The amount of rogue velocity to add or subtract (if negative). + /// The player's new rogue velocity stat. + public static float AddRogueVelocity(Player p, float add) => p is null ? 1f : (p.Calamity().throwingVelocity += add); + + public static float GetCurrentStealth(Player p) => p?.Calamity()?.rogueStealth ?? 0f; + + public static float GetMaxStealth(Player p) => p?.Calamity()?.rogueStealthMax ?? 0f; + + public static float AddMaxStealth(Player p, float add) => p is null ? 0f : (p.Calamity().rogueStealthMax += add); + + /// + /// Gets whether the given projectile is classified as rogue. + /// + /// The projectile which is being checked. + /// Whether the projectile is rogue. + public static bool IsRogue(Projectile p) + { + if (p is null || p.Calamity() is null) + return false; + CalamityGlobalProjectile cgp = p.Calamity(); + return cgp.rogue | cgp.forceRogue; + } + + /// + /// Sets whether the given projectile is classified as rogue. If set to true, also forces the projectile to be rogue every single frame. + /// + /// The projectile whose rogue classification is being toggled. + /// The value to apply. + /// Whether the projectile is now rogue. + public static bool SetRogue(Projectile p, bool isRogue) + { + if (p is null || p.Calamity() is null) + return false; + CalamityGlobalProjectile cgp = p.Calamity(); + cgp.forceRogue = cgp.rogue = isRogue; + return cgp.rogue; + } + #endregion + + #region Player Armor Set Bonuses + /// + /// Returns whether the specified player has the set bonus corresponding to the given string. + /// + /// The player whose set bonuses are being questioned. + /// The set bonus to check for. + /// Whether the player currently has the set bonus. + public static bool GetSetBonus(Player p, string setBonus) + { + CalamityPlayer mp = p.Calamity(); + + setBonus = setBonus.ToLower(); + + // LATER -- no summon set bonuses are written well. all use two bools, neither of which actually controls the function + + // Victide + if (setBonus == "victide_summon" || setBonus == "victide summon") + return mp.urchin; // the bool set directly by VictideHelmet.UpdateArmorSet + else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) + return mp.victideSet; + + // Aerospec + if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") + return mp.valkyrie; // the bool set directly by AerospecHelmet.UpdateArmorSet + else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) + return mp.aeroSet; + + // Statigel + if (setBonus == "statigel_summon" || setBonus == "statigel summon") + return mp.slimeGod; // the bool set directly by StatigelHood.UpdateArmorSet + if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) + return mp.statigelSet; + + // Mollusk + if (setBonus == "mollusk") + return mp.molluskSet; + + // Daedalus + switch (setBonus) + { + default: + break; + case "daedalus": + return mp.daedalusReflect || mp.daedalusShard || mp.daedalusAbsorb || mp.daedalusCrystal || mp.daedalusSplit; + case "daedalus_melee": + case "daedalus melee": + return mp.daedalusReflect; + case "daedalus_ranged": + case "daedalus ranged": + return mp.daedalusShard; + case "daedalus_magic": + case "daedalus magic": + return mp.daedalusAbsorb; + case "daedalus_summon": + case "daedalus summon": + return mp.daedalusCrystal; + case "daedalus_rogue": + case "daedalus rogue": + return mp.daedalusSplit; + } + + // Reaver + switch (setBonus) + { + default: + break; + case "reaver": + return mp.reaverBlast || mp.reaverDoubleTap || mp.reaverBurst || mp.reaverOrb || mp.reaverSpore; + case "reaver_melee": + case "reaver melee": + return mp.reaverBlast; + case "reaver_ranged": + case "reaver ranged": + return mp.reaverDoubleTap; + case "reaver_magic": + case "reaver magic": + return mp.reaverBurst; + case "reaver_summon": + case "reaver summon": + return mp.reaverOrb; + case "reaver_rogue": + case "reaver rogue": + return mp.reaverSpore; + } + + // Umbraphile + if (setBonus == "umbraphile") + return mp.umbraphileSet; + + // Ataxia + switch (setBonus) + { + default: + break; + case "ataxia": + return mp.ataxiaBlaze; + case "ataxia_melee": + case "ataxia melee": + return mp.ataxiaGeyser; + case "ataxia_ranged": + case "ataxia ranged": + return mp.ataxiaBolt; + case "ataxia_magic": + case "ataxia magic": + return mp.ataxiaMage; + case "ataxia_summon": + case "ataxia summon": + return mp.chaosSpirit; + case "ataxia_rogue": + case "ataxia rogue": + return mp.ataxiaVolley; + } + + // Plague Reaper + if (setBonus == "plaguereaper" || setBonus == "plague reaper") + return mp.plagueReaper; + + // Astral + if (setBonus == "astral") + return mp.astralStarRain; + + // Xeroc + if (setBonus == "xeroc") + return mp.xerocSet; + + // Tarragon + switch (setBonus) + { + default: + break; + case "tarragon": + return mp.tarraSet; + case "tarragon_melee": + case "tarragon melee": + return mp.tarraMelee; + case "tarragon_ranged": + case "tarragon ranged": + return mp.tarraRanged; + case "tarragon_magic": + case "tarragon magic": + return mp.tarraMage; + case "tarragon_summon": + case "tarragon summon": + return mp.tarraSummon; + case "tarragon_rogue": + case "tarragon rogue": + return mp.tarraThrowing; + } + + // Bloodflare + switch (setBonus) + { + default: + break; + case "bloodflare": + return mp.bloodflareSet; + case "bloodflare_melee": + case "bloodflare melee": + return mp.bloodflareMelee; + case "bloodflare_ranged": + case "bloodflare ranged": + return mp.bloodflareRanged; + case "bloodflare_magic": + case "bloodflare magic": + return mp.bloodflareMage; + case "bloodflare_summon": + case "bloodflare summon": + return mp.bloodflareSummon; + case "bloodflare_rogue": + case "bloodflare rogue": + return mp.bloodflareThrowing; + } + + // Omega Blue + if (setBonus == "omegablue" || setBonus == "omega blue") + return mp.omegaBlueSet; + + // God Slayer + switch (setBonus) + { + default: + break; + case "godslayer": + case "god slayer": + return mp.godSlayer; + case "godslayer_melee": + case "godslayer melee": + case "god slayer melee": + return mp.godSlayerDamage; // melee helm's unique damage reducing property + case "godslayer_ranged": + case "godslayer ranged": + case "god slayer ranged": + return mp.godSlayerRanged; + case "godslayer_magic": + case "godslayer magic": + case "god slayer magic": + return mp.godSlayerMage; + case "godslayer_summon": + case "godslayer summon": + case "god slayer summon": + return mp.godSlayerSummon; + case "godslayer_rogue": + case "godslayer rogue": + case "god slayer rogue": + return mp.godSlayerThrowing; + } + + // Fearmonger + if (setBonus == "fearmonger") + return mp.fearmongerSet; + + // Silva + switch (setBonus) + { + default: + break; + case "silva": + return mp.silvaSet; + case "silva_melee": + case "silva melee": + return mp.silvaMelee; + case "silva_ranged": + case "silva ranged": + return mp.silvaRanged; + case "silva_magic": + case "silva magic": + return mp.silvaMage; + case "silva_summon": + case "silva summon": + return mp.silvaSummon; + case "silva_rogue": + case "silva rogue": + return mp.silvaThrowing; + } + + // Auric Tesla + if (setBonus == "auric" || setBonus == "aurictesla" || setBonus == "auric tesla") + return mp.auricSet; + + // Demonshade + if (setBonus == "demonshade") + return mp.dsSetBonus; + + return false; + } + + /// + /// Turns the set bonus corresponding to the given string on or off for the specified player. + /// + /// The player whose set bonuses are being toggled. + /// The set bonus to check for. + /// Whether the set bonus should be enabled (true) or disabled (false). + /// Whether any set bonus was adjusted. + public static bool SetSetBonus(Player p, string setBonus, bool enabled) + { + CalamityPlayer mp = p.Calamity(); + setBonus = setBonus.ToLower(); + + // Victide + if (setBonus == "victide_summon" || setBonus == "victide summon") + { + mp.victideSet = enabled; + mp.urchin = enabled; // LATER -- remove this when player.urchin actually controls victide summoner + return true; + } + else if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) + { + mp.victideSet = true; + return true; + } + + // Aerospec + if (setBonus == "aerospec_summon" || setBonus == "aerospec summon") + { + mp.aeroSet = enabled; + mp.valkyrie = enabled; // LATER -- remove this when player.valkyrie actually controls aerospec summoner + return true; + } + else if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) + { + mp.aeroSet = enabled; + return true; + } + + // Statigel + if (setBonus == "statigel_summon" || setBonus == "statigel summon") + { + mp.statigelSet = enabled; + mp.slimeGod = enabled; // LATER -- remove this when player.slimeGod actually controls statigel summoner + return true; + } + else if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) + { + mp.statigelSet = enabled; + return true; + } + + // Mollusk + if (setBonus == "mollusk") + { + mp.molluskSet = enabled; + return true; + } + + // Daedalus + switch (setBonus) + { + default: + break; + case "daedalus_melee": + case "daedalus melee": + mp.daedalusReflect = enabled; + return true; + case "daedalus_ranged": + case "daedalus ranged": + mp.daedalusShard = enabled; + return true; + case "daedalus_magic": + case "daedalus magic": + mp.daedalusAbsorb = enabled; + return true; + case "daedalus_summon": + case "daedalus summon": + mp.daedalusCrystal = enabled; // LATER -- remove this when player.daedalusCrystal actually controls daedalus summoner + return true; + case "daedalus_rogue": + case "daedalus rogue": + mp.daedalusSplit = enabled; + return true; + } + + // Reaver + switch (setBonus) + { + default: + break; + case "reaver_melee": + case "reaver melee": + mp.reaverBlast = enabled; + return true; + case "reaver_ranged": + case "reaver ranged": + mp.reaverDoubleTap = enabled; + return true; + case "reaver_magic": + case "reaver magic": + mp.reaverBurst = enabled; + return true; + case "reaver_summon": + case "reaver summon": + mp.reaverOrb = enabled; // LATER -- remove this when player.reaverOrb actually controls reaver summoner + return true; + case "reaver_rogue": + case "reaver rogue": + mp.reaverSpore = enabled; + return true; + } + + // Umbraphile + if (setBonus == "umbraphile") + { + mp.umbraphileSet = enabled; + return true; + } + + // Ataxia + switch (setBonus) + { + default: + break; + case "ataxia": + mp.ataxiaBlaze = enabled; + return true; + case "ataxia_melee": + case "ataxia melee": + mp.ataxiaBlaze = enabled; + mp.ataxiaGeyser = enabled; + return true; + case "ataxia_ranged": + case "ataxia ranged": + mp.ataxiaBlaze = enabled; + mp.ataxiaBolt = enabled; + return true; + case "ataxia_magic": + case "ataxia magic": + mp.ataxiaBlaze = enabled; + mp.ataxiaMage = enabled; + return true; + case "ataxia_summon": + case "ataxia summon": + mp.ataxiaBlaze = enabled; + mp.chaosSpirit = enabled; // LATER -- remove this when player.chaosSpirit actually controls ataxia summoner + return true; + case "ataxia_rogue": + case "ataxia rogue": + mp.ataxiaBlaze = enabled; + mp.ataxiaVolley = enabled; + return true; + } + + // Plague Reaper + if (setBonus == "plaguereaper" || setBonus == "plague reaper") + { + mp.plagueReaper = enabled; + return true; + } + + // Astral + if (setBonus == "astral") + { + mp.astralStarRain = enabled; + return true; + } + + // Xeroc + if (setBonus == "xeroc") + { + mp.xerocSet = enabled; + return true; + } + + // Tarragon + switch (setBonus) + { + default: + break; + case "tarragon": + mp.tarraSet = enabled; + return true; + case "tarragon_melee": + case "tarragon melee": + mp.tarraSet = enabled; + mp.tarraMelee = enabled; + return true; + case "tarragon_ranged": + case "tarragon ranged": + mp.tarraSet = enabled; + mp.tarraRanged = enabled; + return true; + case "tarragon_magic": + case "tarragon magic": + mp.tarraSet = enabled; + mp.tarraMage = enabled; + return true; + case "tarragon_summon": + case "tarragon summon": + mp.tarraSet = enabled; + mp.tarraSummon = enabled; // LATER -- remove this when player.tarraSummon actually controls life aura + return true; + case "tarragon_rogue": + case "tarragon rogue": + mp.tarraSet = enabled; + mp.tarraThrowing = enabled; + return true; + } + + // Bloodflare + switch (setBonus) + { + default: + break; + case "bloodflare": + mp.bloodflareSet = enabled; + return true; + case "bloodflare_melee": + case "bloodflare melee": + mp.bloodflareSet = enabled; + mp.bloodflareMelee = enabled; + return true; + case "bloodflare_ranged": + case "bloodflare ranged": + mp.bloodflareSet = enabled; + mp.bloodflareRanged = enabled; + return true; + case "bloodflare_magic": + case "bloodflare magic": + mp.bloodflareSet = enabled; + mp.bloodflareMage = enabled; + return true; + case "bloodflare_summon": + case "bloodflare summon": + mp.bloodflareSet = enabled; + mp.bloodflareSummon = enabled; // LATER -- remove this when player.bloodflareSummon actually controls bloodflare orbs + return true; + case "bloodflare_rogue": + case "bloodflare rogue": + mp.bloodflareSet = enabled; + mp.bloodflareThrowing = enabled; + return true; + } + + // Omega Blue + if (setBonus == "omegablue" || setBonus == "omega blue") + { + mp.omegaBlueSet = enabled; + return true; + } + + // God Slayer + switch (setBonus) + { + default: + break; + case "godslayer": + case "god slayer": + mp.godSlayer = enabled; + return true; + case "godslayer_melee": + case "godslayer melee": + case "god slayer melee": + mp.godSlayer = enabled; + mp.godSlayerDamage = enabled; // melee helm's unique damage reducing property + return true; + case "godslayer_ranged": + case "godslayer ranged": + case "god slayer ranged": + mp.godSlayer = enabled; + mp.godSlayerRanged = enabled; + return true; + case "godslayer_magic": + case "godslayer magic": + case "god slayer magic": + mp.godSlayer = enabled; + mp.godSlayerMage = enabled; + return true; + case "godslayer_summon": + case "godslayer summon": + case "god slayer summon": + mp.godSlayer = enabled; + mp.godSlayerSummon = enabled; // LATER -- remove this when player.godSlayerSummon actually controls mechworm + return true; + case "godslayer_rogue": + case "godslayer rogue": + case "god slayer rogue": + mp.godSlayer = enabled; + mp.godSlayerThrowing = enabled; + return true; + } + + // Fearmonger + if (setBonus == "fearmonger") + { + mp.fearmongerSet = enabled; + return true; + } + + // Silva + switch (setBonus) + { + default: + break; + case "silva": + mp.silvaSet = enabled; + return true; + case "silva_melee": + case "silva melee": + mp.silvaSet = enabled; + mp.silvaMelee = enabled; + return true; + case "silva_ranged": + case "silva ranged": + mp.silvaSet = enabled; + mp.silvaRanged = enabled; + return true; + case "silva_magic": + case "silva magic": + mp.silvaSet = enabled; + mp.silvaMage = enabled; + return true; + case "silva_summon": + case "silva summon": + mp.silvaSet = enabled; + mp.silvaSummon = enabled; // LATER -- remove this when player.silvaSummon actually controls silva crystal + return true; + case "silva_rogue": + case "silva rogue": + mp.silvaSet = enabled; + mp.silvaThrowing = enabled; + return true; + } + + // Auric Tesla (includes all components) + switch (setBonus) + { + default: + break; + case "auric": + case "aurictesla": + case "auric tesla": + mp.tarraSet = enabled; + mp.bloodflareSet = enabled; + mp.godSlayer = enabled; + mp.silvaSet = enabled; + mp.auricSet = enabled; + return true; + case "auric_melee": + case "auric melee": + case "aurictesla_melee": + case "aurictesla melee": + case "auric tesla melee": + mp.tarraSet = enabled; + mp.tarraMelee = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareMelee = enabled; + mp.godSlayer = enabled; + mp.godSlayerDamage = enabled; + mp.silvaSet = enabled; + mp.silvaMelee = enabled; + mp.auricSet = enabled; + return true; + case "auric_ranged": + case "auric ranged": + case "aurictesla_ranged": + case "aurictesla ranged": + case "auric tesla ranged": + mp.tarraSet = enabled; + mp.tarraRanged = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareRanged = enabled; + mp.godSlayer = enabled; + mp.godSlayerRanged = enabled; + mp.silvaSet = enabled; + mp.silvaRanged = enabled; + mp.auricSet = enabled; + return true; + case "auric_magic": + case "auric magic": + case "aurictesla_magic": + case "aurictesla magic": + case "auric tesla magic": + mp.tarraSet = enabled; + mp.tarraMage = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareMage = enabled; + mp.godSlayer = enabled; + mp.godSlayerMage = enabled; + mp.silvaSet = enabled; + mp.silvaMage = enabled; + mp.auricSet = enabled; + return true; + case "auric_summon": + case "auric summon": + case "aurictesla_summon": + case "aurictesla summon": + case "auric tesla summon": + mp.tarraSet = enabled; + mp.tarraSummon = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareSummon = enabled; + mp.godSlayer = enabled; + mp.godSlayerSummon = enabled; + mp.silvaSet = enabled; + mp.silvaSummon = enabled; + mp.auricSet = enabled; + return true; + case "auric_rogue": + case "auric rogue": + case "aurictesla_rogue": + case "aurictesla rogue": + case "auric tesla rogue": + mp.tarraSet = enabled; + mp.tarraThrowing = enabled; + mp.bloodflareSet = enabled; + mp.bloodflareThrowing = enabled; + mp.godSlayer = enabled; + mp.godSlayerThrowing = enabled; + mp.silvaSet = enabled; + mp.silvaThrowing = enabled; + mp.auricSet = enabled; + return true; + } + + // Demonshade + if (setBonus == "demonshade") + { + mp.dsSetBonus = enabled; + mp.rDevil = enabled; // LATER -- remove this when player.rDevil controls demonshade summoned minion + return true; + } + + return false; + } + #endregion + + #region Other Player Stats + public static int GetLightStrength(Player p) => p?.Calamity()?.GetTotalLightStrength() ?? 0; + + public static void AddAbyssLightStrength(Player p, int add) + { + if (p != null) + p.Calamity().externalAbyssLight += add; + } + + public static bool MakeColdImmune(Player p) => p is null ? false : (p.Calamity().externalColdImmunity = true); + public static bool MakeHeatImmune(Player p) => p is null ? false : (p.Calamity().externalHeatImmunity = true); + #endregion + + #region Set Damage Reduction + public static float SetDamageReduction(int npcID, float dr) + { + CalamityMod.DRValues.TryGetValue(npcID, out float oldDR); + CalamityMod.DRValues.Remove(npcID); + CalamityMod.DRValues.Add(npcID, dr); + return oldDR; + } + #endregion + + #region Boss Health Bars + public static bool BossHealthBarVisible() => Main.LocalPlayer.Calamity().drawBossHPBar; + + public static bool SetBossHealthBarVisible(bool visible) => Main.LocalPlayer.Calamity().drawBossHPBar = visible; + #endregion + + #region Item Rarity + public static bool SetCalamityRarity(Item item, int rarityNum) + { + CalamityGlobalItem cgi = item.GetGlobalItem(); + cgi.customRarity = (CalamityRarity)rarityNum; + return cgi.customRarity != CalamityRarity.NoEffect; + } + #endregion + + #region Call + public static object Call(params object[] args) + { + bool isValidPlayerArg(object o) => o is int || o is Player; + bool isValidProjectileArg(object o) => o is int || o is Projectile; + + Player castPlayer(object o) + { + if (o is int i) + return Main.player[i]; + else if (o is Player p) + return p; + return null; + } + + Projectile castProjectile(object o) + { + if (o is int i) + return Main.projectile[i]; + else if (o is Projectile p) + return p; + return null; + } + + if (args is null || args.Length <= 0) + return new ArgumentNullException("ERROR: No function name specified. First argument must be a function name."); + if (!(args[0] is string)) + return new ArgumentException("ERROR: First argument must be a string function name."); + + string methodName = args[0].ToString(); + switch (methodName) + { + case "Downed": + case "GetDowned": + case "BossDowned": + case "GetBossDowned": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a boss or event name as a string."); + if (!(args[1] is string)) + return new ArgumentException("ERROR: The argument to \"Downed\" must be a string."); + return GetBossDowned(args[1].ToString()); + + case "Zone": + case "GetZone": + case "InZone": + case "GetInZone": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a zone name as a string."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify a zone name as a string."); + if (!(args[2] is string)) + return new ArgumentException("ERROR: The second argument to \"InZone\" must be a string."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"InZone\" must be a Player or an int."); + return GetInZone(castPlayer(args[1]), args[2].ToString()); + + case "Difficulty": + case "GetDifficulty": + case "DifficultyActive": + case "GetDifficultyActive": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a difficulty mode name as a string."); + if (!(args[1] is string)) + return new ArgumentException("ERROR: The argument to \"Difficulty\" must be a string."); + return GetDifficultyActive(args[1].ToString()); + + case "SetDifficulty": + case "SetDifficultyActive": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a difficulty mode name as a string and a bool."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify a bool."); + if (!(args[2] is bool enabled)) + return new ArgumentException("ERROR: The second argument to \"SetDifficulty\" must be a bool."); + if (!(args[1] is string)) + return new ArgumentException("ERROR: The first argument to \"SetDifficulty\" must be a string."); + return SetDifficultyActive(args[1].ToString(), enabled); + + case "GetLight": + case "GetLightLevel": + case "GetLightStrength": + case "GetAbyssLight": + case "GetAbyssLightLevel": + case "GetAbyssLightStrength": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if(!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"GetLightStrength\" must be a Player or an int."); + return GetLightStrength(castPlayer(args[1])); + + case "AddLight": + case "AddLightLevel": + case "AddLightStrength": + case "AddAbyssLight": + case "AddAbyssLightLevel": + case "AddAbyssLightStrength": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and light strength change as an int."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify light strength change as an int."); + if (!(args[2] is int light)) + return new ArgumentException("ERROR: The second argument to \"AddLightStrength\" must be an int."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"AddLightStrength\" must be a Player or an int."); + AddAbyssLightStrength(castPlayer(args[1]), light); + return null; + + case "ColdImmune": + case "ColdImmunity": + case "GiveColdImmunity": + case "MakeColdImmune": + case "DeathModeCold": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"DeathModeCold\" must be a Player or an int."); + return MakeColdImmune(castPlayer(args[1])); + + case "HeatImmune": + case "HeatImmunity": + case "GiveHeatImmunity": + case "MakeHeatImmune": + case "DeathModeHeat": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"DeathModeHeat\" must be a Player or an int."); + return MakeHeatImmune(castPlayer(args[1])); + + case "GetRogueDamage": + case "GetRogueDmg": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"GetRogueDamage\" must be a Player or an int."); + return GetRogueDamage(castPlayer(args[1])); + + case "GetRogueCrit": + case "GetRogueCritChance": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"GetRogueCrit\" must be a Player or an int."); + return GetRogueCrit(castPlayer(args[1])); + + case "GetRogueVelocity": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The argument to \"GetRogueVelocity\" must be a Player or an int."); + return GetRogueVelocity(castPlayer(args[1])); + + case "AddRogueDamage": + case "AddRogueDmg": + case "ModifyRogueDamage": + case "ModifyRogueDmg": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue damage change as a float."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue damage change as a float."); + if (!(args[2] is float damage)) + return new ArgumentException("ERROR: The second argument to \"AddRogueDamage\" must be a float."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"AddRogueDamage\" must be a Player or an int."); + return AddRogueDamage(castPlayer(args[1]), damage); + + case "AddRogueCrit": + case "AddRogueCritChance": + case "ModifyRogueCrit": + case "ModifyRogueCritChance": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue crit change as an int."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue crit change as a float."); + if (!(args[2] is int crit)) + return new ArgumentException("ERROR: The second argument to \"AddRogueCrit\" must be an int."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"AddRogueCrit\" must be a Player or an int."); + return AddRogueCrit(castPlayer(args[1]), crit); + + case "AddRogueVelocity": + case "ModifyRogueVelocity": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue velocity change as a float."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue velocity change as a float."); + if (!(args[2] is float velocity)) + return new ArgumentException("ERROR: The second argument to \"AddRogueVelocity\" must be a float."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"AddRogueVelocity\" must be a Player or an int."); + return AddRogueVelocity(castPlayer(args[1]), velocity); + + case "GetStealth": + case "GetCurrentStealth": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"GetStealth\" must be a Player or an int."); + return GetCurrentStealth(castPlayer(args[1])); + + case "GetMaxStealth": + case "GetStealthCap": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"GetMaxStealth\" must be a Player or an int."); + return GetMaxStealth(castPlayer(args[1])); + + case "AddMaxStealth": + case "ModifyMaxStealth": + case "ModifyStealthCap": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and rogue max stealth as a float."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue max stealth as a float."); + if (!(args[2] is float maxStealth)) + return new ArgumentException("ERROR: The second argument to \"AddMaxStealth\" must be a float."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"AddMaxStealth\" must be a Player or an int."); + return AddMaxStealth(castPlayer(args[1]), maxStealth); + + case "IsRogue": + case "IsProjRogue": + case "IsProjectileRogue": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Projectile object (or int index of a Projectile)."); + if (!isValidProjectileArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"IsRogue\" must be a Projectile or an int."); + return IsRogue(castProjectile(args[1])); + + case "SetRogue": + case "SetProjRogue": + case "SetProjectileRogue": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Projectile object (or int index of a Projectile) and a bool."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify rogue status as a bool."); + if (!(args[2] is bool isRogue)) + return new ArgumentException("ERROR: The second argument to \"SetRogue\" must be a bool."); + if (!isValidProjectileArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"SetRogue\" must be a Projectile or an int."); + return SetRogue(castProjectile(args[1]), isRogue); + + case "SetBonus": + case "SetBonusActive": + case "HasSetBonus": + case "GetSetBonus": + case "GetSetBonusActive": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a set bonus name as a string."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify a set bonus name as a string."); + if (!(args[2] is string)) + return new ArgumentException("ERROR: The second argument to \"SetBonus\" must be a string."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); + return GetSetBonus(castPlayer(args[1]), args[2].ToString()); + + case "SetSetBonus": + case "ToggleSetBonus": + case "SetSetBonusActive": + case "ToggleSetBonusActive": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player), a set bonus name as a string, and a bool."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify a set bonus name as a string and a bool."); + if (args.Length < 4) + return new ArgumentNullException("ERROR: Must specify a bool."); + if (!(args[3] is bool setBonusEnabled)) + return new ArgumentException("ERROR: The third argument to \"SetSetBonus\" must be a bool."); + if (!(args[2] is string)) + return new ArgumentException("ERROR: The second argument to \"SetSetBonus\" must be a string."); + if (!isValidPlayerArg(args[1])) + return new ArgumentException("ERROR: The first argument to \"SetSetBonus\" must be a Player or an int."); + return SetSetBonus(castPlayer(args[1]), args[2].ToString(), setBonusEnabled); + + case "DR": + case "DamageReduction": + case "SetDR": + case "SetDamageReduction": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both NPC ID as an int and damage reduction as a float or double."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify damage reduction as a float or double."); + if (!(args[2] is float) && !(args[2] is double)) + return new ArgumentException("ERROR: The second argument to \"SetDamageReduction\" must be a float or a double."); + if (!(args[1] is string)) + return new ArgumentException("ERROR: The first argument to \"SetDamageReduction\" must be an int."); + + int npcID = (int)args[1]; + float DR = (float)args[2]; + return SetDamageReduction(npcID, DR); + + case "BossHealthBarVisible": + case "BossHealthBarsVisible": + case "GetBossHealthBarVisible": + case "GetBossHealthBarsVisible": + return BossHealthBarVisible(); + + case "SetBossHealthBarVisible": + case "SetBossHealthBarsVisible": + if (args.Length < 2 || !(args[1] is bool bossBarEnabled)) + return new ArgumentNullException("ERROR: Must specify a bool."); + return SetBossHealthBarVisible(bossBarEnabled); + + case "SetRarity": + case "SetItemRarity": + case "SetCalamityRarity": + case "SetPostMLRarity": + case "SetPostMoonLordRarity": + if (args.Length < 2) + return new ArgumentNullException("ERROR: Must specify both an Item and desired rarity as an int."); + if (args.Length < 3) + return new ArgumentNullException("ERROR: Must specify desired rarity as an int."); + if (!(args[2] is int)) + return new ArgumentException("ERROR: The second argument to \"SetCalamityRarity\" must be an int."); + if (!(args[1] is Item)) + return new ArgumentException("ERROR: The first argument to \"SetCalamityRarity\" must be an Item."); + + Item item = (Item)args[1]; + int rarity = (int)args[2]; + return SetCalamityRarity(item, rarity); + + default: + return new ArgumentException("ERROR: Invalid method name."); + } + } + #endregion + } } From 5be2451f13b2836065ab0f1378d46f65bf7f0f59 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 20:37:48 -0400 Subject: [PATCH 29/40] fixed sparks counting as the wrong pet --- Buffs/Pets/SparksBuff.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Buffs/Pets/SparksBuff.cs b/Buffs/Pets/SparksBuff.cs index 7c25bdd68c..c591ed997f 100644 --- a/Buffs/Pets/SparksBuff.cs +++ b/Buffs/Pets/SparksBuff.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Buffs.Pets DisplayName.SetDefault("Sparks"); Description.SetDefault("Eats butterflies"); Main.buffNoTimeDisplay[Type] = true; - Main.vanityPet[Type] = true; + Main.lightPet[Type] = true; } public override void Update(Player player, ref int buffIndex) From ab5f07d5b17cf004345a6c5c2354a696cca1069e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 20:57:41 -0400 Subject: [PATCH 30/40] nerfed mutated truffle --- Items/Accessories/MutatedTruffle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index 1ed626eccc..e191db698d 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories modPlayer.miniOldDuke = true; if (player.whoAmI == Main.myPlayer) { - const int damage = 2000; + const int damage = 1800; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, From f8b184184bcf0332472acb8e2ce13690dc6ce35b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 21:00:45 -0400 Subject: [PATCH 31/40] fixed mutated truffle not going away after equipping acc --- CalPlayer/CalamityPlayer.cs | 1 + Projectiles/Summon/YoungDuke.cs | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f9089617e3..6722aea72d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1068,6 +1068,7 @@ namespace CalamityMod.CalPlayer angryDog = false; fab = false; crysthamyr = false; + miniOldDuke = false; abyssalDivingSuitPlates = false; abyssalDivingSuitCooldown = false; diff --git a/Projectiles/Summon/YoungDuke.cs b/Projectiles/Summon/YoungDuke.cs index 3b6a0275a3..fb2948aa31 100644 --- a/Projectiles/Summon/YoungDuke.cs +++ b/Projectiles/Summon/YoungDuke.cs @@ -88,10 +88,6 @@ namespace CalamityMod.Projectiles.Summon { projectile.timeLeft = 2; } - else - { - projectile.Kill(); - } } NPC potentialTarget = projectile.Center.ClosestNPCAt(1600f); if (potentialTarget != null) From 5fa69c0544a64b06892c99b60145b01908d84b53 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 21:45:27 -0400 Subject: [PATCH 32/40] nerfed dragon mother --- Projectiles/Summon/BloodBreath.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Summon/BloodBreath.cs b/Projectiles/Summon/BloodBreath.cs index bf4e0858d3..66441b8dcd 100644 --- a/Projectiles/Summon/BloodBreath.cs +++ b/Projectiles/Summon/BloodBreath.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = 2; projectile.extraUpdates = 3; projectile.timeLeft = 40; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 9; + projectile.usesIDStaticNPCImmunity = true; + projectile.idStaticNPCHitCooldown = 9; } public override void AI() From 562edbfcdb28934d3c0e893ffd38378777617d10 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:06:44 -0400 Subject: [PATCH 33/40] nerfed dazzling stabber --- Projectiles/Summon/DazzlingStabber.cs | 4 ++-- Projectiles/Summon/DazzlingStabberKnife.cs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Projectiles/Summon/DazzlingStabber.cs b/Projectiles/Summon/DazzlingStabber.cs index 66df6185f3..242204111c 100644 --- a/Projectiles/Summon/DazzlingStabber.cs +++ b/Projectiles/Summon/DazzlingStabber.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft *= 5; projectile.minion = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 7; + projectile.localNPCHitCooldown = 9; } public override void AI() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < 3; i++) { float angle = MathHelper.Lerp(-0.3f, 0.3f, i / 3f); - Projectile.NewProjectile(projectile.Center, projectile.velocity.RotatedBy(angle), ModContent.ProjectileType(), (int)(projectile.damage * 0.6), 1f, projectile.owner); + Projectile.NewProjectile(projectile.Center, projectile.velocity.RotatedBy(angle), ModContent.ProjectileType(), (int)(projectile.damage * 0.4), 1f, projectile.owner); } } else projectile.velocity *= 0.99f; diff --git a/Projectiles/Summon/DazzlingStabberKnife.cs b/Projectiles/Summon/DazzlingStabberKnife.cs index 1a91201342..055d513bcd 100644 --- a/Projectiles/Summon/DazzlingStabberKnife.cs +++ b/Projectiles/Summon/DazzlingStabberKnife.cs @@ -23,8 +23,6 @@ namespace CalamityMod.Projectiles.Summon projectile.ignoreWater = true; projectile.penetrate = 1; projectile.timeLeft = 600; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 8; } public override void AI() { From f6a3ed09a0c05053355107475fd48348663d539b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:09:29 -0400 Subject: [PATCH 34/40] force things --- Projectiles/CalamityGlobalProjectile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 7474ec5572..77a1c2c46a 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -519,6 +519,8 @@ namespace CalamityMod.Projectiles projectile.magic = false; projectile.minion = false; rogue = false; + ProjectileID.Sets.MinionShot[projectile.type] = false; + ProjectileID.Sets.SentryShot[projectile.type] = false; } else if (forceRanged) { @@ -529,6 +531,8 @@ namespace CalamityMod.Projectiles projectile.magic = false; projectile.minion = false; rogue = false; + ProjectileID.Sets.MinionShot[projectile.type] = false; + ProjectileID.Sets.SentryShot[projectile.type] = false; } else if (forceMagic) { @@ -539,6 +543,8 @@ namespace CalamityMod.Projectiles projectile.magic = true; projectile.minion = false; rogue = false; + ProjectileID.Sets.MinionShot[projectile.type] = false; + ProjectileID.Sets.SentryShot[projectile.type] = false; } else if (forceRogue) { @@ -549,6 +555,8 @@ namespace CalamityMod.Projectiles projectile.magic = false; projectile.minion = false; rogue = true; + ProjectileID.Sets.MinionShot[projectile.type] = false; + ProjectileID.Sets.SentryShot[projectile.type] = false; } else if (forceMinion) { From 74610eec6d1f72b13fbe1a65151611d55f11dc1f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:14:22 -0400 Subject: [PATCH 35/40] will this fix black hawk lag? prob not but oh well --- Items/Weapons/Summon/BlackHawkRemote.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Summon/BlackHawkRemote.cs b/Items/Weapons/Summon/BlackHawkRemote.cs index 12dbc251ae..2e4064f69a 100644 --- a/Items/Weapons/Summon/BlackHawkRemote.cs +++ b/Items/Weapons/Summon/BlackHawkRemote.cs @@ -38,10 +38,13 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - position = Main.MouseWorld; - speedX = 0; - speedY = 0; - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + if (player.whoAmI == Main.myPlayer) + { + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + } } return false; } From 0d5e08e1e744508760cff97ee7fbdba9d0f1fcdd Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:17:39 -0400 Subject: [PATCH 36/40] period --- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 00d8efe8f4..d0a2fe447e 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Corvid Harbringer Staff"); - Tooltip.SetDefault("Nevermore\n" + + Tooltip.SetDefault("Nevermore.\n" + "Summons a powerful raven which teleports and dashes"); } From 96b104b64ae00050d0c49a4da0f76fdebce40f0e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:27:30 -0400 Subject: [PATCH 37/40] fixed butterflies targetting fishron when he dead --- Projectiles/Summon/PinkButterfly.cs | 4 ++-- Projectiles/Summon/PurpleButterfly.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projectiles/Summon/PinkButterfly.cs b/Projectiles/Summon/PinkButterfly.cs index b5e33b2aa9..8063ad335d 100644 --- a/Projectiles/Summon/PinkButterfly.cs +++ b/Projectiles/Summon/PinkButterfly.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon if (player.HasMinionAttackTargetNPC) { NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false) || npc.type == NPCID.DukeFishron) + if ((npc.CanBeChasedBy(projectile, false) || npc.type == NPCID.DukeFishron) && npc.active) { float num646 = Vector2.Distance(npc.Center, projectile.Center); if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Summon for (int num645 = 0; num645 < Main.maxNPCs; num645++) { NPC nPC2 = Main.npc[num645]; - if (nPC2.CanBeChasedBy(projectile, false) || nPC2.type == NPCID.DukeFishron) + if ((nPC2.CanBeChasedBy(projectile, false) || nPC2.type == NPCID.DukeFishron) && nPC2.active) { float num646 = Vector2.Distance(nPC2.Center, projectile.Center); if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) diff --git a/Projectiles/Summon/PurpleButterfly.cs b/Projectiles/Summon/PurpleButterfly.cs index d8e40a7810..4db43742ba 100644 --- a/Projectiles/Summon/PurpleButterfly.cs +++ b/Projectiles/Summon/PurpleButterfly.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon if (player.HasMinionAttackTargetNPC) { NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false) || npc.type == NPCID.DukeFishron) + if ((npc.CanBeChasedBy(projectile, false) || npc.type == NPCID.DukeFishron) && npc.active) { float num646 = Vector2.Distance(npc.Center, projectile.Center); if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Summon for (int num645 = 0; num645 < Main.maxNPCs; num645++) { NPC nPC2 = Main.npc[num645]; - if (nPC2.CanBeChasedBy(projectile, false) || nPC2.type == NPCID.DukeFishron) + if ((nPC2.CanBeChasedBy(projectile, false) || nPC2.type == NPCID.DukeFishron) && nPC2.active) { float num646 = Vector2.Distance(nPC2.Center, projectile.Center); if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) From 33cfc29355a09614f9fdf8535851bb487af15038 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:45:14 -0400 Subject: [PATCH 38/40] Rover is bruh (drop rate shit) --- Items/Weapons/Melee/Basher.cs | 1 + NPCs/Abyss/Catfish.cs | 4 +++- NPCs/Abyss/Flounder.cs | 7 ++----- NPCs/Abyss/Frogfish.cs | 6 +----- NPCs/Abyss/Gnasher.cs | 7 ++----- NPCs/Abyss/Mauler.cs | 9 ++------- NPCs/Abyss/MorayEel.cs | 2 +- NPCs/Abyss/SeaUrchin.cs | 2 +- NPCs/Abyss/Trasher.cs | 17 ++++------------- NPCs/AquaticScourge/AquaticUrchin.cs | 2 +- 10 files changed, 18 insertions(+), 39 deletions(-) diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 090b39816d..0b6651164b 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddTile(TileID.Anvils); recipe.SetResult(this); } + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 120); diff --git a/NPCs/Abyss/Catfish.cs b/NPCs/Abyss/Catfish.cs index abfcb18b03..74a8fd3345 100644 --- a/NPCs/Abyss/Catfish.cs +++ b/NPCs/Abyss/Catfish.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Materials; using CalamityMod.World; using System; using System.IO; @@ -251,7 +252,8 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - DropHelper.DropItemChance(npc, ItemID.DivingHelmet, 25); + DropHelper.DropItemChance(npc, ItemID.DivingHelmet, 20); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Flounder.cs b/NPCs/Abyss/Flounder.cs index bed92986a0..186a47c74b 100644 --- a/NPCs/Abyss/Flounder.cs +++ b/NPCs/Abyss/Flounder.cs @@ -282,11 +282,8 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - if (Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Frogfish.cs b/NPCs/Abyss/Frogfish.cs index 6232b8dbec..ab5c6995d8 100644 --- a/NPCs/Abyss/Frogfish.cs +++ b/NPCs/Abyss/Frogfish.cs @@ -251,11 +251,7 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - if (Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 1); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Gnasher.cs b/NPCs/Abyss/Gnasher.cs index 87bad3c278..4717e964a7 100644 --- a/NPCs/Abyss/Gnasher.cs +++ b/NPCs/Abyss/Gnasher.cs @@ -110,11 +110,8 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - if (Main.hardMode && Main.rand.NextBool(10)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.TurtleShell); - } - DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); + DropHelper.DropItemCondition(npc, ItemID.TurtleShell, Main.hardMode, 10, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 3); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Mauler.cs b/NPCs/Abyss/Mauler.cs index 5c5300d032..5bef5db037 100644 --- a/NPCs/Abyss/Mauler.cs +++ b/NPCs/Abyss/Mauler.cs @@ -350,13 +350,8 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - if (CalamityWorld.downedPolterghast) - { - if (Main.rand.NextBool(3)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedPolterghast, 3, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 3); int item = Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.SharkFin, Main.rand.Next(2, 5), false, 0, false, false); Main.item[item].color = new Color(151, 115, 57, 255); NetMessage.SendData(88, -1, -1, null, item, 1f, 0f, 0f, 0, 0, 0); diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index ec0115fc72..c155a9971e 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 10 : 15); - DropHelper.DropItemChance(npc, ItemID.Flipper, 25); + DropHelper.DropItemChance(npc, ItemID.Flipper, 20); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/SeaUrchin.cs b/NPCs/Abyss/SeaUrchin.cs index 2a804219ff..13c71a7023 100644 --- a/NPCs/Abyss/SeaUrchin.cs +++ b/NPCs/Abyss/SeaUrchin.cs @@ -325,7 +325,7 @@ namespace CalamityMod.NPCs.Abyss public override void NPCLoot() { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(15, 26)); + DropHelper.DropItem(npc, ModContent.ItemType(), 15, 25); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Abyss/Trasher.cs b/NPCs/Abyss/Trasher.cs index 8fcd369555..e44866e80e 100644 --- a/NPCs/Abyss/Trasher.cs +++ b/NPCs/Abyss/Trasher.cs @@ -355,19 +355,10 @@ namespace CalamityMod.NPCs.Abyss NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, NPCID.Angler, 0, 0f, 0f, 0f, 0f, 255); NPC.savedAngler = true; } - if (Main.rand.NextBool(25)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.DivingHelmet); - } - if (Main.rand.NextBool(20)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.rand.NextBool(10) && Main.hardMode) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Gatligator); - } - DropHelper.DropItemCondition(npc, ModContent.ItemType(), false, Main.rand.NextBool(2), 1, 3); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 2, 1, 3); + DropHelper.DropItemChance(npc, ItemID.DivingHelmet, 20); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 20); + DropHelper.DropItemCondition(npc, ItemID.Gatligator, Main.hardMode, 10, 1, 1); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AquaticScourge/AquaticUrchin.cs b/NPCs/AquaticScourge/AquaticUrchin.cs index 5a9f61731f..b6cd131321 100644 --- a/NPCs/AquaticScourge/AquaticUrchin.cs +++ b/NPCs/AquaticScourge/AquaticUrchin.cs @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.AquaticScourge public override void NPCLoot() { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(15, 26)); + DropHelper.DropItem(npc, ModContent.ItemType(), 15, 25); } public override void HitEffect(int hitDirection, double damage) From 7811d1b0e8962528246add98c19bf895c8fc75d0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:48:05 -0400 Subject: [PATCH 39/40] removed glyph from butterfly recipe --- Items/Weapons/Summon/ResurrectionButterfly.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs index 1880acdc35..232097c7f8 100644 --- a/Items/Weapons/Summon/ResurrectionButterfly.cs +++ b/Items/Weapons/Summon/ResurrectionButterfly.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Summon r.AddIngredient(ModContent.ItemType(), 5); r.AddIngredient(ItemID.ButterflyDust, 2); r.AddIngredient(ModContent.ItemType()); - r.AddIngredient(ModContent.ItemType()); + //r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.Loom); r.SetResult(this); r.AddRecipe(); From e26fc9deeb9f86a17cd38eae34a2f7b4a22da7e4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 10 Mar 2020 23:43:27 -0400 Subject: [PATCH 40/40] reduced rifle noise and temporal umbrella --- Items/Weapons/Summon/BensUmbrella.cs | 2 +- Projectiles/Summon/MagicRifle.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs index f4d3f85284..06c8314b71 100644 --- a/Items/Weapons/Summon/BensUmbrella.cs +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon { public override void SetStaticDefaults() { - DisplayName.SetDefault("Ben's Umbrella"); + DisplayName.SetDefault("Temporal Umbrella"); Tooltip.SetDefault("Surprisingly sturdy, I reckon this could defeat the Mafia in a single blow\n" + "Summons a magic hat to hover above your head\n" + "The hat will release a variety of objects to assault your foes\n" + diff --git a/Projectiles/Summon/MagicRifle.cs b/Projectiles/Summon/MagicRifle.cs index 45e4068dd9..91c2fe8592 100644 --- a/Projectiles/Summon/MagicRifle.cs +++ b/Projectiles/Summon/MagicRifle.cs @@ -194,9 +194,9 @@ namespace CalamityMod.Projectiles.Summon int projType = ModContent.ProjectileType(); if (flag25 && projectile.ai[1] == 0f) { - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool(6)) { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20, 0.25f); + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20, 0.1f); } projectile.ai[1] += 1f; if (Main.myPlayer == projectile.owner)