diff --git a/Buffs/Pets/SirenLightPetBuff.png b/Buffs/Pets/SirenLightPetBuff.png index d3f7aa5885..e2ff5c8780 100644 Binary files a/Buffs/Pets/SirenLightPetBuff.png and b/Buffs/Pets/SirenLightPetBuff.png differ diff --git a/Buffs/StatBuffs/XerocRage.png b/Buffs/StatBuffs/XerocRage.png index b4dc31565c..5db048a016 100644 Binary files a/Buffs/StatBuffs/XerocRage.png and b/Buffs/StatBuffs/XerocRage.png differ diff --git a/Buffs/StatBuffs/XerocWrath.png b/Buffs/StatBuffs/XerocWrath.png index e8f6d0c6c1..60b04f7a73 100644 Binary files a/Buffs/StatBuffs/XerocWrath.png and b/Buffs/StatBuffs/XerocWrath.png differ diff --git a/Buffs/Summon/Herring.png b/Buffs/Summon/Herring.png index aed61a6102..cd535e3c29 100644 Binary files a/Buffs/Summon/Herring.png and b/Buffs/Summon/Herring.png differ diff --git a/Buffs/Summon/SandyWaifu.png b/Buffs/Summon/SandyWaifu.png index fa0be1df22..a8e19f8ceb 100644 Binary files a/Buffs/Summon/SandyWaifu.png and b/Buffs/Summon/SandyWaifu.png differ diff --git a/Buffs/Summon/WaterWaifu.png b/Buffs/Summon/WaterWaifu.png index b9e9cafb73..090fe9a059 100644 Binary files a/Buffs/Summon/WaterWaifu.png and b/Buffs/Summon/WaterWaifu.png differ diff --git a/Buffs/Summon/WulfrumDroidBuff.png b/Buffs/Summon/WulfrumDroidBuff.png index 34b1c798e4..bec3e3f78c 100644 Binary files a/Buffs/Summon/WulfrumDroidBuff.png and b/Buffs/Summon/WulfrumDroidBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a41df0834e..cf7b43fe3c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -256,6 +256,7 @@ namespace CalamityMod.CalPlayer public int throwingCrit = 0; public bool throwingAmmoCost75 = false; public bool throwingAmmoCost66 = false; + public bool throwingAmmoCost55 = false; public bool throwingAmmoCost50 = false; #endregion @@ -630,6 +631,11 @@ namespace CalamityMod.CalPlayer public bool auricBoost = false; public bool daedalusReflect = false; public bool daedalusSplit = false; + public bool titanHeartSet = false; + public bool titanHeartMask = false; + public bool titanHeartMantle = false; + public bool titanHeartBoots = false; + public int titanCooldown = 0; public bool umbraphileSet = false; public bool reaverBlast = false; public bool reaverBurst = false; @@ -948,6 +954,10 @@ namespace CalamityMod.CalPlayer public bool snowmanForce; public bool snowmanNoseless; public bool snowmanPower; + public bool meldTransformationPrevious; + public bool meldTransformation; + public bool meldTransformationForce; + public bool meldTransformationPower; #endregion #endregion @@ -1312,6 +1322,7 @@ namespace CalamityMod.CalPlayer throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; + throwingAmmoCost55 = false; throwingAmmoCost50 = false; accStealthGenBoost = 0f; @@ -1614,6 +1625,10 @@ namespace CalamityMod.CalPlayer statigelSet = false; + titanHeartSet = false; + titanHeartMask = false; + titanHeartMantle = false; + titanHeartBoots = false; umbraphileSet = false; plagueReaper = false; plaguebringerPatronSet = false; @@ -1915,6 +1930,9 @@ namespace CalamityMod.CalPlayer snowmanPrevious = snowman; snowman = snowmanHide = snowmanForce = snowmanPower = false; + meldTransformationPrevious = meldTransformation; + meldTransformation = meldTransformationForce = meldTransformationPower = false; + rageModeActive = false; adrenalineModeActive = false; @@ -1971,8 +1989,6 @@ namespace CalamityMod.CalPlayer hallowedRuneCooldown = 0; doubledHorror = false; sulphurBubbleCooldown = 0; - forbiddenCooldown = 0; - tornadoCooldown = 0; ladHearts = 0; prismaticLasers = 0; @@ -2036,6 +2052,7 @@ namespace CalamityMod.CalPlayer throwingCrit = 0; throwingAmmoCost75 = false; throwingAmmoCost66 = false; + throwingAmmoCost55 = false; throwingAmmoCost50 = false; #endregion @@ -2192,6 +2209,11 @@ namespace CalamityMod.CalPlayer reaverDoubleTap = false; shadeRegen = false; dsSetBonus = false; + titanHeartSet = false; + titanHeartMask = false; + titanHeartMantle = false; + titanHeartBoots = false; + titanCooldown = 0; umbraphileSet = false; reaverBlast = false; reaverBurst = false; @@ -2220,6 +2242,8 @@ namespace CalamityMod.CalPlayer desertProwler = false; snowRuffianSet = false; forbiddenCirclet = false; + forbiddenCooldown = 0; + tornadoCooldown = 0; eskimoSet = false; //vanilla armor meteorSet = false; //vanilla armor, for Space Gun nerf victideSet = false; @@ -4160,6 +4184,26 @@ namespace CalamityMod.CalPlayer { knockback *= 1.09f; } + if (titanHeartMask && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartMantle && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartBoots && item.Calamity().rogue) + { + knockback *= 1.05f; + } + if (titanHeartSet && item.Calamity().rogue) + { + knockback *= 1.2f; + } + if (titanHeartSet && StealthStrikeAvailable() && item.Calamity().rogue) + { + knockback *= 2f; + } 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) { @@ -7047,6 +7091,12 @@ namespace CalamityMod.CalPlayer player.head = mod.GetEquipSlot("SirenHeadAlt", EquipType.Head); player.face = -1; } + else if (meldTransformationPower || meldTransformationForce) + { + player.legs = mod.GetEquipSlot("MeldTransformationLegs", EquipType.Legs); + player.body = mod.GetEquipSlot("MeldTransformationBody", EquipType.Body); + player.head = mod.GetEquipSlot("MeldTransformationHead", EquipType.Head); + } else { if (profanedCrystalWingCounter.Key != 1) @@ -7166,6 +7216,18 @@ namespace CalamityMod.CalPlayer Main.PlaySound(SoundID.FemaleHit, (int)player.position.X, (int)player.position.Y, 1, 1f, 0f); //female hit noise hurtSoundTimer = 10; } + else if (titanHeartSet) + { + playSound = false; + Terraria.Audio.LegacySoundStyle atlasHurt = Utils.SelectRandom(Main.rand, new Terraria.Audio.LegacySoundStyle[] + { + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt0"), + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt1"), + mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt2") + }); + Main.PlaySound(atlasHurt, (int)player.position.X, (int)player.position.Y); + hurtSoundTimer = 10; + } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index fa9db66678..1b4d16c477 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -983,6 +983,8 @@ namespace CalamityMod.CalPlayer modPlayer.titanBoost--; if (modPlayer.prismaticLasers > 0) modPlayer.prismaticLasers--; + if (modPlayer.titanCooldown > 0) + modPlayer.titanCooldown--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) diff --git a/CalamityMod.cs b/CalamityMod.cs index 963c1c37ff..53a32446b8 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -286,6 +286,10 @@ namespace CalamityMod AddEquipTexture(new SnowRuffianWings(), null, EquipType.Wings, "SnowRuffWings", "CalamityMod/Items/Armor/SnowRuffianWings"); + AddEquipTexture(new MeldTransformationHead(), null, EquipType.Head, "MeldTransformationHead", "CalamityMod/Items/Armor/MeldTransformation_Head"); + AddEquipTexture(new MeldTransformationBody(), null, EquipType.Body, "MeldTransformationBody", "CalamityMod/Items/Armor/MeldTransformation_Body", "CalamityMod/Items/Armor/MeldTransformation_Arms"); + AddEquipTexture(new MeldTransformationLegs(), null, EquipType.Legs, "MeldTransformationLegs", "CalamityMod/Items/Armor/MeldTransformation_Legs"); + AddEquipTexture(new AbyssDivingGearHair(), null, EquipType.Head, "AbyssDivingGearHead", "CalamityMod/Items/Accessories/AbyssalDivingGear_Face"); AstralCactusTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tiles/AstralCactus"); diff --git a/ExtraTextures/Chains/BallOFuguChain.png b/ExtraTextures/Chains/BallOFuguChain.png index 0a507b3c27..72c9a548c3 100644 Binary files a/ExtraTextures/Chains/BallOFuguChain.png and b/ExtraTextures/Chains/BallOFuguChain.png differ diff --git a/ExtraTextures/Tanks/Backpack_TheEmpyrean.png b/ExtraTextures/Tanks/Backpack_TheEmpyrean.png index 585763a882..9a350cbd98 100644 Binary files a/ExtraTextures/Tanks/Backpack_TheEmpyrean.png and b/ExtraTextures/Tanks/Backpack_TheEmpyrean.png differ diff --git a/Gores/LeviathanGores/LeviGore.png b/Gores/LeviathanGores/LeviGore.png new file mode 100644 index 0000000000..2fa7b63295 Binary files /dev/null and b/Gores/LeviathanGores/LeviGore.png differ diff --git a/Gores/LeviathanGores/LeviGore2.png b/Gores/LeviathanGores/LeviGore2.png new file mode 100644 index 0000000000..dd6f7cab00 Binary files /dev/null and b/Gores/LeviathanGores/LeviGore2.png differ diff --git a/Gores/LeviathanGores/LeviGore3.png b/Gores/LeviathanGores/LeviGore3.png new file mode 100644 index 0000000000..3021ab4ddc Binary files /dev/null and b/Gores/LeviathanGores/LeviGore3.png differ diff --git a/Gores/LeviathanGores/LeviGore4.png b/Gores/LeviathanGores/LeviGore4.png new file mode 100644 index 0000000000..be05c90eaa Binary files /dev/null and b/Gores/LeviathanGores/LeviGore4.png differ diff --git a/Gores/Leviathangib1.png b/Gores/Leviathangib1.png deleted file mode 100644 index 0ecb8917b0..0000000000 Binary files a/Gores/Leviathangib1.png and /dev/null differ diff --git a/Gores/Leviathangib2.png b/Gores/Leviathangib2.png deleted file mode 100644 index 439118a08d..0000000000 Binary files a/Gores/Leviathangib2.png and /dev/null differ diff --git a/Gores/Leviathangib3.png b/Gores/Leviathangib3.png deleted file mode 100644 index e574799f70..0000000000 Binary files a/Gores/Leviathangib3.png and /dev/null differ diff --git a/Gores/SirenGores/Siren.png b/Gores/SirenGores/Siren.png deleted file mode 100644 index 5fd3fd11c7..0000000000 Binary files a/Gores/SirenGores/Siren.png and /dev/null differ diff --git a/Gores/SirenGores/Siren2.png b/Gores/SirenGores/Siren2.png deleted file mode 100644 index 773164636b..0000000000 Binary files a/Gores/SirenGores/Siren2.png and /dev/null differ diff --git a/Gores/SirenGores/Siren3.png b/Gores/SirenGores/Siren3.png deleted file mode 100644 index 5fc6575960..0000000000 Binary files a/Gores/SirenGores/Siren3.png and /dev/null differ diff --git a/Gores/SirenGores/Siren4.png b/Gores/SirenGores/Siren4.png deleted file mode 100644 index d819fb0058..0000000000 Binary files a/Gores/SirenGores/Siren4.png and /dev/null differ diff --git a/Gores/SirenGores/Siren5.png b/Gores/SirenGores/Siren5.png deleted file mode 100644 index 21f1e550d5..0000000000 Binary files a/Gores/SirenGores/Siren5.png and /dev/null differ diff --git a/Items/Accessories/DarkGodsSheath.cs b/Items/Accessories/DarkGodsSheath.cs index 6726b95ace..4b81fed3d4 100644 --- a/Items/Accessories/DarkGodsSheath.cs +++ b/Items/Accessories/DarkGodsSheath.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType(), 25); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Accessories/DarkGodsSheath.png b/Items/Accessories/DarkGodsSheath.png index f2bd3b2b32..0a71033b81 100644 Binary files a/Items/Accessories/DarkGodsSheath.png and b/Items/Accessories/DarkGodsSheath.png differ diff --git a/Items/Accessories/EnchantedPearl.png b/Items/Accessories/EnchantedPearl.png index a036b0d126..db3018d0fe 100644 Binary files a/Items/Accessories/EnchantedPearl.png and b/Items/Accessories/EnchantedPearl.png differ diff --git a/Items/Accessories/LeviathanAmbergris.png b/Items/Accessories/LeviathanAmbergris.png index 88034a76f7..35d439497c 100644 Binary files a/Items/Accessories/LeviathanAmbergris.png and b/Items/Accessories/LeviathanAmbergris.png differ diff --git a/Items/Accessories/LureofEnthrallment.png b/Items/Accessories/LureofEnthrallment.png index 91eb37c1de..d89b82671e 100644 Binary files a/Items/Accessories/LureofEnthrallment.png and b/Items/Accessories/LureofEnthrallment.png differ diff --git a/Items/Accessories/WifeinaBottle.png b/Items/Accessories/WifeinaBottle.png index bc29babf45..79320b4e72 100644 Binary files a/Items/Accessories/WifeinaBottle.png and b/Items/Accessories/WifeinaBottle.png differ diff --git a/Items/Accessories/Wings/MOAB.png b/Items/Accessories/Wings/MOAB.png index e67e251f22..ecafba2594 100644 Binary files a/Items/Accessories/Wings/MOAB.png and b/Items/Accessories/Wings/MOAB.png differ diff --git a/Items/Accessories/Wings/MOAB_Wings.png b/Items/Accessories/Wings/MOAB_Wings.png index b7e594948f..c02706a974 100644 Binary files a/Items/Accessories/Wings/MOAB_Wings.png and b/Items/Accessories/Wings/MOAB_Wings.png differ diff --git a/Items/Accessories/Wings/XerocWings.png b/Items/Accessories/Wings/XerocWings.png index 7e14b06cf9..5044f88358 100644 Binary files a/Items/Accessories/Wings/XerocWings.png and b/Items/Accessories/Wings/XerocWings.png differ diff --git a/Items/Accessories/Wings/XerocWings_Wings.png b/Items/Accessories/Wings/XerocWings_Wings.png index 62064efbca..22d8a51361 100644 Binary files a/Items/Accessories/Wings/XerocWings_Wings.png and b/Items/Accessories/Wings/XerocWings_Wings.png differ diff --git a/Items/Accessories/WulfrumBattery.png b/Items/Accessories/WulfrumBattery.png index 3bc19a4875..ada5ddef24 100644 Binary files a/Items/Accessories/WulfrumBattery.png and b/Items/Accessories/WulfrumBattery.png differ diff --git a/Items/Ammo/ArcticArrow.png b/Items/Ammo/ArcticArrow.png index d667dfa5b6..5fcacaa5de 100644 Binary files a/Items/Ammo/ArcticArrow.png and b/Items/Ammo/ArcticArrow.png differ diff --git a/Items/Ammo/ElysianArrow.png b/Items/Ammo/ElysianArrow.png index ed813a16ae..e0936c2556 100644 Binary files a/Items/Ammo/ElysianArrow.png and b/Items/Ammo/ElysianArrow.png differ diff --git a/Items/Ammo/IcicleArrow.png b/Items/Ammo/IcicleArrow.png index 6812f4d459..6be666a75d 100644 Binary files a/Items/Ammo/IcicleArrow.png and b/Items/Ammo/IcicleArrow.png differ diff --git a/Items/Ammo/NapalmArrow.png b/Items/Ammo/NapalmArrow.png index 254f05c605..48ef48d4c4 100644 Binary files a/Items/Ammo/NapalmArrow.png and b/Items/Ammo/NapalmArrow.png differ diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index 1fee11c457..a61a43b5b4 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusSplit = true; modPlayer.rogueStealthMax += 1.05f; - player.Calamity().throwingDamage += 0.05f; - player.Calamity().wearingRogueArmor = true; + modPlayer.throwingDamage += 0.05f; + modPlayer.wearingRogueArmor = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/MeldTransformation_Arms.png b/Items/Armor/MeldTransformation_Arms.png new file mode 100644 index 0000000000..d8caa7f60a Binary files /dev/null and b/Items/Armor/MeldTransformation_Arms.png differ diff --git a/Items/Armor/MeldTransformation_Body.png b/Items/Armor/MeldTransformation_Body.png new file mode 100644 index 0000000000..c35fedf436 Binary files /dev/null and b/Items/Armor/MeldTransformation_Body.png differ diff --git a/Items/Armor/MeldTransformation_Head.png b/Items/Armor/MeldTransformation_Head.png new file mode 100644 index 0000000000..6045927bc4 Binary files /dev/null and b/Items/Armor/MeldTransformation_Head.png differ diff --git a/Items/Armor/MeldTransformation_Legs.png b/Items/Armor/MeldTransformation_Legs.png new file mode 100644 index 0000000000..fbf2427684 Binary files /dev/null and b/Items/Armor/MeldTransformation_Legs.png differ diff --git a/Items/Armor/StatigelArmor.cs b/Items/Armor/StatigelArmor.cs index 86fe23c7e0..42fbd4e999 100644 --- a/Items/Armor/StatigelArmor.cs +++ b/Items/Armor/StatigelArmor.cs @@ -26,10 +26,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.meleeCrit += 5; - player.magicCrit += 5; - player.rangedCrit += 5; - player.Calamity().throwingCrit += 5; + player.Calamity().AllCritBoost(5); } public override void AddRecipes() diff --git a/Items/Armor/TitanHeartBoots.cs b/Items/Armor/TitanHeartBoots.cs new file mode 100644 index 0000000000..68ced6a884 --- /dev/null +++ b/Items/Armor/TitanHeartBoots.cs @@ -0,0 +1,42 @@ +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Legs)] + public class TitanHeartBoots : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Boots"); + Tooltip.SetDefault("10% increased rogue velocity and 5% boosted rogue knockback"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 14; + } + + public override void UpdateEquip(Player player) + { + player.Calamity().titanHeartBoots = true; + player.Calamity().throwingVelocity += 0.1f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 14); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartBoots.png b/Items/Armor/TitanHeartBoots.png new file mode 100644 index 0000000000..97012de069 Binary files /dev/null and b/Items/Armor/TitanHeartBoots.png differ diff --git a/Items/Armor/TitanHeartBoots_Legs.png b/Items/Armor/TitanHeartBoots_Legs.png new file mode 100644 index 0000000000..dbd89ea24a Binary files /dev/null and b/Items/Armor/TitanHeartBoots_Legs.png differ diff --git a/Items/Armor/TitanHeartMantle.cs b/Items/Armor/TitanHeartMantle.cs new file mode 100644 index 0000000000..5ddc500f41 --- /dev/null +++ b/Items/Armor/TitanHeartMantle.cs @@ -0,0 +1,43 @@ +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Body)] + public class TitanHeartMantle : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Mantle"); + Tooltip.SetDefault("45% chance to not consume rogue items\n" + + "5% boosted rogue knockback but 20% lowered rogue shoot speed"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 17; + } + + public override void UpdateEquip(Player player) + { + player.Calamity().titanHeartMantle = true; + player.Calamity().throwingAmmoCost55 = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartMantle.png b/Items/Armor/TitanHeartMantle.png new file mode 100644 index 0000000000..fa0b8a8c39 Binary files /dev/null and b/Items/Armor/TitanHeartMantle.png differ diff --git a/Items/Armor/TitanHeartMantle_Arms.png b/Items/Armor/TitanHeartMantle_Arms.png new file mode 100644 index 0000000000..871f504511 Binary files /dev/null and b/Items/Armor/TitanHeartMantle_Arms.png differ diff --git a/Items/Armor/TitanHeartMantle_Body.png b/Items/Armor/TitanHeartMantle_Body.png new file mode 100644 index 0000000000..2aeac92624 Binary files /dev/null and b/Items/Armor/TitanHeartMantle_Body.png differ diff --git a/Items/Armor/TitanHeartMask.cs b/Items/Armor/TitanHeartMask.cs new file mode 100644 index 0000000000..db9b696842 --- /dev/null +++ b/Items/Armor/TitanHeartMask.cs @@ -0,0 +1,64 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Head)] + public class TitanHeartMask : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart Mask"); + Tooltip.SetDefault("5% increased rogue damage and knockback"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; + item.defense = 12; //43 + } + + public override bool IsArmorSet(Item head, Item body, Item legs) + { + return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); + } + + public override void UpdateArmorSet(Player player) + { + player.setBonus = "20% increased rogue damage and knockback\n" + + "Stealth strikes deal double knockback and cause an astral explosion\n" + + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.titanHeartSet = true; + modPlayer.throwingDamage += 0.2f; + modPlayer.rogueStealthMax += 1f; + modPlayer.wearingRogueArmor = true; + } + + public override void UpdateEquip(Player player) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.titanHeartMask = true; + modPlayer.throwingDamage += 0.05f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/TitanHeartMask.png b/Items/Armor/TitanHeartMask.png new file mode 100644 index 0000000000..2d29c5f4a3 Binary files /dev/null and b/Items/Armor/TitanHeartMask.png differ diff --git a/Items/Armor/TitanHeartMask_Head.png b/Items/Armor/TitanHeartMask_Head.png new file mode 100644 index 0000000000..0da57b829a Binary files /dev/null and b/Items/Armor/TitanHeartMask_Head.png differ diff --git a/Items/Armor/Vanity/AnahitaMask.cs b/Items/Armor/Vanity/AnahitaMask.cs new file mode 100644 index 0000000000..dbb1c899ec --- /dev/null +++ b/Items/Armor/Vanity/AnahitaMask.cs @@ -0,0 +1,22 @@ +using Terraria.ModLoader; +namespace CalamityMod.Items.Armor.Vanity +{ + [AutoloadEquip(EquipType.Head)] + public class AnahitaMask : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Anahita Mask"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 20; + item.rare = 1; + item.vanity = true; + } + + public override bool DrawHead() => false; + } +} diff --git a/Items/Armor/Vanity/AnahitaMask.png b/Items/Armor/Vanity/AnahitaMask.png new file mode 100644 index 0000000000..ad122a30d9 Binary files /dev/null and b/Items/Armor/Vanity/AnahitaMask.png differ diff --git a/Items/Armor/Vanity/AnahitaMask_Head.png b/Items/Armor/Vanity/AnahitaMask_Head.png new file mode 100644 index 0000000000..9e9469605b Binary files /dev/null and b/Items/Armor/Vanity/AnahitaMask_Head.png differ diff --git a/Items/Armor/Vanity/LeviathanMask.png b/Items/Armor/Vanity/LeviathanMask.png index cc7e565bfc..8f9f7e506e 100644 Binary files a/Items/Armor/Vanity/LeviathanMask.png and b/Items/Armor/Vanity/LeviathanMask.png differ diff --git a/Items/Armor/Vanity/LeviathanMask_Head.png b/Items/Armor/Vanity/LeviathanMask_Head.png index 28b1546778..ce1b8bbeee 100644 Binary files a/Items/Armor/Vanity/LeviathanMask_Head.png and b/Items/Armor/Vanity/LeviathanMask_Head.png differ diff --git a/Items/Armor/WulfrumArmor.png b/Items/Armor/WulfrumArmor.png index 6b588b347a..f99eacd3b0 100644 Binary files a/Items/Armor/WulfrumArmor.png and b/Items/Armor/WulfrumArmor.png differ diff --git a/Items/Armor/WulfrumArmor_Arms.png b/Items/Armor/WulfrumArmor_Arms.png index f4658bd88d..d746fc89f8 100644 Binary files a/Items/Armor/WulfrumArmor_Arms.png and b/Items/Armor/WulfrumArmor_Arms.png differ diff --git a/Items/Armor/WulfrumArmor_Body.png b/Items/Armor/WulfrumArmor_Body.png index 44e60bb227..0122566d95 100644 Binary files a/Items/Armor/WulfrumArmor_Body.png and b/Items/Armor/WulfrumArmor_Body.png differ diff --git a/Items/Armor/WulfrumArmor_FemaleBody.png b/Items/Armor/WulfrumArmor_FemaleBody.png index 44e60bb227..0122566d95 100644 Binary files a/Items/Armor/WulfrumArmor_FemaleBody.png and b/Items/Armor/WulfrumArmor_FemaleBody.png differ diff --git a/Items/Armor/WulfrumHeadgear.png b/Items/Armor/WulfrumHeadgear.png index 671c39b7f4..e6d08596e8 100644 Binary files a/Items/Armor/WulfrumHeadgear.png and b/Items/Armor/WulfrumHeadgear.png differ diff --git a/Items/Armor/WulfrumHeadgear_Head.png b/Items/Armor/WulfrumHeadgear_Head.png index 4ea3156130..cf9ef4f3ac 100644 Binary files a/Items/Armor/WulfrumHeadgear_Head.png and b/Items/Armor/WulfrumHeadgear_Head.png differ diff --git a/Items/Armor/WulfrumHelm.png b/Items/Armor/WulfrumHelm.png index 500b44d32a..b2611d63d1 100644 Binary files a/Items/Armor/WulfrumHelm.png and b/Items/Armor/WulfrumHelm.png differ diff --git a/Items/Armor/WulfrumHelm_Head.png b/Items/Armor/WulfrumHelm_Head.png index 1498d2b0be..9c56efc53a 100644 Binary files a/Items/Armor/WulfrumHelm_Head.png and b/Items/Armor/WulfrumHelm_Head.png differ diff --git a/Items/Armor/WulfrumHelmet.png b/Items/Armor/WulfrumHelmet.png index a531fdf4a6..e549a7c76e 100644 Binary files a/Items/Armor/WulfrumHelmet.png and b/Items/Armor/WulfrumHelmet.png differ diff --git a/Items/Armor/WulfrumHelmet_Head.png b/Items/Armor/WulfrumHelmet_Head.png index a62f01cf1d..50ce885f3f 100644 Binary files a/Items/Armor/WulfrumHelmet_Head.png and b/Items/Armor/WulfrumHelmet_Head.png differ diff --git a/Items/Armor/WulfrumHood.png b/Items/Armor/WulfrumHood.png index 73ea374b5a..82655fd91e 100644 Binary files a/Items/Armor/WulfrumHood.png and b/Items/Armor/WulfrumHood.png differ diff --git a/Items/Armor/WulfrumHood_Head.png b/Items/Armor/WulfrumHood_Head.png index dc5bcd550e..6b273ef5e1 100644 Binary files a/Items/Armor/WulfrumHood_Head.png and b/Items/Armor/WulfrumHood_Head.png differ diff --git a/Items/Armor/WulfrumLeggings.png b/Items/Armor/WulfrumLeggings.png index 6ed06d8882..ba9f776ea1 100644 Binary files a/Items/Armor/WulfrumLeggings.png and b/Items/Armor/WulfrumLeggings.png differ diff --git a/Items/Armor/WulfrumLeggings_Legs.png b/Items/Armor/WulfrumLeggings_Legs.png index 56268cf5de..9b96d20767 100644 Binary files a/Items/Armor/WulfrumLeggings_Legs.png and b/Items/Armor/WulfrumLeggings_Legs.png differ diff --git a/Items/Armor/WulfrumMask.png b/Items/Armor/WulfrumMask.png index 81852ac847..07edc75dce 100644 Binary files a/Items/Armor/WulfrumMask.png and b/Items/Armor/WulfrumMask.png differ diff --git a/Items/Armor/WulfrumMask_Head.png b/Items/Armor/WulfrumMask_Head.png index 77d7eabf9f..56756bdf03 100644 Binary files a/Items/Armor/WulfrumMask_Head.png and b/Items/Armor/WulfrumMask_Head.png differ diff --git a/Items/Armor/XerocCuisses.cs b/Items/Armor/XerocCuisses.cs index 7d20d317bd..c0ab2a23e2 100644 --- a/Items/Armor/XerocCuisses.cs +++ b/Items/Armor/XerocCuisses.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Armor { public override void SetStaticDefaults() { - DisplayName.SetDefault("Xeroc Cuisses"); + DisplayName.SetDefault("Empyrean Cuisses"); Tooltip.SetDefault("5% increased rogue damage and critical strike chance\n" + "20% increased movement speed\n" + "Speed of the cosmos"); diff --git a/Items/Armor/XerocCuisses.png b/Items/Armor/XerocCuisses.png index b2a9795649..86af5c1d75 100644 Binary files a/Items/Armor/XerocCuisses.png and b/Items/Armor/XerocCuisses.png differ diff --git a/Items/Armor/XerocCuisses_Legs.png b/Items/Armor/XerocCuisses_Legs.png index 38062343b0..9128b5898c 100644 Binary files a/Items/Armor/XerocCuisses_Legs.png and b/Items/Armor/XerocCuisses_Legs.png differ diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 36ffe653b9..c1e064b27c 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor { public override void SetStaticDefaults() { - DisplayName.SetDefault("Xeroc Mask"); + DisplayName.SetDefault("Empyrean Mask"); Tooltip.SetDefault("11% increased rogue damage and critical strike chance, 22% increased movement speed\n" + "Temporary immunity to lava\n" + "Provides heat protection in Death Mode\n" + @@ -36,6 +36,8 @@ namespace CalamityMod.Items.Armor { player.armorEffectDrawShadow = true; player.armorEffectDrawOutlines = true; + player.Calamity().meldTransformation = true; + player.Calamity().meldTransformationForce = true; } public override void UpdateArmorSet(Player player) @@ -50,7 +52,7 @@ namespace CalamityMod.Items.Armor "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"; - if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) + if (player.statLife <= (int)(player.statLifeMax2 * 0.5)) { player.AddBuff(BuffID.Wrath, 2); player.AddBuff(BuffID.Rage, 2); @@ -78,4 +80,28 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } + + public class MeldTransformationHead : EquipTexture + { + public override bool DrawHead() + { + return false; + } + } + + public class MeldTransformationBody : EquipTexture + { + public override bool DrawBody() + { + return false; + } + } + + public class MeldTransformationLegs : EquipTexture + { + public override bool DrawLegs() + { + return false; + } + } } diff --git a/Items/Armor/XerocMask.png b/Items/Armor/XerocMask.png index 7fc3160e93..47578c6049 100644 Binary files a/Items/Armor/XerocMask.png and b/Items/Armor/XerocMask.png differ diff --git a/Items/Armor/XerocMask_Head.png b/Items/Armor/XerocMask_Head.png index b7555ffc81..04e8bb52e5 100644 Binary files a/Items/Armor/XerocMask_Head.png and b/Items/Armor/XerocMask_Head.png differ diff --git a/Items/Armor/XerocPlateMail.cs b/Items/Armor/XerocPlateMail.cs index 3d439a6533..3d5091ce9d 100644 --- a/Items/Armor/XerocPlateMail.cs +++ b/Items/Armor/XerocPlateMail.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Armor { public override void SetStaticDefaults() { - DisplayName.SetDefault("Xeroc Plate Mail"); + DisplayName.SetDefault("Empyrean Cloak"); Tooltip.SetDefault("+20 max life\n" + "6% increased movement speed\n" + "7% increased rogue damage and critical strike chance\n" + diff --git a/Items/Armor/XerocPlateMail.png b/Items/Armor/XerocPlateMail.png index df27234edb..6fecf62e4a 100644 Binary files a/Items/Armor/XerocPlateMail.png and b/Items/Armor/XerocPlateMail.png differ diff --git a/Items/Armor/XerocPlateMail_Arms.png b/Items/Armor/XerocPlateMail_Arms.png index bba2164400..dc99ae730b 100644 Binary files a/Items/Armor/XerocPlateMail_Arms.png and b/Items/Armor/XerocPlateMail_Arms.png differ diff --git a/Items/Armor/XerocPlateMail_Body.png b/Items/Armor/XerocPlateMail_Body.png index 6fe45adf32..4b6581a9cb 100644 Binary files a/Items/Armor/XerocPlateMail_Body.png and b/Items/Armor/XerocPlateMail_Body.png differ diff --git a/Items/Armor/XerocPlateMail_FemaleBody.png b/Items/Armor/XerocPlateMail_FemaleBody.png deleted file mode 100644 index 6fe45adf32..0000000000 Binary files a/Items/Armor/XerocPlateMail_FemaleBody.png and /dev/null differ diff --git a/Items/Fishing/FishingRods/WulfrumRod.png b/Items/Fishing/FishingRods/WulfrumRod.png index 3371287464..593ae2bc0c 100644 Binary files a/Items/Fishing/FishingRods/WulfrumRod.png and b/Items/Fishing/FishingRods/WulfrumRod.png differ diff --git a/Items/LoreItems/KnowledgeLeviathanandSiren.png b/Items/LoreItems/KnowledgeLeviathanandSiren.png index 155928f2bf..b1e8746bb8 100644 Binary files a/Items/LoreItems/KnowledgeLeviathanandSiren.png and b/Items/LoreItems/KnowledgeLeviathanandSiren.png differ diff --git a/Items/Materials/MeldBlob.png b/Items/Materials/MeldBlob.png index 48341ed30c..a24387680f 100644 Binary files a/Items/Materials/MeldBlob.png and b/Items/Materials/MeldBlob.png differ diff --git a/Items/Materials/MeldiateBar.cs b/Items/Materials/MeldiateBar.cs index 570ff475ff..e9d66056da 100644 --- a/Items/Materials/MeldiateBar.cs +++ b/Items/Materials/MeldiateBar.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Items.Materials { public override void SetStaticDefaults() { - DisplayName.SetDefault("Meld Bar"); + DisplayName.SetDefault("Meld Construct"); } public override void SetDefaults() @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.Ectoplasm); - recipe.AddIngredient(ItemID.HallowedBar); recipe.AddIngredient(ModContent.ItemType(), 6); + recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this, 3); recipe.AddRecipe(); diff --git a/Items/Materials/MeldiateBar.png b/Items/Materials/MeldiateBar.png index d2067434db..1150c8db8f 100644 Binary files a/Items/Materials/MeldiateBar.png and b/Items/Materials/MeldiateBar.png differ diff --git a/Items/Materials/TitanHeart.cs b/Items/Materials/TitanHeart.cs new file mode 100644 index 0000000000..3f74cd0867 --- /dev/null +++ b/Items/Materials/TitanHeart.cs @@ -0,0 +1,19 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Materials +{ + public class TitanHeart : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titan Heart"); + } + + public override void SetDefaults() + { + item.CloneDefaults(ItemID.AncientBattleArmorMaterial); + } + } +} diff --git a/Items/Materials/TitanHeart.png b/Items/Materials/TitanHeart.png new file mode 100644 index 0000000000..834d516b56 Binary files /dev/null and b/Items/Materials/TitanHeart.png differ diff --git a/Items/Materials/UnholyCore.png b/Items/Materials/UnholyCore.png index 480bddf481..d13404b0e2 100644 Binary files a/Items/Materials/UnholyCore.png and b/Items/Materials/UnholyCore.png differ diff --git a/Items/Materials/WulfrumShard.cs b/Items/Materials/WulfrumShard.cs index e7975c53b3..bcdec89051 100644 --- a/Items/Materials/WulfrumShard.cs +++ b/Items/Materials/WulfrumShard.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Items.Materials { public override void SetStaticDefaults() { - DisplayName.SetDefault("Wulfrum Shard"); + DisplayName.SetDefault("Wulfrum Metal Scrap"); } public override void SetDefaults() diff --git a/Items/Materials/WulfrumShard.png b/Items/Materials/WulfrumShard.png index ffe827c29e..384f3c9372 100644 Binary files a/Items/Materials/WulfrumShard.png and b/Items/Materials/WulfrumShard.png differ diff --git a/Items/Pets/StrangeOrb.png b/Items/Pets/StrangeOrb.png index 2debd5f599..c7ab860ffb 100644 Binary files a/Items/Pets/StrangeOrb.png and b/Items/Pets/StrangeOrb.png differ diff --git a/Items/Placeables/Furniture/CraftingStations/BotanicPlanter.png b/Items/Placeables/Furniture/CraftingStations/BotanicPlanter.png index 8735c3d983..fc114a1b5d 100644 Binary files a/Items/Placeables/Furniture/CraftingStations/BotanicPlanter.png and b/Items/Placeables/Furniture/CraftingStations/BotanicPlanter.png differ diff --git a/Items/Placeables/Furniture/CraftingStations/SilvaBasin.png b/Items/Placeables/Furniture/CraftingStations/SilvaBasin.png index 84a2da8dfd..fe06bed067 100644 Binary files a/Items/Placeables/Furniture/CraftingStations/SilvaBasin.png and b/Items/Placeables/Furniture/CraftingStations/SilvaBasin.png differ diff --git a/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png b/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png index d4a0bad1c4..4d7e82cc00 100644 Binary files a/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png and b/Items/Placeables/Furniture/CraftingStations/StaticRefiner.png differ diff --git a/Items/Placeables/Furniture/Trophies/AnahitaTrophy.cs b/Items/Placeables/Furniture/Trophies/AnahitaTrophy.cs new file mode 100644 index 0000000000..c2c772e9fc --- /dev/null +++ b/Items/Placeables/Furniture/Trophies/AnahitaTrophy.cs @@ -0,0 +1,30 @@ +using CalamityMod.Tiles.Furniture; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.Furniture.Trophies +{ + public class AnahitaTrophy : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Anahita Trophy"); + } + + public override void SetDefaults() + { + item.width = 30; + item.height = 30; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = ItemUseStyleID.SwingThrow; + item.consumable = true; + item.value = 50000; + item.rare = 1; + item.createTile = ModContent.TileType(); + item.placeStyle = 27; + } + } +} diff --git a/Items/Placeables/Furniture/Trophies/AnahitaTrophy.png b/Items/Placeables/Furniture/Trophies/AnahitaTrophy.png new file mode 100644 index 0000000000..4edfaecab6 Binary files /dev/null and b/Items/Placeables/Furniture/Trophies/AnahitaTrophy.png differ diff --git a/Items/Placeables/Furniture/Trophies/LeviathanTrophy.png b/Items/Placeables/Furniture/Trophies/LeviathanTrophy.png index e9c5717b85..54e4ff532a 100644 Binary files a/Items/Placeables/Furniture/Trophies/LeviathanTrophy.png and b/Items/Placeables/Furniture/Trophies/LeviathanTrophy.png differ diff --git a/Items/Tools/ClimateChange/BloodIdol.png b/Items/Tools/ClimateChange/BloodIdol.png index 6fea635e5d..cdd73b1f65 100644 Binary files a/Items/Tools/ClimateChange/BloodIdol.png and b/Items/Tools/ClimateChange/BloodIdol.png differ diff --git a/Items/Tools/GallantPickaxe.cs b/Items/Tools/GallantPickaxe.cs index b9d891f4f5..06659b65f8 100644 --- a/Items/Tools/GallantPickaxe.cs +++ b/Items/Tools/GallantPickaxe.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Tools { public override void SetStaticDefaults() { - DisplayName.SetDefault("Gallant Pickaxe"); + DisplayName.SetDefault("Genesis Pickaxe"); Tooltip.SetDefault("Can mine Uelibloom Ore"); } @@ -18,20 +18,19 @@ namespace CalamityMod.Items.Tools { item.damage = 80; item.melee = true; - item.width = 54; - item.height = 54; - item.useTime = 6; - item.useAnimation = 12; + item.width = 84; + item.height = 80; + item.useTime = 7; + item.useAnimation = 14; item.useTurn = true; item.pick = 225; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 5.5f; - item.value = Item.buyPrice(1, 20, 0, 0); + item.value = Item.buyPrice(1, 0, 0, 0); item.rare = 10; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.tileBoost += 4; - item.Calamity().customRarity = CalamityRarity.Turquoise; + item.tileBoost += 6; item.useTurn = true; } @@ -50,7 +49,7 @@ namespace CalamityMod.Items.Tools { if (Main.rand.NextBool(5)) { - int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 58); + int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 62); } } } diff --git a/Items/Tools/GallantPickaxe.png b/Items/Tools/GallantPickaxe.png index c61cc5f0ab..9937b7fc19 100644 Binary files a/Items/Tools/GallantPickaxe.png and b/Items/Tools/GallantPickaxe.png differ diff --git a/Items/Tools/WulfrumAxe.cs b/Items/Tools/WulfrumAxe.cs index 457e96fb4f..0e2b0fa44c 100644 --- a/Items/Tools/WulfrumAxe.cs +++ b/Items/Tools/WulfrumAxe.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Tools { item.damage = 5; item.melee = true; - item.width = 62; - item.height = 58; + item.width = 30; + item.height = 38; item.useTime = 26; item.useAnimation = 26; item.useTurn = true; diff --git a/Items/Tools/WulfrumAxe.png b/Items/Tools/WulfrumAxe.png index edac3515c0..7bd72fbc30 100644 Binary files a/Items/Tools/WulfrumAxe.png and b/Items/Tools/WulfrumAxe.png differ diff --git a/Items/Tools/WulfrumHammer.cs b/Items/Tools/WulfrumHammer.cs index c4643b22ca..57a0d6a014 100644 --- a/Items/Tools/WulfrumHammer.cs +++ b/Items/Tools/WulfrumHammer.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Tools { item.damage = 7; item.melee = true; - item.width = 56; - item.height = 56; + item.width = 28; + item.height = 38; item.useTime = 29; item.useAnimation = 29; item.useTurn = true; diff --git a/Items/Tools/WulfrumHammer.png b/Items/Tools/WulfrumHammer.png index 030ee2396b..05741786eb 100644 Binary files a/Items/Tools/WulfrumHammer.png and b/Items/Tools/WulfrumHammer.png differ diff --git a/Items/Tools/WulfrumPickaxe.cs b/Items/Tools/WulfrumPickaxe.cs index 7c5faf290a..0d8c6a3592 100644 --- a/Items/Tools/WulfrumPickaxe.cs +++ b/Items/Tools/WulfrumPickaxe.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Tools { item.damage = 5; item.melee = true; - item.width = 48; - item.height = 48; + item.width = 46; + item.height = 38; item.useTime = 16; item.useAnimation = 16; item.useTurn = true; diff --git a/Items/Tools/WulfrumPickaxe.png b/Items/Tools/WulfrumPickaxe.png index dcb359dd90..2dc3379335 100644 Binary files a/Items/Tools/WulfrumPickaxe.png and b/Items/Tools/WulfrumPickaxe.png differ diff --git a/Items/TreasureBags/LeviathanBag.cs b/Items/TreasureBags/LeviathanBag.cs index 1dc1bf6a76..72b97af33f 100644 --- a/Items/TreasureBags/LeviathanBag.cs +++ b/Items/TreasureBags/LeviathanBag.cs @@ -33,10 +33,7 @@ namespace CalamityMod.Items.TreasureBags item.expert = true; } - public override bool CanRightClick() - { - return true; - } + public override bool CanRightClick() => true; public override void PostUpdate() => CalamityUtils.ForceItemIntoWorld(item); @@ -63,6 +60,7 @@ namespace CalamityMod.Items.TreasureBags // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); + DropHelper.DropItemChance(player, ModContent.ItemType(), 7); // Fishing DropHelper.DropItemChance(player, ItemID.HotlineFishingHook, 10); diff --git a/Items/TreasureBags/LeviathanBag.png b/Items/TreasureBags/LeviathanBag.png index 2928778427..23539eab22 100644 Binary files a/Items/TreasureBags/LeviathanBag.png and b/Items/TreasureBags/LeviathanBag.png differ diff --git a/Items/Weapons/Magic/Atlantis.png b/Items/Weapons/Magic/Atlantis.png index bb16c85109..327b9e0d5c 100644 Binary files a/Items/Weapons/Magic/Atlantis.png and b/Items/Weapons/Magic/Atlantis.png differ diff --git a/Items/Weapons/Magic/BrimroseStaff.png b/Items/Weapons/Magic/BrimroseStaff.png index e6c093ff69..7436cd0e66 100644 Binary files a/Items/Weapons/Magic/BrimroseStaff.png and b/Items/Weapons/Magic/BrimroseStaff.png differ diff --git a/Items/Weapons/Magic/BurningSea.png b/Items/Weapons/Magic/BurningSea.png index 0107454fa0..da9ceb00f5 100644 Binary files a/Items/Weapons/Magic/BurningSea.png and b/Items/Weapons/Magic/BurningSea.png differ diff --git a/Items/Weapons/Magic/SirensSong.png b/Items/Weapons/Magic/SirensSong.png index 5c53c88263..566bc3ee4c 100644 Binary files a/Items/Weapons/Magic/SirensSong.png and b/Items/Weapons/Magic/SirensSong.png differ diff --git a/Items/Weapons/Magic/TomeofFates.png b/Items/Weapons/Magic/TomeofFates.png index d33492dbf1..9ca9f148d3 100644 Binary files a/Items/Weapons/Magic/TomeofFates.png and b/Items/Weapons/Magic/TomeofFates.png differ diff --git a/Items/Weapons/Magic/WulfrumStaff.cs b/Items/Weapons/Magic/WulfrumStaff.cs index 9341c3853b..8f9810e226 100644 --- a/Items/Weapons/Magic/WulfrumStaff.cs +++ b/Items/Weapons/Magic/WulfrumStaff.cs @@ -7,47 +7,46 @@ using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Magic { - public class WulfrumStaff : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Wulfrum Staff"); - Tooltip.SetDefault("Casts a wulfrum bolt"); - Item.staff[item.type] = true; - } + public class WulfrumStaff : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wulfrum Staff"); + Tooltip.SetDefault("Casts a wulfrum bolt"); + //Item.staff[item.type] = true; + } - public override void SetDefaults() - { - item.damage = 12; - item.magic = true; - item.mana = 4; - item.width = 44; - item.height = 46; - item.useTime = 20; - item.useAnimation = 20; - item.useStyle = ItemUseStyleID.HoldingOut; - item.noMelee = true; - item.knockBack = 3; - item.value = Item.buyPrice(0, 1, 0, 0); - item.rare = 1; - item.UseSound = SoundID.Item43; - item.autoReuse = true; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 9f; - } + public override void SetDefaults() + { + item.damage = 12; + item.magic = true; + item.mana = 4; + item.width = 44; + item.height = 46; + item.useTime = 20; + item.useAnimation = 20; + item.useStyle = ItemUseStyleID.HoldingOut; + item.noMelee = true; + item.knockBack = 3; + item.value = Item.buyPrice(0, 1, 0, 0); + item.rare = 1; + item.UseSound = SoundID.Item43; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 9f; + } - public override Vector2? HoldoutOrigin() - { - return new Vector2(10, 25); - } + //public override Vector2? HoldoutOrigin() => new Vector2(8, 15); - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 12); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override Vector2? HoldoutOffset() => new Vector2(-3, 0); + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } diff --git a/Items/Weapons/Magic/WulfrumStaff.png b/Items/Weapons/Magic/WulfrumStaff.png index 6c20e25a5c..bd38ecf2cd 100644 Binary files a/Items/Weapons/Magic/WulfrumStaff.png and b/Items/Weapons/Magic/WulfrumStaff.png differ diff --git a/Items/Weapons/Melee/BallOFugu.png b/Items/Weapons/Melee/BallOFugu.png index 8325b126c6..b3a2e690c6 100644 Binary files a/Items/Weapons/Melee/BallOFugu.png and b/Items/Weapons/Melee/BallOFugu.png differ diff --git a/Items/Weapons/Melee/Brimlash.cs b/Items/Weapons/Melee/Brimlash.cs index 161eb295ad..7f1a6bcc4b 100644 --- a/Items/Weapons/Melee/Brimlash.cs +++ b/Items/Weapons/Melee/Brimlash.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 50; + item.width = item.height = 54; item.damage = 64; item.melee = true; item.useAnimation = 25; @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 6f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 50; item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 7; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/Brimlash.png b/Items/Weapons/Melee/Brimlash.png index f3544237e5..d05b7ca683 100644 Binary files a/Items/Weapons/Melee/Brimlash.png and b/Items/Weapons/Melee/Brimlash.png differ diff --git a/Items/Weapons/Melee/BrimlashBuster.cs b/Items/Weapons/Melee/BrimlashBuster.cs index f576976d36..9f9b0afda6 100644 --- a/Items/Weapons/Melee/BrimlashBuster.cs +++ b/Items/Weapons/Melee/BrimlashBuster.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 68; + item.width = item.height = 72; item.damage = 100; item.melee = true; item.useAnimation = 25; @@ -30,7 +30,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 68; item.value = Item.buyPrice(0, 95, 0, 0); item.rare = 9; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/BrimlashBuster.png b/Items/Weapons/Melee/BrimlashBuster.png index 946e98b5da..c2440eeb9f 100644 Binary files a/Items/Weapons/Melee/BrimlashBuster.png and b/Items/Weapons/Melee/BrimlashBuster.png differ diff --git a/Items/Weapons/Melee/EmpyreanKnives.cs b/Items/Weapons/Melee/EmpyreanKnives.cs index d2b4690363..5e65ceb85b 100644 --- a/Items/Weapons/Melee/EmpyreanKnives.cs +++ b/Items/Weapons/Melee/EmpyreanKnives.cs @@ -1,5 +1,5 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Hybrid; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -105,7 +105,7 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddIngredient(ItemID.VampireKnives); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 999); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index d2b8c3c049..05d1284942 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Items.Weapons.Melee { item.damage = 95; item.melee = true; - item.width = 60; - item.height = 60; + item.width = 62; + item.height = 62; item.useTime = 24; item.useAnimation = 24; item.useTurn = true; diff --git a/Items/Weapons/Melee/Greentide.png b/Items/Weapons/Melee/Greentide.png index a3af9daf60..9ec5b48535 100644 Binary files a/Items/Weapons/Melee/Greentide.png and b/Items/Weapons/Melee/Greentide.png differ diff --git a/Items/Weapons/Melee/KelvinCatalystMelee.png b/Items/Weapons/Melee/KelvinCatalystMelee.png index 1d6c440160..86a074d801 100644 Binary files a/Items/Weapons/Melee/KelvinCatalystMelee.png and b/Items/Weapons/Melee/KelvinCatalystMelee.png differ diff --git a/Items/Weapons/Melee/ProfanedSword.cs b/Items/Weapons/Melee/ProfanedSword.cs index 6ed2429af9..aceefd4f42 100644 --- a/Items/Weapons/Melee/ProfanedSword.cs +++ b/Items/Weapons/Melee/ProfanedSword.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.damage = 75; item.melee = true; - item.width = 42; - item.height = 50; + item.width = item.height = 52; item.useTime = 23; item.useAnimation = 23; item.useTurn = true; diff --git a/Items/Weapons/Melee/ProfanedSword.png b/Items/Weapons/Melee/ProfanedSword.png index 41758d95bf..36dfb30fbe 100644 Binary files a/Items/Weapons/Melee/ProfanedSword.png and b/Items/Weapons/Melee/ProfanedSword.png differ diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index 8f60a38641..78b2011564 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee { float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.5), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.5), knockBack, player.whoAmI, 0f, 0f); } return false; } @@ -52,7 +52,6 @@ namespace CalamityMod.Items.Weapons.Melee 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()); @@ -62,7 +61,6 @@ namespace CalamityMod.Items.Weapons.Melee recipe.SetResult(this); recipe.AddRecipe(); recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); diff --git a/Items/Weapons/Melee/WulfrumBlade.cs b/Items/Weapons/Melee/WulfrumBlade.cs index 7dbf7198ae..34b3bbbbb0 100644 --- a/Items/Weapons/Melee/WulfrumBlade.cs +++ b/Items/Weapons/Melee/WulfrumBlade.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,7 +15,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 46; + item.width = 32; + item.height = 46; item.damage = 12; item.melee = true; item.useAnimation = 20; @@ -24,11 +26,15 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 3.75f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 54; item.value = Item.buyPrice(0, 1, 0, 0); item.rare = 1; } + public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) + { + hitbox = CalamityUtils.FixSwingHitbox(39, 39); + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Melee/WulfrumBlade.png b/Items/Weapons/Melee/WulfrumBlade.png index d607dcf424..121c4cfe6e 100644 Binary files a/Items/Weapons/Melee/WulfrumBlade.png and b/Items/Weapons/Melee/WulfrumBlade.png differ diff --git a/Items/Weapons/Melee/XerocsGreatsword.cs b/Items/Weapons/Melee/XerocsGreatsword.cs index 07a2e2b818..364fa0609a 100644 --- a/Items/Weapons/Melee/XerocsGreatsword.cs +++ b/Items/Weapons/Melee/XerocsGreatsword.cs @@ -11,13 +11,14 @@ namespace CalamityMod.Items.Weapons.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Xeroc Greatsword"); + DisplayName.SetDefault("Entropic Claymore"); Tooltip.SetDefault("Fires a spread of homing plasma balls"); } public override void SetDefaults() { - item.width = 66; + item.width = 130; + item.height = 106; item.damage = 90; item.melee = true; item.useAnimation = 26; @@ -27,13 +28,17 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 5.25f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 66; item.value = Item.buyPrice(0, 95, 0, 0); item.rare = 9; - item.shoot = ModContent.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; } + public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) + { + hitbox = CalamityUtils.FixSwingHitbox(118, 118); + } + 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 num6 = Main.rand.Next(4, 6); @@ -41,7 +46,24 @@ namespace CalamityMod.Items.Weapons.Melee { float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f); + float damageMult = 0.5f; + switch (index) + { + case 0: + type = ModContent.ProjectileType(); + break; + case 1: + type = ModContent.ProjectileType(); + damageMult = 0.65f; + break; + case 2: + type = ModContent.ProjectileType(); + damageMult = 0.8f; + break; + default: + break; + } + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * damageMult), knockBack, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Melee/XerocsGreatsword.png b/Items/Weapons/Melee/XerocsGreatsword.png index 48fe75ebe6..ce89466c6c 100644 Binary files a/Items/Weapons/Melee/XerocsGreatsword.png and b/Items/Weapons/Melee/XerocsGreatsword.png differ diff --git a/Items/Weapons/Ranged/Archerfish.png b/Items/Weapons/Ranged/Archerfish.png index ad368e2088..55448257d1 100644 Binary files a/Items/Weapons/Ranged/Archerfish.png and b/Items/Weapons/Ranged/Archerfish.png differ diff --git a/Items/Weapons/Ranged/BrimstoneFury.png b/Items/Weapons/Ranged/BrimstoneFury.png index 058b9539c3..fff257b092 100644 Binary files a/Items/Weapons/Ranged/BrimstoneFury.png and b/Items/Weapons/Ranged/BrimstoneFury.png differ diff --git a/Items/Weapons/Ranged/Leviatitan.png b/Items/Weapons/Ranged/Leviatitan.png index 89fe64b156..4b56fc017d 100644 Binary files a/Items/Weapons/Ranged/Leviatitan.png and b/Items/Weapons/Ranged/Leviatitan.png differ diff --git a/Items/Weapons/Ranged/TheEmpyrean.cs b/Items/Weapons/Ranged/TheEmpyrean.cs index 0df599984b..e0221afb11 100644 --- a/Items/Weapons/Ranged/TheEmpyrean.cs +++ b/Items/Weapons/Ranged/TheEmpyrean.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public override void SetStaticDefaults() { - DisplayName.SetDefault("The Empyrean"); + DisplayName.SetDefault("God's Bellows"); Tooltip.SetDefault("70% chance to not consume gel"); } diff --git a/Items/Weapons/Ranged/TheEmpyrean.png b/Items/Weapons/Ranged/TheEmpyrean.png index 78910571a1..87df93208a 100644 Binary files a/Items/Weapons/Ranged/TheEmpyrean.png and b/Items/Weapons/Ranged/TheEmpyrean.png differ diff --git a/Items/Weapons/Ranged/WulfrumBow.cs b/Items/Weapons/Ranged/WulfrumBow.cs index 6462f3e949..0e94240971 100644 --- a/Items/Weapons/Ranged/WulfrumBow.cs +++ b/Items/Weapons/Ranged/WulfrumBow.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Ranged { item.damage = 10; item.ranged = true; - item.width = 34; - item.height = 56; + item.width = 27; + item.height = 38; item.useTime = 25; item.useAnimation = 25; item.useStyle = ItemUseStyleID.HoldingOut; diff --git a/Items/Weapons/Ranged/WulfrumBow.png b/Items/Weapons/Ranged/WulfrumBow.png index 3cf54d70b3..ad309cc5e0 100644 Binary files a/Items/Weapons/Ranged/WulfrumBow.png and b/Items/Weapons/Ranged/WulfrumBow.png differ diff --git a/Items/Weapons/Rogue/BrackishFlask.png b/Items/Weapons/Rogue/BrackishFlask.png index c0101e465c..0e5ad78a57 100644 Binary files a/Items/Weapons/Rogue/BrackishFlask.png and b/Items/Weapons/Rogue/BrackishFlask.png differ diff --git a/Items/Weapons/Rogue/Brimblade.png b/Items/Weapons/Rogue/Brimblade.png index d7de00d24b..0d93160ef8 100644 Binary files a/Items/Weapons/Rogue/Brimblade.png and b/Items/Weapons/Rogue/Brimblade.png differ diff --git a/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs b/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs index 9a3ad6e804..518361349f 100644 --- a/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs +++ b/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Projectiles.Hybrid; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -106,7 +105,7 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.AddIngredient(ItemID.VampireKnives); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 999); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Rogue/KelvinCatalyst.png b/Items/Weapons/Rogue/KelvinCatalyst.png index 1d6c440160..86a074d801 100644 Binary files a/Items/Weapons/Rogue/KelvinCatalyst.png and b/Items/Weapons/Rogue/KelvinCatalyst.png differ diff --git a/Items/Weapons/Rogue/Lionfish.png b/Items/Weapons/Rogue/Lionfish.png index 56025eca70..e97c12862e 100644 Binary files a/Items/Weapons/Rogue/Lionfish.png and b/Items/Weapons/Rogue/Lionfish.png differ diff --git a/Items/Weapons/Rogue/RogueWeapon.cs b/Items/Weapons/Rogue/RogueWeapon.cs index 13f3d07d1d..2b3318cd0d 100644 --- a/Items/Weapons/Rogue/RogueWeapon.cs +++ b/Items/Weapons/Rogue/RogueWeapon.cs @@ -92,6 +92,8 @@ namespace CalamityMod.Items.Weapons.Rogue rogueAS -= 0.2f; if (player.Calamity().gloveOfRecklessness) rogueAS += 0.2f; + if (player.Calamity().titanHeartMantle) + rogueAS -= 0.2f; return rogueAS; } @@ -135,6 +137,11 @@ namespace CalamityMod.Items.Weapons.Rogue if (Main.rand.Next(1, 101) > 50) return false; } + if (player.Calamity().throwingAmmoCost55) + { + if (Main.rand.Next(1, 101) > 55) + return false; + } if (player.Calamity().throwingAmmoCost66) { if (Main.rand.Next(1, 101) > 66) diff --git a/Items/Weapons/Rogue/StarofDestruction.cs b/Items/Weapons/Rogue/StarofDestruction.cs index 98ac50f628..7187589b87 100644 --- a/Items/Weapons/Rogue/StarofDestruction.cs +++ b/Items/Weapons/Rogue/StarofDestruction.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.width = 86; + item.width = item.height = 94; item.damage = 175; item.noMelee = true; item.noUseGraphic = true; @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 10f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 86; item.value = Item.buyPrice(0, 95, 0, 0); item.rare = 9; item.shoot = ModContent.ProjectileType(); @@ -52,7 +51,6 @@ namespace CalamityMod.Items.Weapons.Rogue { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 30); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Rogue/StarofDestruction.png b/Items/Weapons/Rogue/StarofDestruction.png index 732056dac4..46c3428789 100644 Binary files a/Items/Weapons/Rogue/StarofDestruction.png and b/Items/Weapons/Rogue/StarofDestruction.png differ diff --git a/Items/Weapons/Rogue/WulfrumKnife.png b/Items/Weapons/Rogue/WulfrumKnife.png index aab1bf448c..94ca6dcea6 100644 Binary files a/Items/Weapons/Rogue/WulfrumKnife.png and b/Items/Weapons/Rogue/WulfrumKnife.png differ diff --git a/Items/Weapons/Rogue/XerocPitchfork.png b/Items/Weapons/Rogue/XerocPitchfork.png index 6b1f401a25..37d3d40f62 100644 Binary files a/Items/Weapons/Rogue/XerocPitchfork.png and b/Items/Weapons/Rogue/XerocPitchfork.png differ diff --git a/Items/Weapons/Summon/HerringStaff.cs b/Items/Weapons/Summon/HerringStaff.cs index 82985b8340..70bc426e7c 100644 --- a/Items/Weapons/Summon/HerringStaff.cs +++ b/Items/Weapons/Summon/HerringStaff.cs @@ -19,8 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon { item.damage = 20; item.mana = 10; - item.width = 46; - item.height = 46; + item.width = item.height = 48; item.useTime = item.useAnimation = 30; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; diff --git a/Items/Weapons/Summon/HerringStaff.png b/Items/Weapons/Summon/HerringStaff.png index 00bcdf2e28..4668f74cf8 100644 Binary files a/Items/Weapons/Summon/HerringStaff.png and b/Items/Weapons/Summon/HerringStaff.png differ diff --git a/Items/Weapons/Summon/WulfrumController.png b/Items/Weapons/Summon/WulfrumController.png index c419f9b6ac..7222b843e5 100644 Binary files a/Items/Weapons/Summon/WulfrumController.png and b/Items/Weapons/Summon/WulfrumController.png differ diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index ce8c8f0e40..67f601ec44 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -635,8 +635,10 @@ namespace CalamityMod.NPCs.Astral int minStardust = Main.expertMode ? 7 : 6; int maxStardust = Main.expertMode ? 9 : 8; DropHelper.DropItem(npc, ModContent.ItemType(), minStardust, maxStardust); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, 7, 1, 1); + DropHelper.DropItem(npc, ModContent.ItemType()); + //not guarantee to prevent inventory spam + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, 7, 1, 1); } } } diff --git a/NPCs/Calamitas/LifeSeeker.cs b/NPCs/Calamitas/LifeSeeker.cs index d12cc4334e..bcdc08d81c 100644 --- a/NPCs/Calamitas/LifeSeeker.cs +++ b/NPCs/Calamitas/LifeSeeker.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.Calamitas public override void SetStaticDefaults() { DisplayName.SetDefault("Life Seeker"); - Main.npcFrameCount[npc.type] = 2; + Main.npcFrameCount[npc.type] = 6; NPCID.Sets.TrailingMode[npc.type] = 1; } @@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.Calamitas npc.aiStyle = 5; aiType = NPCID.Probe; npc.knockBackResist = CalamityWorld.bossRushActive ? 0f : 0.25f; - animationType = NPCID.DemonEye; npc.noGravity = true; npc.noTileCollide = true; npc.canGhostHeal = false; @@ -40,14 +39,22 @@ namespace CalamityMod.NPCs.Calamitas npc.buffImmune[BuffID.OnFire] = true; } + public override void FindFrame(int frameHeight) + { + npc.frameCounter += 0.15f; + npc.frameCounter %= Main.npcFrameCount[npc.type]; + int frame = (int)npc.frameCounter; + npc.frame.Y = frame * frameHeight; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = Main.npcTexture[npc.type]; - Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[npc.type] / 2)); Color color36 = Color.White; float amount9 = 0.5f; int num153 = 5; @@ -61,18 +68,18 @@ namespace CalamityMod.NPCs.Calamitas color38 = npc.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; - vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; + vector41 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } Vector2 vector43 = npc.Center - Main.screenPosition; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; + vector43 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); - texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/LifeSeekerGlow"); + texture = ModContent.GetTexture("CalamityMod/NPCs/Calamitas/LifeSeekerGlow"); Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); if (CalamityConfig.Instance.Afterimages) @@ -83,13 +90,13 @@ namespace CalamityMod.NPCs.Calamitas color41 = Color.Lerp(color41, color36, amount9); color41 *= (float)(num153 - num163) / 15f; Vector2 vector44 = npc.oldPos[num163] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition; - vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; + vector44 -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f; vector44 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture2D15, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); } } - spriteBatch.Draw(texture2D15, vector43, npc.frame, color37, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, npc.frame, color37, npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Calamitas/LifeSeeker.png b/NPCs/Calamitas/LifeSeeker.png index ced67f60ae..5dea135f9f 100644 Binary files a/NPCs/Calamitas/LifeSeeker.png and b/NPCs/Calamitas/LifeSeeker.png differ diff --git a/NPCs/Calamitas/LifeSeekerGlow.png b/NPCs/Calamitas/LifeSeekerGlow.png index 36dee76491..d15b05bd68 100644 Binary files a/NPCs/Calamitas/LifeSeekerGlow.png and b/NPCs/Calamitas/LifeSeekerGlow.png differ diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 7106bab359..debfe75091 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1683,6 +1683,7 @@ namespace CalamityMod.NPCs case NPCID.SolarDrakomireRider: case NPCID.SolarDrakomire: case NPCID.SolarCrawltipedeHead: + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 4 : 5); DropHelper.DropItemChance(npc, ItemID.FragmentSolar, Main.expertMode ? 4 : 5); break; @@ -1691,6 +1692,7 @@ namespace CalamityMod.NPCs case NPCID.VortexHornet: //Alien Hornet case NPCID.VortexHornetQueen: //Alien Queen case NPCID.VortexRifleman: //Storm Diver + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 4 : 5); DropHelper.DropItemChance(npc, ItemID.FragmentVortex, Main.expertMode ? 4 : 5); break; @@ -1698,7 +1700,7 @@ namespace CalamityMod.NPCs case NPCID.NebulaSoldier: //Predictor case NPCID.NebulaHeadcrab: //Brain Suckler case NPCID.NebulaBeast: //Evolution Beast - DropHelper.DropItemChance(npc, ModContent.ItemType(), 4, Main.expertMode ? 2 : 1, Main.expertMode ? 3 : 2); + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 4 : 5); DropHelper.DropItemChance(npc, ItemID.FragmentNebula, Main.expertMode ? 4 : 5); break; @@ -1707,6 +1709,7 @@ namespace CalamityMod.NPCs case NPCID.StardustJellyfishBig: //Flow Invader case NPCID.StardustCellBig: //Star Cell case NPCID.StardustWormHead: //Milkyway Weaver + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 4 : 5); DropHelper.DropItemChance(npc, ItemID.FragmentStardust, Main.expertMode ? 4 : 5); break; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 3cd80f7221..50ba7c0d68 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -23,20 +23,21 @@ namespace CalamityMod.NPCs.Leviathan [AutoloadBossHead] public class Leviathan : ModNPC { - private bool altTextureSwap = false; + int counter = 0; + bool initialised = false; public override void SetStaticDefaults() { DisplayName.SetDefault("The Leviathan"); - Main.npcFrameCount[npc.type] = 3; + Main.npcFrameCount[npc.type] = 6; } public override void SetDefaults() { npc.npcSlots = 20f; npc.damage = 90; - npc.width = 850; - npc.height = 450; + npc.width = 650; + npc.height = 300; npc.defense = 40; npc.DR_NERD(0.35f); npc.LifeMaxNERB(69000, 90700, 7000000); @@ -87,14 +88,16 @@ namespace CalamityMod.NPCs.Leviathan public override void SendExtraAI(BinaryWriter writer) { - writer.Write(altTextureSwap); writer.Write(npc.dontTakeDamage); + writer.Write(counter); + writer.Write(initialised); } public override void ReceiveExtraAI(BinaryReader reader) { - altTextureSwap = reader.ReadBoolean(); npc.dontTakeDamage = reader.ReadBoolean(); + counter = reader.ReadInt32(); + initialised = reader.ReadBoolean(); } public override void AI() @@ -120,23 +123,16 @@ namespace CalamityMod.NPCs.Leviathan sirenAlive = Main.npc[CalamityGlobalNPC.siren].active; } - int soundChoice = Main.rand.Next(3); int soundChoiceRage = 92; - if (soundChoice == 0) - { - soundChoice = 38; - } - else if (soundChoice == 1) - { - soundChoice = 39; - } - else - { - soundChoice = 40; - } + int soundChoice = Utils.SelectRandom(Main.rand, new int[] + { + 38, + 39, + 40 + }); if (Main.rand.NextBool(600)) { - Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, (sirenAlive && !death) ? soundChoice : soundChoiceRage); + Main.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, (sirenAlive && !death) ? soundChoice : soundChoiceRage); } if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -334,7 +330,7 @@ namespace CalamityMod.NPCs.Leviathan if (flag103 && (spawnParasea || spawnAberration)) { - Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, soundChoice); + Main.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, soundChoice); if (Main.netMode != NetmodeID.MultiplayerClient) { int type = spawnAberration ? ModContent.NPCType() : ModContent.NPCType(); @@ -466,7 +462,7 @@ namespace CalamityMod.NPCs.Leviathan npc.velocity.X = num1045 * num1047; npc.velocity.Y = num1046 * num1047; npc.spriteDirection = npc.direction; - Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, soundChoiceRage); + Main.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, soundChoiceRage); return; } @@ -567,7 +563,7 @@ namespace CalamityMod.NPCs.Leviathan npc.position.Y = npc.position.Y - (float)(npc.height / 2); for (int num621 = 0; num621 < 40; num621++) { - int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { @@ -577,16 +573,17 @@ namespace CalamityMod.NPCs.Leviathan } for (int num623 = 0; num623 < 70; num623++) { - int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Blood, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Blood, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } float randomSpread = (float)(Main.rand.Next(-200, 200) / 100); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/Leviathangib1"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/Leviathangib2"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/Leviathangib3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/LeviathanGores/LeviGore"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/LeviathanGores/LeviGore2"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/LeviathanGores/LeviGore3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/LeviathanGores/LeviGore4"), 1f); } } @@ -598,6 +595,9 @@ namespace CalamityMod.NPCs.Leviathan // The Leviathan runs the same loot code as Anahita, but only if she dies last. public override void NPCLoot() { + //Trophy dropped regardless of Anahita, precedent of Twins + DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); + if (!NPC.AnyNPCs(ModContent.NPCType())) DropSirenLeviLoot(npc); } @@ -607,7 +607,6 @@ namespace CalamityMod.NPCs.Leviathan { DropHelper.DropBags(npc); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedLeviathan); DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedLeviathan); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedLeviathan, 4, 2, 1); @@ -628,6 +627,7 @@ namespace CalamityMod.NPCs.Leviathan // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); // Fishing DropHelper.DropItemChance(npc, ItemID.HotlineFishingHook, 10); @@ -656,46 +656,60 @@ namespace CalamityMod.NPCs.Leviathan public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { Texture2D texture = Main.npcTexture[npc.type]; - Texture2D texture2 = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanTexTwo"); - Texture2D texture3 = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanAltTexOne"); - Texture2D texture4 = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanAltTexTwo"); if (npc.ai[0] == 1f) { - if (!altTextureSwap) - { - CalamityMod.DrawTexture(spriteBatch, texture, 0, npc, drawColor, true); - } - else - { - CalamityMod.DrawTexture(spriteBatch, texture2, 0, npc, drawColor, true); - } + texture = Main.npcTexture[npc.type]; } else { - if (!altTextureSwap) - { - CalamityMod.DrawTexture(spriteBatch, texture3, 0, npc, drawColor, true); - } - else - { - CalamityMod.DrawTexture(spriteBatch, texture4, 0, npc, drawColor, true); - } + texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/LeviathanAttack"); } + int verticalFrameCount = 3; + int horizontalFrameCount = 2; + int height = texture.Height / verticalFrameCount; + int width = texture.Width / horizontalFrameCount; + SpriteEffects spriteEffects = SpriteEffects.FlipHorizontally; + if (npc.spriteDirection == -1) + spriteEffects = SpriteEffects.None; + Main.spriteBatch.Draw(texture, npc.Center - Main.screenPosition + new Vector2(0f, npc.gfxOffY), npc.frame, npc.GetAlpha(drawColor), npc.rotation, new Vector2((float)width / 2f, (float)height / 2f), npc.scale, spriteEffects, 0f); return false; } public override void FindFrame(int frameHeight) { - npc.frameCounter += 1.0; - if (npc.frameCounter > 6.0) + Texture2D texture = Main.npcTexture[npc.type]; + int verticalFrameCount = 3; + int horizontalFrameCount = 2; + int height = texture.Height / verticalFrameCount; + int width = texture.Width / horizontalFrameCount; + int timeBetweenFrames = 8; + + if (!initialised) { - npc.frame.Y = npc.frame.Y + frameHeight; - npc.frameCounter = 0.0; + counter = verticalFrameCount; + npc.frameCounter = timeBetweenFrames; + initialised = true; } - if (npc.frame.Y >= frameHeight * 3) + + //ensure width and height are set. + npc.frame.Width = width; + npc.frame.Height = height; + npc.frameCounter++; + if (npc.frameCounter >= timeBetweenFrames) { + npc.frame.X = counter >= verticalFrameCount ? width + 3 : 0; + if (counter == verticalFrameCount) + npc.frame.Y = 0; + else + npc.frame.Y += height; + npc.frameCounter = 0; + counter++; + } + if (counter == Main.npcFrameCount[npc.type]) + { + counter = 1; npc.frame.Y = 0; - altTextureSwap = !altTextureSwap; + npc.frame.X = 0; } } diff --git a/NPCs/Leviathan/Leviathan.png b/NPCs/Leviathan/Leviathan.png index 5bd4cf58e8..6bd923b971 100644 Binary files a/NPCs/Leviathan/Leviathan.png and b/NPCs/Leviathan/Leviathan.png differ diff --git a/NPCs/Leviathan/LeviathanAltTexOne.png b/NPCs/Leviathan/LeviathanAltTexOne.png deleted file mode 100644 index 9f98f74ae9..0000000000 Binary files a/NPCs/Leviathan/LeviathanAltTexOne.png and /dev/null differ diff --git a/NPCs/Leviathan/LeviathanAltTexTwo.png b/NPCs/Leviathan/LeviathanAltTexTwo.png deleted file mode 100644 index 1c8019853c..0000000000 Binary files a/NPCs/Leviathan/LeviathanAltTexTwo.png and /dev/null differ diff --git a/NPCs/Leviathan/LeviathanAttack.png b/NPCs/Leviathan/LeviathanAttack.png new file mode 100644 index 0000000000..650e015b7a Binary files /dev/null and b/NPCs/Leviathan/LeviathanAttack.png differ diff --git a/NPCs/Leviathan/LeviathanOpenMouth_UNUSED.png b/NPCs/Leviathan/LeviathanOpenMouth_UNUSED.png new file mode 100644 index 0000000000..34c3c55b6a Binary files /dev/null and b/NPCs/Leviathan/LeviathanOpenMouth_UNUSED.png differ diff --git a/NPCs/Leviathan/LeviathanTexTwo.png b/NPCs/Leviathan/LeviathanTexTwo.png deleted file mode 100644 index 23779c9d83..0000000000 Binary files a/NPCs/Leviathan/LeviathanTexTwo.png and /dev/null differ diff --git a/NPCs/Leviathan/Leviathan_Head_Boss.png b/NPCs/Leviathan/Leviathan_Head_Boss.png index f8b1338143..640bfa01d0 100644 Binary files a/NPCs/Leviathan/Leviathan_Head_Boss.png and b/NPCs/Leviathan/Leviathan_Head_Boss.png differ diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index a2ef7193da..c6253fab8e 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -19,6 +20,9 @@ namespace CalamityMod.NPCs.Leviathan private bool secondClone = false; private bool forceChargeFrames = false; private int frameUsed = 0; + private static Texture2D sirenStabTexture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenStabbing"); + + //IMPORTANT: Do NOT remove the empty space on the sprites. This is intentional for framing. The sprite is centered and hitbox is fine already. public override void SetStaticDefaults() { @@ -106,7 +110,7 @@ namespace CalamityMod.NPCs.Leviathan CalamityGlobalNPC.siren = npc.whoAmI; // Light - Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0f, 0.5f, 0.3f); + Lighting.AddLight((int)(npc.Center.X / 16f), (int)(npc.Center.Y / 16f), 0f, 0.5f, 0.3f); // Target if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -703,12 +707,12 @@ namespace CalamityMod.NPCs.Leviathan if (num22 != 0) { if (npc.ai[1] == 0f && num22 != npc.direction) - npc.rotation += 3.14159274f; + npc.rotation += MathHelper.Pi; npc.direction = num22; if (npc.spriteDirection != -npc.direction) - npc.rotation += 3.14159274f; + npc.rotation += MathHelper.Pi; npc.spriteDirection = -npc.direction; } @@ -717,123 +721,62 @@ namespace CalamityMod.NPCs.Leviathan public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 3; k++) - Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(npc.position, npc.width, npc.height, 187, hitDirection, -1f, 0, default, 1f); if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren2"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren3"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren4"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren5"), 1f); - for (int k = 0; k < 50; k++) - Dust.NewDust(npc.position, npc.width, npc.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(npc.position, npc.width, npc.height, 187, hitDirection, -1f, 0, default, 1f); } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) // 2 total states (ice shield or no ice shield) + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { Texture2D texture = Main.npcTexture[npc.type]; - if (npc.dontTakeDamage) - { - switch (frameUsed) - { - case 0: - texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenAlt"); - break; - case 1: - texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenAltSinging"); - break; - case 2: - texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenAltStabbing"); - break; - } - } - else - { - switch (frameUsed) - { - case 0: - texture = Main.npcTexture[npc.type]; - break; - case 1: - texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenSinging"); - break; - case 2: - texture = ModContent.GetTexture("CalamityMod/NPCs/Leviathan/SirenStabbing"); - break; - } - } + switch (frameUsed) + { + case 0: + texture = Main.npcTexture[npc.type]; + break; + case 1: + texture = sirenStabTexture; + break; + } - SpriteEffects spriteEffects = SpriteEffects.None; - if (npc.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - if (npc.ai[0] > 2f || forceChargeFrames) - { - int width = 106; - Vector2 vector = new Vector2((float)(width / 2), (float)(texture.Height / Main.npcFrameCount[npc.type] / 2)); - Rectangle frame = new Rectangle(0, 0, width, texture.Height / Main.npcFrameCount[npc.type]); - frame.Y = 146 * (int)(npc.frameCounter / 12.0); // 1 to 6 - if (frame.Y >= 146 * 6 || npc.ai[0] == 4f) - frame.Y = 0; - - Main.spriteBatch.Draw(texture, - new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + vector.X * npc.scale, - npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)texture.Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector.Y * npc.scale + 0f + npc.gfxOffY), - new Microsoft.Xna.Framework.Rectangle?(frame), - npc.GetAlpha(drawColor), - npc.rotation, - vector, - npc.scale, - spriteEffects, - 0f); - return false; - } - - Rectangle frame2 = npc.frame; - Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); - Main.spriteBatch.Draw(texture, - new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * npc.scale / 2f + vector11.X * npc.scale, - npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + 0f + npc.gfxOffY), - new Microsoft.Xna.Framework.Rectangle?(frame2), - npc.GetAlpha(drawColor), - npc.rotation, - vector11, - npc.scale, - spriteEffects, - 0f); + bool charging = npc.ai[0] > 2f || forceChargeFrames; + int height = texture.Height / Main.npcFrameCount[npc.type]; + int width = texture.Width; + SpriteEffects spriteEffects = charging ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + if (npc.spriteDirection == -1) + spriteEffects = charging ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Main.spriteBatch.Draw(texture, npc.Center - Main.screenPosition + new Vector2(0f, npc.gfxOffY), npc.frame, npc.GetAlpha(drawColor), npc.rotation, new Vector2((float)width / 2f, (float)height / 2f), npc.scale, spriteEffects, 0f); return false; } - public override void FindFrame(int frameHeight) // 6 total frames, 3 total texture types + public override void FindFrame(int frameHeight) { - if (forceChargeFrames) - frameUsed = 2; - else if (npc.ai[0] == 2f) - frameUsed = 0; - else if (npc.ai[0] <= 1f) + Texture2D texture = Main.npcTexture[npc.type]; + if (npc.ai[0] > 2f || forceChargeFrames) + { frameUsed = 1; + } else - frameUsed = 2; + { + frameUsed = 0; + } + int frameY = texture.Height / Main.npcFrameCount[npc.type]; + int timeBetweenFrames = 8; - npc.frameCounter += 1.0; - if (npc.ai[0] == 3f || forceChargeFrames) - { - if (npc.frameCounter > 72.0) - npc.frameCounter = 0.0; - } - else if (npc.ai[0] != 4f) - { - int frameY = 146; - if (npc.frameCounter > 72.0) - npc.frameCounter = 0.0; + npc.frameCounter++; + if (npc.frameCounter > timeBetweenFrames * Main.npcFrameCount[npc.type]) + npc.frameCounter = 0; - npc.frame.Y = frameY * (int)(npc.frameCounter / 12.0); - if (npc.frame.Y >= frameHeight * 6) - npc.frame.Y = 0; - } + npc.frame.Y = frameY * (int)(npc.frameCounter / timeBetweenFrames); + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = 0; + + //100x1140 + //200x636 } public override void BossLoot(ref string name, ref int potionType) @@ -844,6 +787,9 @@ namespace CalamityMod.NPCs.Leviathan // Anahita runs the same loot code as the Leviathan, but only if she dies last. public override void NPCLoot() { + //Trophy dropped regardless of Levi, precedent of Twins + DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); + if (!NPC.AnyNPCs(ModContent.NPCType())) Leviathan.DropSirenLeviLoot(npc); } diff --git a/NPCs/Leviathan/Siren.png b/NPCs/Leviathan/Siren.png index 56d3a69d45..4be01908da 100644 Binary files a/NPCs/Leviathan/Siren.png and b/NPCs/Leviathan/Siren.png differ diff --git a/NPCs/Leviathan/SirenAlt.png b/NPCs/Leviathan/SirenAlt.png deleted file mode 100644 index 793607a326..0000000000 Binary files a/NPCs/Leviathan/SirenAlt.png and /dev/null differ diff --git a/NPCs/Leviathan/SirenAltSinging.png b/NPCs/Leviathan/SirenAltSinging.png deleted file mode 100644 index 365c439126..0000000000 Binary files a/NPCs/Leviathan/SirenAltSinging.png and /dev/null differ diff --git a/NPCs/Leviathan/SirenAltStabbing.png b/NPCs/Leviathan/SirenAltStabbing.png deleted file mode 100644 index cf57a094f5..0000000000 Binary files a/NPCs/Leviathan/SirenAltStabbing.png and /dev/null differ diff --git a/NPCs/Leviathan/SirenSinging.png b/NPCs/Leviathan/SirenSinging.png deleted file mode 100644 index 064adc1694..0000000000 Binary files a/NPCs/Leviathan/SirenSinging.png and /dev/null differ diff --git a/NPCs/Leviathan/SirenStabbing.png b/NPCs/Leviathan/SirenStabbing.png index 8d69d7de7b..36d13de7dc 100644 Binary files a/NPCs/Leviathan/SirenStabbing.png and b/NPCs/Leviathan/SirenStabbing.png differ diff --git a/NPCs/Leviathan/Siren_Head_Boss.png b/NPCs/Leviathan/Siren_Head_Boss.png index 6c4a70aad2..20f6e2deaf 100644 Binary files a/NPCs/Leviathan/Siren_Head_Boss.png and b/NPCs/Leviathan/Siren_Head_Boss.png differ diff --git a/NPCs/Leviathan/SirenandLevi_BossChecklist.png b/NPCs/Leviathan/SirenandLevi_BossChecklist.png index 047c54cff8..c59d4c2139 100644 Binary files a/NPCs/Leviathan/SirenandLevi_BossChecklist.png and b/NPCs/Leviathan/SirenandLevi_BossChecklist.png differ diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index 48df531d90..3fa97855bb 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -7,570 +7,568 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class ShockstormShuttle : ModNPC - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Shockstorm Shuttle"); - } + public class ShockstormShuttle : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shockstorm Shuttle"); + Main.npcFrameCount[npc.type] = 4; + } - public override void SetDefaults() - { - npc.npcSlots = 3f; - npc.damage = 30; - npc.width = 64; - npc.height = 38; - npc.defense = 15; + public override void SetDefaults() + { + npc.npcSlots = 3f; + npc.damage = 30; + npc.width = 64; + npc.height = 38; + npc.defense = 15; npc.DR_NERD(0.15f); - npc.lifeMax = 150; - npc.aiStyle = -1; - aiType = -1; - npc.knockBackResist = 0f; - npc.value = Item.buyPrice(0, 0, 5, 0); - npc.HitSound = SoundID.NPCHit4; - npc.DeathSound = SoundID.NPCDeath14; - npc.noGravity = true; - npc.noTileCollide = true; - banner = npc.type; - bannerItem = ModContent.ItemType(); - } + npc.lifeMax = 150; + npc.aiStyle = -1; + aiType = -1; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(0, 0, 5, 0); + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath14; + npc.noGravity = true; + npc.noTileCollide = true; + banner = npc.type; + bannerItem = ModContent.ItemType(); + } - public override void AI() - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[0] += (float)Main.rand.Next(4); //adds to localAI to fire projectiles at random times - if (npc.localAI[0] >= (float)Main.rand.Next(100, 120)) //rate at which projectiles are shot - { - npc.localAI[0] = 0f; - npc.TargetClosest(true); - if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - float num179 = 12f; //speed of projectile - Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; - float num181 = Math.Abs(num180) * 0.1f; - float num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y - num181; - float num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); - npc.netUpdate = true; - num183 = num179 / num183; - num180 *= num183; - num182 *= num183; - int num184 = 30; //projectile damage - if (Main.expertMode) - { - num184 = 22; - } - int num185 = ProjectileID.MartianTurretBolt; //projectile ID - if (Main.rand.NextBool(8)) - { - num185 = ProjectileID.SaucerLaser; //more powerful projectile ID - } - value9.X += num180; - value9.Y += num182; - for (int num186 = 0; num186 < 2; num186++) //shoots two projectiles by looping twice - { - num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; - num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y; - num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); - num183 = 12f / num183; - num180 += (float)Main.rand.Next(-20, 21); //projectile spreadX - num182 += (float)Main.rand.Next(-20, 21); //projectile spreadY - num180 *= num183; - num182 *= num183; - Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f); - } - } - } - } - if (npc.localAI[3] == 0f && Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[3] = 1f; - } - Vector2 center16 = npc.Center; - Player player8 = Main.player[npc.target]; - if (npc.target < 0 || npc.target == 255 || player8.dead || !player8.active) - { - npc.TargetClosest(true); - player8 = Main.player[npc.target]; - npc.netUpdate = true; - } - if ((player8.dead || Vector2.Distance(player8.Center, center16) > 3200f) && npc.ai[0] != 1f) - { - if (npc.ai[0] == 0f) - { - npc.ai[0] = -1f; - } - if (npc.ai[0] == 2f) - { - npc.ai[0] = -2f; - } - npc.netUpdate = true; - } - if (npc.ai[0] == -1f || npc.ai[0] == -2f) - { - npc.velocity.Y = npc.velocity.Y - 0.4f; - if (npc.timeLeft > 10) - { - npc.timeLeft = 10; - } - if (!player8.dead) - { - npc.timeLeft = 300; - if (npc.ai[0] == -2f) - { - npc.ai[0] = 2f; - } - if (npc.ai[0] == 0f) - { - npc.ai[0] = 0f; - } - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.netUpdate = true; - return; - } - } - else if (npc.ai[0] == 0f) - { - int num1580 = 0; - if (npc.ai[3] >= 580f) - { - num1580 = 0; - } - else if (npc.ai[3] >= 440f) - { - num1580 = 5; - } - else if (npc.ai[3] >= 420f) - { - num1580 = 4; - } - else if (npc.ai[3] >= 280f) - { - num1580 = 3; - } - else if (npc.ai[3] >= 260f) - { - num1580 = 2; - } - else if (npc.ai[3] >= 20f) - { - num1580 = 1; - } - npc.ai[3] += 1f; - if (npc.ai[3] >= 600f) - { - npc.ai[3] = 0f; - } - int num1581 = num1580; - if (npc.ai[3] >= 580f) - { - num1580 = 0; - } - else if (npc.ai[3] >= 440f) - { - num1580 = 5; - } - else if (npc.ai[3] >= 420f) - { - num1580 = 4; - } - else if (npc.ai[3] >= 280f) - { - num1580 = 3; - } - else if (npc.ai[3] >= 260f) - { - num1580 = 2; - } - else if (npc.ai[3] >= 20f) - { - num1580 = 1; - } - if (num1580 != num1581) - { - if (num1580 == 0) - { - npc.ai[2] = 0f; - } - if (num1580 == 1) - { - npc.ai[2] = (float)((Math.Sign((player8.Center - center16).X) == 1) ? 1 : -1); - } - if (num1580 == 2) - { - npc.ai[2] = 0f; - } - npc.netUpdate = true; - } - if (num1580 == 0) - { - if (npc.ai[2] == 0f) - { - npc.ai[2] = (float)(-600 * Math.Sign((center16 - player8.Center).X)); - } - Vector2 vector196 = player8.Center + new Vector2(npc.ai[2], -250f) - center16; - if (vector196.Length() < 50f) - { - npc.ai[3] = 19f; - } - else - { - vector196.Normalize(); - npc.velocity = Vector2.Lerp(npc.velocity, vector196 * 16f, 0.1f); - } - } - if (num1580 == 1) - { - int num1582 = (int)npc.Center.X / 16; - int num1583 = (int)(npc.position.Y + (float)npc.height) / 16; - int num1584 = 0; - bool flag149 = Main.tile[num1582, num1583].nactive() && Main.tileSolid[(int)Main.tile[num1582, num1583].type] && !Main.tileSolidTop[(int)Main.tile[num1582, num1583].type]; - if (flag149) - { - num1584 = 1; - } - else - { - while (num1584 < 150 && num1583 + num1584 < Main.maxTilesY) - { - int num1585 = num1583 + num1584; - bool flag150 = Main.tile[num1582, num1585].nactive() && Main.tileSolid[(int)Main.tile[num1582, num1585].type] && !Main.tileSolidTop[(int)Main.tile[num1582, num1585].type]; - if (flag150) - { - num1584--; - break; - } - num1584++; - } - } - float num1586 = (float)(num1584 * 16); - float num1587 = 250f; - if (num1586 < num1587) - { - float num1588 = -4f; - if (-num1588 > num1586) - { - num1588 = -num1586; - } - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1588, 0.05f); - } - else - { - npc.velocity.Y = npc.velocity.Y * 0.95f; - } - npc.velocity.X = 3.5f * npc.ai[2]; - } - if (num1580 == 2) - { - if (npc.ai[2] == 0f) - { - npc.ai[2] = (float)(300 * Math.Sign((center16 - player8.Center).X)); - } - Vector2 vector197 = player8.Center + new Vector2(npc.ai[2], -170f) - center16; - int num1589 = (int)npc.Center.X / 16; - int num1590 = (int)(npc.position.Y + (float)npc.height) / 16; - int num1591 = 0; - bool flag151 = Main.tile[num1589, num1590].nactive() && Main.tileSolid[(int)Main.tile[num1589, num1590].type] && !Main.tileSolidTop[(int)Main.tile[num1589, num1590].type]; - if (flag151) - { - num1591 = 1; - } - else - { - while (num1591 < 150 && num1590 + num1591 < Main.maxTilesY) - { - int num1592 = num1590 + num1591; - bool flag152 = Main.tile[num1589, num1592].nactive() && Main.tileSolid[(int)Main.tile[num1589, num1592].type] && !Main.tileSolidTop[(int)Main.tile[num1589, num1592].type]; - if (flag152) - { - num1591--; - break; - } - num1591++; - } - } - float num1593 = (float)(num1591 * 16); - float num1594 = 170f; - if (num1593 < num1594) - { - vector197.Y -= num1594 - num1593; - } - if (vector197.Length() < 70f) - { - npc.ai[3] = 279f; - } - else - { - vector197.Normalize(); - npc.velocity = Vector2.Lerp(npc.velocity, vector197 * 20f, 0.1f); - } - } - else if (num1580 == 3) - { - float num1595 = 0.85f; - int num1596 = (int)npc.Center.X / 16; - int num1597 = (int)(npc.position.Y + (float)npc.height) / 16; - int num1598 = 0; - bool flag153 = Main.tile[num1596, num1597].nactive() && Main.tileSolid[(int)Main.tile[num1596, num1597].type] && !Main.tileSolidTop[(int)Main.tile[num1596, num1597].type]; - if (flag153) - { - num1598 = 1; - } - else - { - while (num1598 < 150 && num1597 + num1598 < Main.maxTilesY) - { - int num1599 = num1597 + num1598; - bool flag154 = Main.tile[num1596, num1599].nactive() && Main.tileSolid[(int)Main.tile[num1596, num1599].type] && !Main.tileSolidTop[(int)Main.tile[num1596, num1599].type]; - if (flag154) - { - num1598--; - break; - } - num1598++; - } - } - float num1600 = (float)(num1598 * 16); - float num1601 = 170f; - if (num1600 < num1601) - { - float num1602 = -4f; - if (-num1602 > num1600) - { - num1602 = -num1600; - } - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1602, 0.05f); - } - else - { - npc.velocity.Y = npc.velocity.Y * num1595; - } - npc.velocity.X = npc.velocity.X * num1595; - } - if (num1580 == 4) - { - Vector2 vector198 = player8.Center + new Vector2(0f, -250f) - center16; - if (vector198.Length() < 50f) - { - npc.ai[3] = 439f; - return; - } - vector198.Normalize(); - npc.velocity = Vector2.Lerp(npc.velocity, vector198 * 16f, 0.1f); - return; - } - else if (num1580 == 5) - { - npc.velocity *= 0.85f; - return; - } - } - else if (npc.ai[0] == 1f) - { - npc.velocity *= 0.96f; - float num1603 = 150f; - npc.ai[1] += 1f; - if (npc.ai[1] >= num1603) - { - npc.ai[0] = 2f; - npc.ai[1] = 0f; - npc.rotation = 0f; - npc.netUpdate = true; - return; - } - if (npc.ai[1] < 40f) - { - npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 40f * 6.28318548f), default).Y * 0.2f; - return; - } - if (npc.ai[1] < 80f) - { - npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 20f * 6.28318548f), default).Y * 0.3f; - return; - } - if (npc.ai[1] < 120f) - { - npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 10f * 6.28318548f), default).Y * 0.4f; - return; - } - npc.rotation = (npc.ai[1] - 120f) / 30f * 6.28318548f; - return; - } - else if (npc.ai[0] == 2f) - { - float num1605 = 3600f; - float num1606 = 120f; - float num1607 = 60f; - int num1608 = 0; - if (npc.ai[3] % num1606 >= num1607) - { - num1608 = 1; - } - int num1609 = num1608; - num1608 = 0; - npc.ai[3] += 1f; - if (npc.ai[3] % num1606 >= num1607) - { - num1608 = 1; - } - if (num1608 != num1609) - { - if (num1608 == 1) - { - npc.ai[2] = (float)((Math.Sign((player8.Center - center16).X) == 1) ? 1 : -1); - if (Main.netMode != NetmodeID.MultiplayerClient) //second projectile being shot. Didn't use this - { - npc.localAI[0] += (float)Main.rand.Next(4); - if (npc.localAI[0] >= (float)Main.rand.Next(50, 100)) - { - npc.localAI[0] = 0f; - npc.TargetClosest(true); - if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - float num179 = 11f; - Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; - float num181 = Math.Abs(num180) * 0.1f; - float num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y - num181; - float num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); - npc.netUpdate = true; - num183 = num179 / num183; - num180 *= num183; - num182 *= num183; - int num184 = 50; - if (Main.expertMode) - { - num184 = 28; - } - if (Main.hardMode) - { - num184 = 40; - if (NPC.downedMoonlord) - { - num184 = 80; - if (Main.expertMode) - { - num184 = 45; - } - } - } - int num185 = ProjectileID.SaucerLaser; - value9.X += num180; - value9.Y += num182; - for (int num186 = 0; num186 < 2; num186++) - { - num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; - num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y; - num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); - num183 = 12f / num183; - num180 += (float)Main.rand.Next(-20, 21); - num182 += (float)Main.rand.Next(-20, 21); - num180 *= num183; - num182 *= num183; - Projectile.NewProjectile(value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f); - } - } - } - } - Main.PlaySound(SoundID.Item12, npc.position); - } - npc.netUpdate = true; - } - if (npc.ai[3] >= num1605) - { - npc.ai[0] = 2f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.netUpdate = true; - } - else if (num1608 == 0) - { - Vector2 vector199 = player8.Center + new Vector2(npc.ai[2] * 350f, -250f) - center16; - vector199.Normalize(); - npc.velocity = Vector2.Lerp(npc.velocity, vector199 * 16f, 0.1f); - } - else - { - int num1610 = (int)npc.Center.X / 16; - int num1611 = (int)(npc.position.Y + (float)npc.height) / 16; - int num1612 = 0; - bool flag155 = Main.tile[num1610, num1611].nactive() && Main.tileSolid[(int)Main.tile[num1610, num1611].type] && !Main.tileSolidTop[(int)Main.tile[num1610, num1611].type]; - if (flag155) - { - num1612 = 1; - } - else - { - while (num1612 < 150 && num1611 + num1612 < Main.maxTilesY) - { - int num1613 = num1611 + num1612; - bool flag156 = Main.tile[num1610, num1613].nactive() && Main.tileSolid[(int)Main.tile[num1610, num1613].type] && !Main.tileSolidTop[(int)Main.tile[num1610, num1613].type]; - if (flag156) - { - num1612--; - break; - } - num1612++; - } - } - float num1614 = (float)(num1612 * 16); - float num1615 = 250f; - if (num1614 < num1615) - { - float num1616 = -4f; - if (-num1616 > num1614) - { - num1616 = -num1614; - } - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1616, 0.05f); - } - else - { - npc.velocity.Y = npc.velocity.Y * 0.95f; - } - npc.velocity.X = 8f * npc.ai[2]; - } - npc.rotation = 0f; - } - } + public override void AI() + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.localAI[0] += (float)Main.rand.Next(4); //adds to localAI to fire projectiles at random times + if (npc.localAI[0] >= (float)Main.rand.Next(100, 120)) //rate at which projectiles are shot + { + npc.localAI[0] = 0f; + npc.TargetClosest(true); + if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + { + float projSpeed = 12f; //speed of projectile + Vector2 npcPos = npc.Center; + float targetX = Main.player[npc.target].Center.X - npcPos.X; + float YAdjust = Math.Abs(targetX) * 0.1f; + float targetY = Main.player[npc.target].Center.Y - npcPos.Y - YAdjust; + Vector2 velocity = new Vector2(targetX, targetY); + float targetDist = velocity.Length(); + npc.netUpdate = true; + targetDist = projSpeed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; + int projDmg = 30; //projectile damage + if (Main.expertMode) + { + projDmg = 22; + } + int projType = ProjectileID.MartianTurretBolt; //projectile ID + if (Main.rand.NextBool(8)) + { + projType = ProjectileID.SaucerLaser; //more powerful projectile ID + } + npcPos.X += velocity.X; + npcPos.Y += velocity.Y; + for (int num186 = 0; num186 < 2; num186++) //shoots two projectiles by looping twice + { + velocity = Main.player[npc.target].Center - npcPos; + targetDist = velocity.Length(); + targetDist = projSpeed / targetDist; + velocity.X += (float)Main.rand.Next(-20, 21); //projectile spreadX + velocity.Y += (float)Main.rand.Next(-20, 21); //projectile spreadY + velocity.X *= targetDist; + velocity.Y *= targetDist; + Projectile.NewProjectile(npcPos, velocity, projType, projDmg, 0f, Main.myPlayer, 0f, 0f); + } + } + } + } + if (npc.localAI[3] == 0f && Main.netMode != NetmodeID.MultiplayerClient) + { + npc.localAI[3] = 1f; + } + Vector2 center16 = npc.Center; + Player player8 = Main.player[npc.target]; + if (npc.target < 0 || npc.target == Main.maxPlayers || player8.dead || !player8.active) + { + npc.TargetClosest(true); + player8 = Main.player[npc.target]; + npc.netUpdate = true; + } + if ((player8.dead || Vector2.Distance(player8.Center, center16) > 3200f) && npc.ai[0] != 1f) + { + if (npc.ai[0] == 0f) + { + npc.ai[0] = -1f; + } + if (npc.ai[0] == 2f) + { + npc.ai[0] = -2f; + } + npc.netUpdate = true; + } + if (npc.ai[0] == -1f || npc.ai[0] == -2f) + { + npc.velocity.Y = npc.velocity.Y - 0.4f; + if (npc.timeLeft > 10) + { + npc.timeLeft = 10; + } + if (!player8.dead) + { + npc.timeLeft = 300; + if (npc.ai[0] == -2f) + { + npc.ai[0] = 2f; + } + if (npc.ai[0] == 0f) + { + npc.ai[0] = 0f; + } + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.netUpdate = true; + return; + } + } + else if (npc.ai[0] == 0f) + { + int num1580 = 0; + if (npc.ai[3] >= 580f) + { + num1580 = 0; + } + else if (npc.ai[3] >= 440f) + { + num1580 = 5; + } + else if (npc.ai[3] >= 420f) + { + num1580 = 4; + } + else if (npc.ai[3] >= 280f) + { + num1580 = 3; + } + else if (npc.ai[3] >= 260f) + { + num1580 = 2; + } + else if (npc.ai[3] >= 20f) + { + num1580 = 1; + } + npc.ai[3] += 1f; + if (npc.ai[3] >= 600f) + { + npc.ai[3] = 0f; + } + int num1581 = num1580; + if (npc.ai[3] >= 580f) + { + num1580 = 0; + } + else if (npc.ai[3] >= 440f) + { + num1580 = 5; + } + else if (npc.ai[3] >= 420f) + { + num1580 = 4; + } + else if (npc.ai[3] >= 280f) + { + num1580 = 3; + } + else if (npc.ai[3] >= 260f) + { + num1580 = 2; + } + else if (npc.ai[3] >= 20f) + { + num1580 = 1; + } + if (num1580 != num1581) + { + if (num1580 == 0) + { + npc.ai[2] = 0f; + } + if (num1580 == 1) + { + npc.ai[2] = (float)((Math.Sign((player8.Center - center16).X) == 1) ? 1 : -1); + } + if (num1580 == 2) + { + npc.ai[2] = 0f; + } + npc.netUpdate = true; + } + if (num1580 == 0) + { + if (npc.ai[2] == 0f) + { + npc.ai[2] = (float)(-600 * Math.Sign((center16 - player8.Center).X)); + } + Vector2 vector196 = player8.Center + new Vector2(npc.ai[2], -250f) - center16; + if (vector196.Length() < 50f) + { + npc.ai[3] = 19f; + } + else + { + vector196.Normalize(); + npc.velocity = Vector2.Lerp(npc.velocity, vector196 * 16f, 0.1f); + } + } + if (num1580 == 1) + { + int num1582 = (int)npc.Center.X / 16; + int num1583 = (int)(npc.position.Y + (float)npc.height) / 16; + int num1584 = 0; + bool flag149 = Main.tile[num1582, num1583].nactive() && Main.tileSolid[(int)Main.tile[num1582, num1583].type] && !Main.tileSolidTop[(int)Main.tile[num1582, num1583].type]; + if (flag149) + { + num1584 = 1; + } + else + { + while (num1584 < 150 && num1583 + num1584 < Main.maxTilesY) + { + int num1585 = num1583 + num1584; + bool flag150 = Main.tile[num1582, num1585].nactive() && Main.tileSolid[(int)Main.tile[num1582, num1585].type] && !Main.tileSolidTop[(int)Main.tile[num1582, num1585].type]; + if (flag150) + { + num1584--; + break; + } + num1584++; + } + } + float num1586 = (float)(num1584 * 16); + float num1587 = 250f; + if (num1586 < num1587) + { + float num1588 = -4f; + if (-num1588 > num1586) + { + num1588 = -num1586; + } + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1588, 0.05f); + } + else + { + npc.velocity.Y = npc.velocity.Y * 0.95f; + } + npc.velocity.X = 3.5f * npc.ai[2]; + } + if (num1580 == 2) + { + if (npc.ai[2] == 0f) + { + npc.ai[2] = (float)(300 * Math.Sign((center16 - player8.Center).X)); + } + Vector2 vector197 = player8.Center + new Vector2(npc.ai[2], -170f) - center16; + int num1589 = (int)npc.Center.X / 16; + int num1590 = (int)(npc.position.Y + (float)npc.height) / 16; + int num1591 = 0; + bool flag151 = Main.tile[num1589, num1590].nactive() && Main.tileSolid[(int)Main.tile[num1589, num1590].type] && !Main.tileSolidTop[(int)Main.tile[num1589, num1590].type]; + if (flag151) + { + num1591 = 1; + } + else + { + while (num1591 < 150 && num1590 + num1591 < Main.maxTilesY) + { + int num1592 = num1590 + num1591; + bool flag152 = Main.tile[num1589, num1592].nactive() && Main.tileSolid[(int)Main.tile[num1589, num1592].type] && !Main.tileSolidTop[(int)Main.tile[num1589, num1592].type]; + if (flag152) + { + num1591--; + break; + } + num1591++; + } + } + float num1593 = (float)(num1591 * 16); + float num1594 = 170f; + if (num1593 < num1594) + { + vector197.Y -= num1594 - num1593; + } + if (vector197.Length() < 70f) + { + npc.ai[3] = 279f; + } + else + { + vector197.Normalize(); + npc.velocity = Vector2.Lerp(npc.velocity, vector197 * 20f, 0.1f); + } + } + else if (num1580 == 3) + { + float num1595 = 0.85f; + int num1596 = (int)npc.Center.X / 16; + int num1597 = (int)(npc.position.Y + (float)npc.height) / 16; + int num1598 = 0; + bool flag153 = Main.tile[num1596, num1597].nactive() && Main.tileSolid[(int)Main.tile[num1596, num1597].type] && !Main.tileSolidTop[(int)Main.tile[num1596, num1597].type]; + if (flag153) + { + num1598 = 1; + } + else + { + while (num1598 < 150 && num1597 + num1598 < Main.maxTilesY) + { + int num1599 = num1597 + num1598; + bool flag154 = Main.tile[num1596, num1599].nactive() && Main.tileSolid[(int)Main.tile[num1596, num1599].type] && !Main.tileSolidTop[(int)Main.tile[num1596, num1599].type]; + if (flag154) + { + num1598--; + break; + } + num1598++; + } + } + float num1600 = (float)(num1598 * 16); + float num1601 = 170f; + if (num1600 < num1601) + { + float num1602 = -4f; + if (-num1602 > num1600) + { + num1602 = -num1600; + } + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1602, 0.05f); + } + else + { + npc.velocity.Y = npc.velocity.Y * num1595; + } + npc.velocity.X = npc.velocity.X * num1595; + } + if (num1580 == 4) + { + Vector2 vector198 = player8.Center + new Vector2(0f, -250f) - center16; + if (vector198.Length() < 50f) + { + npc.ai[3] = 439f; + return; + } + vector198.Normalize(); + npc.velocity = Vector2.Lerp(npc.velocity, vector198 * 16f, 0.1f); + return; + } + else if (num1580 == 5) + { + npc.velocity *= 0.85f; + return; + } + } + else if (npc.ai[0] == 1f) + { + npc.velocity *= 0.96f; + float num1603 = 150f; + npc.ai[1] += 1f; + if (npc.ai[1] >= num1603) + { + npc.ai[0] = 2f; + npc.ai[1] = 0f; + npc.rotation = 0f; + npc.netUpdate = true; + return; + } + if (npc.ai[1] < 40f) + { + npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 40f * MathHelper.TwoPi), default).Y * 0.2f; + return; + } + if (npc.ai[1] < 80f) + { + npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 20f * MathHelper.TwoPi), default).Y * 0.3f; + return; + } + if (npc.ai[1] < 120f) + { + npc.rotation = Vector2.UnitY.RotatedBy((double)(npc.ai[1] / 10f * MathHelper.TwoPi), default).Y * 0.4f; + return; + } + npc.rotation = (npc.ai[1] - 120f) / 30f * MathHelper.TwoPi; + return; + } + else if (npc.ai[0] == 2f) + { + float num1605 = 3600f; + float num1606 = 120f; + float num1607 = 60f; + int num1608 = 0; + if (npc.ai[3] % num1606 >= num1607) + { + num1608 = 1; + } + int num1609 = num1608; + num1608 = 0; + npc.ai[3] += 1f; + if (npc.ai[3] % num1606 >= num1607) + { + num1608 = 1; + } + if (num1608 != num1609) + { + if (num1608 == 1) + { + npc.ai[2] = (float)((Math.Sign((player8.Center - center16).X) == 1) ? 1 : -1); + if (Main.netMode != NetmodeID.MultiplayerClient) //second projectile being shot. Didn't use this + { + npc.localAI[0] += (float)Main.rand.Next(4); + if (npc.localAI[0] >= (float)Main.rand.Next(50, 100)) + { + npc.localAI[0] = 0f; + npc.TargetClosest(true); + if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + { + float projSpeed = 11f; + Vector2 npcPos = npc.Center; + float targetX = Main.player[npc.target].Center.X - npcPos.X; + float YAdjust = Math.Abs(targetX) * 0.1f; + float targetY = Main.player[npc.target].Center.Y - npcPos.Y - YAdjust; + Vector2 velocity = new Vector2(targetX, targetY); + float targetDist = velocity.Length(); + npc.netUpdate = true; + targetDist = projSpeed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; + int projDmg = 50; + if (Main.expertMode) + { + projDmg = 28; + } + int projType = ProjectileID.SaucerLaser; + npcPos.X += velocity.X; + npcPos.Y += velocity.Y; + for (int num186 = 0; num186 < 2; num186++) + { + velocity.X = Main.player[npc.target].Center.X - npcPos.X; + velocity.Y = Main.player[npc.target].Center.Y - npcPos.Y; + targetDist = velocity.Length(); + targetDist = projSpeed / targetDist; + velocity.X += (float)Main.rand.Next(-20, 21); + velocity.Y += (float)Main.rand.Next(-20, 21); + velocity.X *= targetDist; + velocity.Y *= targetDist; + Projectile.NewProjectile(npcPos, velocity, projType, projDmg, 0f, Main.myPlayer, 0f, 0f); + } + } + } + } + Main.PlaySound(SoundID.Item12, npc.position); + } + npc.netUpdate = true; + } + if (npc.ai[3] >= num1605) + { + npc.ai[0] = 2f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.netUpdate = true; + } + else if (num1608 == 0) + { + Vector2 vector199 = player8.Center + new Vector2(npc.ai[2] * 350f, -250f) - center16; + vector199.Normalize(); + npc.velocity = Vector2.Lerp(npc.velocity, vector199 * 16f, 0.1f); + } + else + { + int num1610 = (int)npc.Center.X / 16; + int num1611 = (int)(npc.position.Y + (float)npc.height) / 16; + int num1612 = 0; + bool flag155 = Main.tile[num1610, num1611].nactive() && Main.tileSolid[(int)Main.tile[num1610, num1611].type] && !Main.tileSolidTop[(int)Main.tile[num1610, num1611].type]; + if (flag155) + { + num1612 = 1; + } + else + { + while (num1612 < 150 && num1611 + num1612 < Main.maxTilesY) + { + int num1613 = num1611 + num1612; + bool flag156 = Main.tile[num1610, num1613].nactive() && Main.tileSolid[(int)Main.tile[num1610, num1613].type] && !Main.tileSolidTop[(int)Main.tile[num1610, num1613].type]; + if (flag156) + { + num1612--; + break; + } + num1612++; + } + } + float num1614 = (float)(num1612 * 16); + float num1615 = 250f; + if (num1614 < num1615) + { + float num1616 = -4f; + if (-num1616 > num1614) + { + num1616 = -num1614; + } + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, num1616, 0.05f); + } + else + { + npc.velocity.Y = npc.velocity.Y * 0.95f; + } + npc.velocity.X = 8f * npc.ai[2]; + } + npc.rotation = 0f; + } + } - public override void HitEffect(int hitDirection, double damage) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default, 1f); - } - if (npc.life <= 0) - { - for (int k = 0; k < 20; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default, 1f); - } - } - } + public override void FindFrame(int frameHeight) + { + npc.frameCounter += 0.15f; + npc.frameCounter %= Main.npcFrameCount[npc.type]; + int frame = (int)npc.frameCounter; + npc.frame.Y = frame * frameHeight; + } - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - if (spawnInfo.playerSafe || !Main.hardMode) - { - return 0f; - } - return SpawnCondition.Sky.Chance * 0.1f; - } + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + for (int k = 0; k < 20; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default, 1f); + } + } + } - public override void OnHitPlayer(Player player, int damage, bool crit) - { - player.AddBuff(BuffID.Electrified, 120, true); - } + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.playerSafe || !Main.hardMode) + { + return 0f; + } + return SpawnCondition.Sky.Chance * 0.1f; + } - public override void NPCLoot() - { - DropHelper.DropItemCondition(npc, ItemID.MartianConduitPlating, NPC.downedGolemBoss, 1, 10, 30); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 3); - } - } + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Electrified, 120, true); + } + + public override void NPCLoot() + { + DropHelper.DropItemCondition(npc, ItemID.MartianConduitPlating, NPC.downedGolemBoss, 1, 10, 30); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 3); + } + } } diff --git a/NPCs/NormalNPCs/ShockstormShuttle.png b/NPCs/NormalNPCs/ShockstormShuttle.png index 6f56a972bf..ef2147cbc0 100644 Binary files a/NPCs/NormalNPCs/ShockstormShuttle.png and b/NPCs/NormalNPCs/ShockstormShuttle.png differ diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index 74a0e0b614..6df3f39e6f 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { DisplayName.SetDefault("Frost Mist"); - Main.projFrames[projectile.type] = 6; + Main.projFrames[projectile.type] = 8; ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; ProjectileID.Sets.TrailingMode[projectile.type] = 0; } @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 3) + if (projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } diff --git a/Projectiles/Boss/FrostMist.png b/Projectiles/Boss/FrostMist.png index 8349afb42d..ef17040dd0 100644 Binary files a/Projectiles/Boss/FrostMist.png and b/Projectiles/Boss/FrostMist.png differ diff --git a/Projectiles/Boss/SirenSong.cs b/Projectiles/Boss/SirenSong.cs index 8aa5ed76aa..6858829227 100644 --- a/Projectiles/Boss/SirenSong.cs +++ b/Projectiles/Boss/SirenSong.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - projectile.width = 26; + projectile.width = 24; projectile.height = 58; projectile.hostile = true; projectile.penetrate = -1; diff --git a/Projectiles/Boss/SirenSong.png b/Projectiles/Boss/SirenSong.png index 418fb2622c..af5f7c5eb7 100644 Binary files a/Projectiles/Boss/SirenSong.png and b/Projectiles/Boss/SirenSong.png differ diff --git a/Projectiles/Boss/WaterSpear.png b/Projectiles/Boss/WaterSpear.png index b923a9ea8b..a50659774e 100644 Binary files a/Projectiles/Boss/WaterSpear.png and b/Projectiles/Boss/WaterSpear.png differ diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index ae4ad3447a..7f40b271f5 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1486,6 +1486,22 @@ namespace CalamityMod.Projectiles } } + if (modPlayer.titanHeartSet && stealthStrike && modPlayer.titanCooldown <= 0) + { + int dmg = (int)(85 + (projectile.damage * 0.05f)); + int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileType(), dmg, projectile.knockBack, projectile.owner, 0f, 0f); + Main.projectile[boom].Calamity().forceRogue = true; + Main.PlaySound(SoundID.Item14, projectile.position); + for (int dustexplode = 0; dustexplode < 360; dustexplode++) + { + Vector2 dustd = new Vector2(17f, 17f).RotatedBy(MathHelper.ToRadians(dustexplode)); + int d = Dust.NewDust(projectile.Center, projectile.width, projectile.height, Main.rand.NextBool(2) ? ModContent.DustType() : ModContent.DustType(), dustd.X, dustd.Y, 100, default, 3f); + Main.dust[d].noGravity = true; + Main.dust[d].position = projectile.Center; + } + modPlayer.titanCooldown = 15; + } + if (modPlayer.corrosiveSpine && projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType()) { for (int i = 0; i < 3; i++) diff --git a/Projectiles/Healing/XerocHealOrb.cs b/Projectiles/Healing/XerocHealOrb.cs index c5d09d22e5..4c9f4ecb0a 100644 --- a/Projectiles/Healing/XerocHealOrb.cs +++ b/Projectiles/Healing/XerocHealOrb.cs @@ -26,11 +26,14 @@ namespace CalamityMod.Projectiles.Healing projectile.HealingProjectile((int)projectile.ai[1], (int)projectile.ai[0], 5.5f, 15f); float num498 = projectile.velocity.X * 0.2f; float num499 = -(projectile.velocity.Y * 0.2f); - int num500 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f); - Dust dust = Main.dust[num500]; - dust.noGravity = true; - dust.position.X -= num498; - dust.position.Y -= num499; + if (projectile.timeLeft % 2 == 0) + { + int num500 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f); + Dust dust = Main.dust[num500]; + dust.noGravity = true; + dust.position.X -= num498; + dust.position.Y -= num499; + } } } } diff --git a/Projectiles/Healing/XerocHealOrb.png b/Projectiles/Healing/XerocHealOrb.png index 15e8775737..c1fdbf1381 100644 Binary files a/Projectiles/Healing/XerocHealOrb.png and b/Projectiles/Healing/XerocHealOrb.png differ diff --git a/Projectiles/Hybrid/KelvinCatalystBoomerang.png b/Projectiles/Hybrid/KelvinCatalystBoomerang.png index 1d6c440160..86a074d801 100644 Binary files a/Projectiles/Hybrid/KelvinCatalystBoomerang.png and b/Projectiles/Hybrid/KelvinCatalystBoomerang.png differ diff --git a/Projectiles/Magic/AtlantisSpear.png b/Projectiles/Magic/AtlantisSpear.png index 122a12fd18..626938fb51 100644 Binary files a/Projectiles/Magic/AtlantisSpear.png and b/Projectiles/Magic/AtlantisSpear.png differ diff --git a/Projectiles/Magic/BrimstoneTentacle.cs b/Projectiles/Magic/BrimstoneTentacle.cs index 80915bf57b..02c463fd8f 100644 --- a/Projectiles/Magic/BrimstoneTentacle.cs +++ b/Projectiles/Magic/BrimstoneTentacle.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + projectile.localAI[1]++; if (projectile.velocity.X != projectile.velocity.X) { if (Math.Abs(projectile.velocity.X) < 1f) @@ -53,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic projectile.height = projectile.width; projectile.position.X = center10.X - (float)(projectile.width / 2); projectile.position.Y = center10.Y - (float)(projectile.height / 2); - if ((double)projectile.localAI[0] < 0.1) + if (projectile.localAI[0] < 0.1f) { projectile.localAI[0] += 0.01f; } @@ -74,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic } projectile.ai[0] *= 1.05f; projectile.ai[1] *= 1.05f; - if (projectile.scale < 1f) + if (projectile.scale < 1f && projectile.localAI[1] > 5f) { int num897 = 0; while ((float)num897 < projectile.scale * 10f) diff --git a/Projectiles/Magic/CosmicTentacle.cs b/Projectiles/Magic/CosmicTentacle.cs index 450e3a9de4..3cd1698c27 100644 --- a/Projectiles/Magic/CosmicTentacle.cs +++ b/Projectiles/Magic/CosmicTentacle.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + projectile.localAI[1]++; if (projectile.velocity.X != projectile.velocity.X) { if (Math.Abs(projectile.velocity.X) < 1f) @@ -53,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic projectile.height = projectile.width; projectile.position.X = center10.X - (float)(projectile.width / 2); projectile.position.Y = center10.Y - (float)(projectile.height / 2); - if ((double)projectile.localAI[0] < 0.1) + if (projectile.localAI[0] < 0.1f) { projectile.localAI[0] += 0.01f; } @@ -74,12 +75,12 @@ namespace CalamityMod.Projectiles.Magic } projectile.ai[0] *= 1.05f; projectile.ai[1] *= 1.05f; - if (projectile.scale < 1f) + if (projectile.scale < 1f && projectile.localAI[1] > 5f) { int num897 = 0; while ((float)num897 < projectile.scale * 10f) { - int num898 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, projectile.velocity.X, projectile.velocity.Y, 100, default, 1.1f); + int num898 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, projectile.velocity.X, projectile.velocity.Y, 100, default, 1.1f); Main.dust[num898].position = (Main.dust[num898].position + projectile.Center) / 2f; Main.dust[num898].noGravity = true; Main.dust[num898].velocity *= 0.1f; diff --git a/Projectiles/Magic/SirensSongNote.png b/Projectiles/Magic/SirensSongNote.png index 2ec8ea38c0..e323ebc6e3 100644 Binary files a/Projectiles/Magic/SirensSongNote.png and b/Projectiles/Magic/SirensSongNote.png differ diff --git a/Projectiles/Melee/BallOFuguProj.png b/Projectiles/Melee/BallOFuguProj.png index f4673a0825..ca90c057a0 100644 Binary files a/Projectiles/Melee/BallOFuguProj.png and b/Projectiles/Melee/BallOFuguProj.png differ diff --git a/Projectiles/Melee/ChaosFlameSmall.cs b/Projectiles/Melee/ChaosFlameSmall.cs index 2c334e743c..4cba2dbd61 100644 --- a/Projectiles/Melee/ChaosFlameSmall.cs +++ b/Projectiles/Melee/ChaosFlameSmall.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee { projectile.frame = 0; } - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + projectile.rotation = projectile.velocity.ToRotation(); Lighting.AddLight(projectile.Center, 0.4f, 0f, 0f); if (Main.rand.NextBool(4)) { diff --git a/Projectiles/Melee/MeldGreatswordBigProjectile.cs b/Projectiles/Melee/MeldGreatswordBigProjectile.cs new file mode 100644 index 0000000000..ebbeb8d830 --- /dev/null +++ b/Projectiles/Melee/MeldGreatswordBigProjectile.cs @@ -0,0 +1,64 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class MeldGreatswordBigProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bolt"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 18; + projectile.height = 18; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.melee = true; + projectile.timeLeft = 600; + } + + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation(); + Vector2 value7 = new Vector2(6f, 12f); + projectile.localAI[0] += 1f; + if (projectile.localAI[0] == 48f) + { + projectile.localAI[0] = 0f; + } + else + { + for (int num41 = 0; num41 < 2; num41++) + { + Vector2 value8 = Vector2.UnitX * -15f; + value8 = -Vector2.UnitY.RotatedBy((double)(projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7; + int num42 = Dust.NewDust(projectile.Center, 0, 0, 27, 0f, 0f, 160, default, 1f); + Main.dust[num42].scale = 1f; + Main.dust[num42].noGravity = true; + Main.dust[num42].position = projectile.Center + value8; + Main.dust[num42].velocity = projectile.velocity; + } + } + + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, 0f, 0f, 100, default, 0.8f); + Main.dust[num458].noGravity = true; + Main.dust[num458].velocity *= 0f; + + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 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/Melee/MeldGreatswordBigProjectile.png b/Projectiles/Melee/MeldGreatswordBigProjectile.png new file mode 100644 index 0000000000..d2e1ad5ddb Binary files /dev/null and b/Projectiles/Melee/MeldGreatswordBigProjectile.png differ diff --git a/Projectiles/Melee/PlasmaBall.cs b/Projectiles/Melee/MeldGreatswordMediumProjectile.cs similarity index 74% rename from Projectiles/Melee/PlasmaBall.cs rename to Projectiles/Melee/MeldGreatswordMediumProjectile.cs index fd5f2a8405..0c511c7c71 100644 --- a/Projectiles/Melee/PlasmaBall.cs +++ b/Projectiles/Melee/MeldGreatswordMediumProjectile.cs @@ -1,15 +1,18 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class PlasmaBall : ModProjectile + public class MeldGreatswordMediumProjectile : ModProjectile { public override void SetStaticDefaults() { - DisplayName.SetDefault("Ball"); + DisplayName.SetDefault("Bolt"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; } public override void SetDefaults() @@ -24,6 +27,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + projectile.rotation = projectile.velocity.ToRotation(); Vector2 value7 = new Vector2(6f, 12f); projectile.localAI[0] += 1f; if (projectile.localAI[0] == 48f) @@ -50,5 +54,11 @@ namespace CalamityMod.Projectiles.Melee CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 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/Melee/MeldGreatswordMediumProjectile.png b/Projectiles/Melee/MeldGreatswordMediumProjectile.png new file mode 100644 index 0000000000..90aede20e7 Binary files /dev/null and b/Projectiles/Melee/MeldGreatswordMediumProjectile.png differ diff --git a/Projectiles/Melee/MeldGreatswordSmallProjectile.cs b/Projectiles/Melee/MeldGreatswordSmallProjectile.cs new file mode 100644 index 0000000000..c472068f63 --- /dev/null +++ b/Projectiles/Melee/MeldGreatswordSmallProjectile.cs @@ -0,0 +1,64 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class MeldGreatswordSmallProjectile : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bolt"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.melee = true; + projectile.timeLeft = 600; + } + + public override void AI() + { + projectile.rotation = projectile.velocity.ToRotation(); + Vector2 value7 = new Vector2(6f, 12f); + projectile.localAI[0] += 1f; + if (projectile.localAI[0] == 48f) + { + projectile.localAI[0] = 0f; + } + else + { + for (int num41 = 0; num41 < 2; num41++) + { + Vector2 value8 = Vector2.UnitX * -15f; + value8 = -Vector2.UnitY.RotatedBy((double)(projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7; + int num42 = Dust.NewDust(projectile.Center, 0, 0, 27, 0f, 0f, 160, default, 1f); + Main.dust[num42].scale = 1f; + Main.dust[num42].noGravity = true; + Main.dust[num42].position = projectile.Center + value8; + Main.dust[num42].velocity = projectile.velocity; + } + } + + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 27, 0f, 0f, 100, default, 0.8f); + Main.dust[num458].noGravity = true; + Main.dust[num458].velocity *= 0f; + + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 12f, 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/Melee/MeldGreatswordSmallProjectile.png b/Projectiles/Melee/MeldGreatswordSmallProjectile.png new file mode 100644 index 0000000000..7930994094 Binary files /dev/null and b/Projectiles/Melee/MeldGreatswordSmallProjectile.png differ diff --git a/Projectiles/Melee/PlasmaBall.png b/Projectiles/Melee/PlasmaBall.png deleted file mode 100644 index 139ef2e822..0000000000 Binary files a/Projectiles/Melee/PlasmaBall.png and /dev/null differ diff --git a/Projectiles/Melee/ProfanedSwordProj.cs b/Projectiles/Melee/ProfanedSwordProj.cs index dbaef5da37..3e8e17d725 100644 --- a/Projectiles/Melee/ProfanedSwordProj.cs +++ b/Projectiles/Melee/ProfanedSwordProj.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.ToRadians(45f); if (Main.rand.NextBool(4)) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } if (projectile.spriteDirection == -1) { - projectile.rotation -= 1.57f; + projectile.rotation -= MathHelper.ToRadians(90f); } } diff --git a/Projectiles/Melee/ProfanedSwordProj.png b/Projectiles/Melee/ProfanedSwordProj.png index 0967c869b9..36dfb30fbe 100644 Binary files a/Projectiles/Melee/ProfanedSwordProj.png and b/Projectiles/Melee/ProfanedSwordProj.png differ diff --git a/Projectiles/Pets/SirenFlopping.png b/Projectiles/Pets/SirenFlopping.png deleted file mode 100644 index 62bcb652ae..0000000000 Binary files a/Projectiles/Pets/SirenFlopping.png and /dev/null differ diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index 0e59557428..ea4a75c9bf 100644 --- a/Projectiles/Pets/SirenYoung.cs +++ b/Projectiles/Pets/SirenYoung.cs @@ -11,11 +11,13 @@ namespace CalamityMod.Projectiles.Pets public class SirenYoung : ModProjectile { private bool underwater = false; + private int sleepyTimer = 0; + private int lightLevel = 0; public override void SetStaticDefaults() { DisplayName.SetDefault("Siren"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 17; Main.projPet[projectile.type] = true; ProjectileID.Sets.LightPet[projectile.type] = true; } @@ -23,12 +25,13 @@ namespace CalamityMod.Projectiles.Pets public override void SetDefaults() { projectile.netImportant = true; - projectile.width = 30; - projectile.height = 30; + projectile.width = 38; + projectile.height = 58; projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft *= 5; projectile.ignoreWater = true; + projectile.tileCollide = false; } public override void AI() @@ -48,325 +51,91 @@ namespace CalamityMod.Projectiles.Pets { projectile.timeLeft = 2; } - projectile.frameCounter++; - if (projectile.frameCounter > 6) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame > 3) - { - projectile.frame = 0; - } - underwater = Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) || modPlayer.leviathanAndSirenLore; + if (sleepyTimer < 180) + { + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + } + if (underwater) + { + if (projectile.frame >= 8) + { + projectile.frame = 0; + } + } + else + { + if (projectile.frame >= 16) + { + projectile.frame = sleepyTimer >= 180 ? 16 : 8; + } + } + underwater = player.IsUnderwater() || modPlayer.leviathanAndSirenLore; if (underwater) { - projectile.width = 30; - projectile.height = 30; + if (projectile.frame == 16) + projectile.frame = 0; + if (sleepyTimer > 0) + sleepyTimer--; if (projectile.localAI[0] == 0f) { - Lighting.AddLight(projectile.Center, 2.5f, 2f, 0f); //4.5 + lightLevel = 0; } else { - Lighting.AddLight(projectile.Center, 1.65f, 1.32f, 0f); //3 + lightLevel = 1; } } - else - { - projectile.width = 54; - projectile.height = 54; - Lighting.AddLight(projectile.Center, 0.825f, 0.66f, 0f); //1.5 - Vector2 vector54 = player.Center; - vector54.X -= (float)((15 + player.width / 2) * player.direction); - vector54.X -= (float)(40 * player.direction); - if (projectile.ai[0] == 1f) - { - projectile.tileCollide = false; - float num663 = 0.2f; - float num664 = 10f; - int num665 = 200; - if (num664 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) - { - num664 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); - } - Vector2 vector58 = vector54 - projectile.Center; - float num666 = vector58.Length(); - if (num666 > 2000f) - { - projectile.position = player.Center - new Vector2((float)projectile.width, (float)projectile.height) / 2f; - } - if (num666 < (float)num665 && player.velocity.Y == 0f && projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - projectile.netUpdate = true; - if (projectile.velocity.Y < -6f) - { - projectile.velocity.Y = -6f; - } - } - if (num666 >= 60f) - { - vector58.Normalize(); - vector58 *= num664; - if (projectile.velocity.X < vector58.X) - { - projectile.velocity.X = projectile.velocity.X + num663; - if (projectile.velocity.X < 0f) - { - projectile.velocity.X = projectile.velocity.X + num663 * 1.5f; - } - } - if (projectile.velocity.X > vector58.X) - { - projectile.velocity.X = projectile.velocity.X - num663; - if (projectile.velocity.X > 0f) - { - projectile.velocity.X = projectile.velocity.X - num663 * 1.5f; - } - } - if (projectile.velocity.Y < vector58.Y) - { - projectile.velocity.Y = projectile.velocity.Y + num663; - if (projectile.velocity.Y < 0f) - { - projectile.velocity.Y = projectile.velocity.Y + num663 * 1.5f; - } - } - if (projectile.velocity.Y > vector58.Y) - { - projectile.velocity.Y = projectile.velocity.Y - num663; - if (projectile.velocity.Y > 0f) - { - projectile.velocity.Y = projectile.velocity.Y - num663 * 1.5f; - } - } - } - if (projectile.velocity.X != 0f) - { - projectile.spriteDirection = Math.Sign(projectile.velocity.X); - } - } - if (projectile.ai[0] == 2f) - { - projectile.friendly = true; - projectile.spriteDirection = projectile.direction; - projectile.velocity.Y = projectile.velocity.Y + 0.4f; - if (projectile.velocity.Y > 10f) - { - projectile.velocity.Y = 10f; - } - projectile.ai[1] -= 1f; - if (projectile.ai[1] <= 0f) - { - projectile.ai[1] = 0f; - projectile.ai[0] = 0f; - projectile.friendly = false; - projectile.netUpdate = true; - return; - } - } - if (projectile.ai[0] == 0f) - { - float num671 = 200f; - if (player.rocketDelay2 > 0) - { - projectile.ai[0] = 1f; - projectile.netUpdate = true; - } - Vector2 vector59 = vector54 - projectile.Center; - if (vector59.Length() > 2000f) - { - projectile.position = vector54 - new Vector2((float)projectile.width, (float)projectile.height) / 2f; - } - else if (vector59.Length() > num671 || Math.Abs(vector59.Y) > 300f) - { - projectile.ai[0] = 1f; - projectile.netUpdate = true; - if (projectile.velocity.Y > 0f && vector59.Y < 0f) - { - projectile.velocity.Y = 0f; - } - if (projectile.velocity.Y < 0f && vector59.Y > 0f) - { - projectile.velocity.Y = 0f; - } - } - projectile.tileCollide = true; - float num672 = 0.5f; - float num673 = 4f; - float num674 = 4f; - float num675 = 0.1f; - if (num674 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) - { - num674 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); - num672 = 0.7f; - } - int num676 = 0; - bool flag29 = false; - float num677 = vector54.X - projectile.Center.X; - if (Math.Abs(num677) > 5f) - { - if (num677 < 0f) - { - num676 = -1; - if (projectile.velocity.X > -num673) - { - projectile.velocity.X = projectile.velocity.X - num672; - } - else - { - projectile.velocity.X = projectile.velocity.X - num675; - } - } - else - { - num676 = 1; - if (projectile.velocity.X < num673) - { - projectile.velocity.X = projectile.velocity.X + num672; - } - else - { - projectile.velocity.X = projectile.velocity.X + num675; - } - } - flag29 = true; - } - else - { - projectile.velocity.X = projectile.velocity.X * 0.9f; - if (Math.Abs(projectile.velocity.X) < num672 * 2f) - { - projectile.velocity.X = 0f; - } - } - if (num676 != 0) - { - int num678 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16; - int num679 = (int)projectile.position.Y / 16; - num678 += num676; - num678 += (int)projectile.velocity.X; - int num3; - for (int num680 = num679; num680 < num679 + projectile.height / 16 + 1; num680 = num3 + 1) - { - if (WorldGen.SolidTile(num678, num680)) - { - flag29 = true; - } - num3 = num680; - } - } - if (projectile.velocity.X != 0f) - { - flag29 = true; - } - Collision.StepUp(ref projectile.position, ref projectile.velocity, projectile.width, projectile.height, ref projectile.stepSpeed, ref projectile.gfxOffY, 1, false, 0); - if (projectile.velocity.Y == 0f && flag29) - { - int num3; - for (int num681 = 0; num681 < 3; num681 = num3 + 1) - { - int num682 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16; - if (num681 == 0) - { - num682 = (int)projectile.position.X / 16; - } - if (num681 == 2) - { - num682 = (int)(projectile.position.X + (float)projectile.width) / 16; - } - int num683 = (int)(projectile.position.Y + (float)projectile.height) / 16; - if (WorldGen.SolidTile(num682, num683) || Main.tile[num682, num683].halfBrick() || Main.tile[num682, num683].slope() > 0 || (TileID.Sets.Platforms[(int)Main.tile[num682, num683].type] && Main.tile[num682, num683].active() && !Main.tile[num682, num683].inActive())) - { - try - { - num682 = (int)(projectile.position.X + (float)(projectile.width / 2)) / 16; - num683 = (int)(projectile.position.Y + (float)(projectile.height / 2)) / 16; - num682 += num676; - num682 += (int)projectile.velocity.X; - if (!WorldGen.SolidTile(num682, num683 - 1) && !WorldGen.SolidTile(num682, num683 - 2)) - { - projectile.velocity.Y = -5.1f; - } - else if (!WorldGen.SolidTile(num682, num683 - 2)) - { - projectile.velocity.Y = -7.1f; - } - else if (WorldGen.SolidTile(num682, num683 - 5)) - { - projectile.velocity.Y = -11.1f; - } - else if (WorldGen.SolidTile(num682, num683 - 4)) - { - projectile.velocity.Y = -10.1f; - } - else - { - projectile.velocity.Y = -9.1f; - } - } catch - { - projectile.velocity.Y = -9.1f; - } - } - num3 = num681; - } - } - if (projectile.velocity.X > num674) - { - projectile.velocity.X = num674; - } - if (projectile.velocity.X < -num674) - { - projectile.velocity.X = -num674; - } - if (projectile.velocity.X < 0f) - { - projectile.direction = -1; - } - if (projectile.velocity.X > 0f) - { - projectile.direction = 1; - } - if (projectile.velocity.X > num672 && num676 == 1) - { - projectile.direction = 1; - } - if (projectile.velocity.X < -num672 && num676 == -1) - { - projectile.direction = -1; - } - projectile.spriteDirection = projectile.direction; - projectile.velocity.Y = projectile.velocity.Y + 0.4f; - if (projectile.velocity.Y > 10f) - { - projectile.velocity.Y = 10f; - } - } - return; - } + else + { + if (sleepyTimer < 180) + { + sleepyTimer++; + lightLevel = 1; + } + else + { + lightLevel = 2; + projectile.frame = 16; + } + } + switch (lightLevel) + { + case 0: + Lighting.AddLight(projectile.Center, 0f, 2f, 2.5f); //4.5 + break; + case 1: + Lighting.AddLight(projectile.Center, 0f, 1.32f, 1.65f); //3 + break; + case 2: + Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.7f); + break; + } + float num23 = 0.2f; float num24 = 5f; - projectile.tileCollide = false; Vector2 vector4 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num25 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector4.X; - float num26 = Main.player[projectile.owner].position.Y + Main.player[projectile.owner].gfxOffY + (float)(Main.player[projectile.owner].height / 2) - vector4.Y; - if (Main.player[projectile.owner].controlLeft) + float num25 = player.position.X + (float)(player.width / 2) - vector4.X; + float num26 = player.position.Y + player.gfxOffY + (float)(player.height / 2) - vector4.Y; + if (player.controlLeft && sleepyTimer < 180) { num25 -= 120f; } - else if (Main.player[projectile.owner].controlRight) + else if (player.controlRight && sleepyTimer < 180) { num25 += 120f; } - if (Main.player[projectile.owner].controlDown) + if (player.controlDown && sleepyTimer < 180) { num26 += 120f; } else { - if (Main.player[projectile.owner].controlUp) + if (player.controlUp && sleepyTimer < 180) { num26 -= 120f; } @@ -375,12 +144,12 @@ namespace CalamityMod.Projectiles.Pets float num27 = (float)Math.Sqrt((double)(num25 * num25 + num26 * num26)); if (num27 > 1000f) { - projectile.position.X = projectile.position.X + num25; - projectile.position.Y = projectile.position.Y + num26; + projectile.position.X += num25; + projectile.position.Y += num26; } if (projectile.localAI[0] == 1f) { - if (num27 < 10f && Math.Abs(Main.player[projectile.owner].velocity.X) + Math.Abs(Main.player[projectile.owner].velocity.Y) < num24 && Main.player[projectile.owner].velocity.Y == 0f) + if (num27 < 10f && Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y) < num24 && player.velocity.Y == 0f) { projectile.localAI[0] = 0f; } @@ -396,11 +165,11 @@ namespace CalamityMod.Projectiles.Pets projectile.velocity.X = num25 * num27; projectile.velocity.Y = num26 * num27; } - if ((double)projectile.velocity.X > 0.5) + if (projectile.velocity.X > 0.5f) { projectile.direction = -1; } - else if ((double)projectile.velocity.X < -0.5) + else if (projectile.velocity.X < -0.5f) { projectile.direction = 1; } @@ -412,11 +181,11 @@ namespace CalamityMod.Projectiles.Pets { projectile.localAI[0] = 1f; } - if ((double)projectile.velocity.X > 0.5) + if (projectile.velocity.X > 0.5f) { projectile.direction = -1; } - else if ((double)projectile.velocity.X < -0.5) + else if (projectile.velocity.X < -0.5f) { projectile.direction = 1; } @@ -432,14 +201,14 @@ namespace CalamityMod.Projectiles.Pets projectile.velocity *= 0f; num23 = 0f; } - projectile.direction = -Main.player[projectile.owner].direction; + projectile.direction = -player.direction; } num27 = num24 / num27; num25 *= num27; num26 *= num27; if (projectile.velocity.X < num25) { - projectile.velocity.X = projectile.velocity.X + num23; + projectile.velocity.X += num23; if (projectile.velocity.X < 0f) { projectile.velocity.X = projectile.velocity.X * 0.99f; @@ -447,7 +216,7 @@ namespace CalamityMod.Projectiles.Pets } if (projectile.velocity.X > num25) { - projectile.velocity.X = projectile.velocity.X - num23; + projectile.velocity.X -= num23; if (projectile.velocity.X > 0f) { projectile.velocity.X = projectile.velocity.X * 0.99f; @@ -455,7 +224,7 @@ namespace CalamityMod.Projectiles.Pets } if (projectile.velocity.Y < num26) { - projectile.velocity.Y = projectile.velocity.Y + num23; + projectile.velocity.Y += num23; if (projectile.velocity.Y < 0f) { projectile.velocity.Y = projectile.velocity.Y * 0.99f; @@ -463,7 +232,7 @@ namespace CalamityMod.Projectiles.Pets } if (projectile.velocity.Y > num26) { - projectile.velocity.Y = projectile.velocity.Y - num23; + projectile.velocity.Y -= num23; if (projectile.velocity.Y > 0f) { projectile.velocity.Y = projectile.velocity.Y * 0.99f; @@ -473,15 +242,6 @@ namespace CalamityMod.Projectiles.Pets { projectile.rotation = projectile.velocity.X * 0.05f; } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D texture = underwater ? Main.projectileTexture[projectile.type] : ModContent.GetTexture("CalamityMod/Projectiles/Pets/SirenFlopping"); - int height = (underwater ? Main.projectileTexture[projectile.type].Height : 256) / Main.projFrames[projectile.type]; - int frameHeight = height * projectile.frame; - 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.None, 0f); - return false; - } + } } } diff --git a/Projectiles/Pets/SirenYoung.png b/Projectiles/Pets/SirenYoung.png index 41481d1dba..70e101e4e1 100644 Binary files a/Projectiles/Pets/SirenYoung.png and b/Projectiles/Pets/SirenYoung.png differ diff --git a/Projectiles/Ranged/ArcticArrowProj.cs b/Projectiles/Ranged/ArcticArrowProj.cs index 04652dbf92..ff3cf364b6 100644 --- a/Projectiles/Ranged/ArcticArrowProj.cs +++ b/Projectiles/Ranged/ArcticArrowProj.cs @@ -2,8 +2,8 @@ using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using System; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged { @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; if (Main.rand.NextBool(5)) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 67, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); diff --git a/Projectiles/Ranged/ArcticArrowProj.png b/Projectiles/Ranged/ArcticArrowProj.png index e4023c5037..5fcacaa5de 100644 Binary files a/Projectiles/Ranged/ArcticArrowProj.png and b/Projectiles/Ranged/ArcticArrowProj.png differ diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 08fd53fe89..fc45b2f130 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -51,12 +51,12 @@ namespace CalamityMod.Projectiles.Ranged num296 = 0.75f; } projectile.ai[0] += 1f; - int num297 = 58; + int dustType = 62; if (Main.rand.NextBool(2)) { for (int num298 = 0; num298 < 1; num298++) { - int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); + int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[num299]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Ranged/ElysianArrowProj.cs b/Projectiles/Ranged/ElysianArrowProj.cs index 77878e655d..c1549dff6d 100644 --- a/Projectiles/Ranged/ElysianArrowProj.cs +++ b/Projectiles/Ranged/ElysianArrowProj.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Ranged/ElysianArrowProj.png b/Projectiles/Ranged/ElysianArrowProj.png index bf8d18b65e..e0936c2556 100644 Binary files a/Projectiles/Ranged/ElysianArrowProj.png and b/Projectiles/Ranged/ElysianArrowProj.png differ diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 0ef5baaf68..ff134707ac 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -50,12 +51,12 @@ namespace CalamityMod.Projectiles.Ranged num296 = 0.75f; } projectile.ai[0] += 1f; - int num297 = 173; + int dustType = (int)CalamityDusts.PurpleCosmolite; if (Main.rand.NextBool(2)) { for (int num298 = 0; num298 < 1; num298++) { - int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); + int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default, 1f); Dust dust = Main.dust[num299]; if (Main.rand.NextBool(3)) { diff --git a/Projectiles/Ranged/NapalmArrowProj.cs b/Projectiles/Ranged/NapalmArrowProj.cs index dedd67315a..ff82a970b4 100644 --- a/Projectiles/Ranged/NapalmArrowProj.cs +++ b/Projectiles/Ranged/NapalmArrowProj.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; if (Main.rand.NextBool(5)) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 6, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); diff --git a/Projectiles/Ranged/NapalmArrowProj.png b/Projectiles/Ranged/NapalmArrowProj.png index 53fb0e274a..48ef48d4c4 100644 Binary files a/Projectiles/Ranged/NapalmArrowProj.png and b/Projectiles/Ranged/NapalmArrowProj.png differ diff --git a/Projectiles/Rogue/BrackishFlaskProj.cs b/Projectiles/Rogue/BrackishFlaskProj.cs index fe00874d77..e5683ce1d5 100644 --- a/Projectiles/Rogue/BrackishFlaskProj.cs +++ b/Projectiles/Rogue/BrackishFlaskProj.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Projectiles.Rogue double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; double deltaAngle = spread / 8f; double offsetAngle; - int i; if (projectile.owner == Main.myPlayer) { if (projectile.Calamity().stealthStrike) @@ -51,11 +50,11 @@ namespace CalamityMod.Projectiles.Rogue Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 1f, 0f); } } } diff --git a/Projectiles/Rogue/BrackishFlaskProj.png b/Projectiles/Rogue/BrackishFlaskProj.png index c0101e465c..0e5ad78a57 100644 Binary files a/Projectiles/Rogue/BrackishFlaskProj.png and b/Projectiles/Rogue/BrackishFlaskProj.png differ diff --git a/Projectiles/Rogue/BrackishWater.cs b/Projectiles/Rogue/BrackishWater.cs index 78719abe3c..77bfdf8c6e 100644 --- a/Projectiles/Rogue/BrackishWater.cs +++ b/Projectiles/Rogue/BrackishWater.cs @@ -26,23 +26,23 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0.5f / 255f); - if (projectile.localAI[0] == 0f) + if (projectile.localAI[0] == 0f && projectile.ai[0] == 1f) { Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 21); projectile.localAI[0] += 1f; } - int randomDust = Utils.SelectRandom(Main.rand, new int[] + if (projectile.timeLeft % 2 == 0) { - 33, - 89 - }); - for (int num457 = 0; num457 < 3; num457++) - { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDust, 0f, 0f, 100, default, 1.2f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } + int randomDust = Utils.SelectRandom(Main.rand, new int[] + { + 33, + 89 + }); + int water = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDust, 0f, 0f, 100, default, 1.2f); + Main.dust[water].noGravity = true; + Main.dust[water].velocity *= 0.5f; + Main.dust[water].velocity += projectile.velocity * 0.1f; + } } public override void Kill(int timeLeft) diff --git a/Projectiles/Rogue/BrackishWater.png b/Projectiles/Rogue/BrackishWater.png index 831f72cfc8..29d231bf6d 100644 Binary files a/Projectiles/Rogue/BrackishWater.png and b/Projectiles/Rogue/BrackishWater.png differ diff --git a/Projectiles/Rogue/Brimblade2.png b/Projectiles/Rogue/Brimblade2.png index d7de00d24b..0d93160ef8 100644 Binary files a/Projectiles/Rogue/Brimblade2.png and b/Projectiles/Rogue/Brimblade2.png differ diff --git a/Projectiles/Rogue/BrimbladeProj.png b/Projectiles/Rogue/BrimbladeProj.png index d7de00d24b..0d93160ef8 100644 Binary files a/Projectiles/Rogue/BrimbladeProj.png and b/Projectiles/Rogue/BrimbladeProj.png differ diff --git a/Projectiles/Rogue/DestructionBolt.png b/Projectiles/Rogue/DestructionBolt.png index bb6630a736..66a812cf0b 100644 Binary files a/Projectiles/Rogue/DestructionBolt.png and b/Projectiles/Rogue/DestructionBolt.png differ diff --git a/Projectiles/Rogue/DestructionStar.cs b/Projectiles/Rogue/DestructionStar.cs index 3e4ba4e834..8faa224bca 100644 --- a/Projectiles/Rogue/DestructionStar.cs +++ b/Projectiles/Rogue/DestructionStar.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Rogue public class DestructionStar : ModProjectile { public int hitCount = 0; - private static float Radius = 43f; + private static float Radius = 47f; public override void SetStaticDefaults() { @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 86; - projectile.height = 86; + projectile.width = 94; + projectile.height = 94; projectile.friendly = true; projectile.penetrate = 16; projectile.usesLocalNPCImmunity = true; @@ -89,8 +89,7 @@ namespace CalamityMod.Projectiles.Rogue } if (projectile.owner == Main.myPlayer) { - int i; - for (i = 0; i < hitCount; i++) + for (int i = 0; i < hitCount; i++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) @@ -99,7 +98,7 @@ namespace CalamityMod.Projectiles.Rogue } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/Projectiles/Rogue/DestructionStar.png b/Projectiles/Rogue/DestructionStar.png index 732056dac4..46c3428789 100644 Binary files a/Projectiles/Rogue/DestructionStar.png and b/Projectiles/Rogue/DestructionStar.png differ diff --git a/Projectiles/Rogue/LionfishProj.png b/Projectiles/Rogue/LionfishProj.png index 56025eca70..e97c12862e 100644 Binary files a/Projectiles/Rogue/LionfishProj.png and b/Projectiles/Rogue/LionfishProj.png differ diff --git a/Projectiles/Rogue/ScourgeVenomCloud.cs b/Projectiles/Rogue/ScourgeVenomCloud.cs index c874e06e43..81c622266b 100644 --- a/Projectiles/Rogue/ScourgeVenomCloud.cs +++ b/Projectiles/Rogue/ScourgeVenomCloud.cs @@ -1,7 +1,8 @@ +using CalamityMod.Buffs.DamageOverTime; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Rogue { @@ -10,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Venom Cloud"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 10; } public override void SetDefaults() @@ -30,41 +31,37 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { + projectile.ai[0] += 1f; projectile.frameCounter++; - if (projectile.frameCounter > 9) + if (projectile.frameCounter > 6) { projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 3) - { - projectile.frame = 0; - } + if (projectile.ai[0] < 219f) //255 - frameCounter tick * number of disippation frames + { + if (projectile.frame >= 4) + { + projectile.frame = 0; + } + } + else if (projectile.owner == Main.myPlayer && projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.Kill(); + } projectile.velocity *= 0.98f; - projectile.ai[0] += 1f; - if (projectile.ai[0] >= 120f) - { - if (projectile.alpha < 255) - { - projectile.alpha += 5; - if (projectile.alpha > 255) - { - projectile.alpha = 255; - } - } - else if (projectile.owner == Main.myPlayer) - { - projectile.Kill(); - } - } - else if (projectile.alpha > 80) + if (projectile.alpha > 110) { projectile.alpha -= 30; - if (projectile.alpha < 80) + if (projectile.alpha < 110) { - projectile.alpha = 80; + projectile.alpha = 110; } } + if (Math.Abs(projectile.velocity.X) > 0.1f) + { + projectile.spriteDirection = -projectile.direction; + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/ScourgeVenomCloud.png b/Projectiles/Rogue/ScourgeVenomCloud.png index 412c5607a5..2a1c0b9502 100644 Binary files a/Projectiles/Rogue/ScourgeVenomCloud.png and b/Projectiles/Rogue/ScourgeVenomCloud.png differ diff --git a/Projectiles/Rogue/WulfrumKnifeProj.png b/Projectiles/Rogue/WulfrumKnifeProj.png index aab1bf448c..94ca6dcea6 100644 Binary files a/Projectiles/Rogue/WulfrumKnifeProj.png and b/Projectiles/Rogue/WulfrumKnifeProj.png differ diff --git a/Projectiles/Rogue/XerocPitchforkProjectile.cs b/Projectiles/Rogue/XerocPitchforkProjectile.cs index 710588bed7..38d1edc8b2 100644 --- a/Projectiles/Rogue/XerocPitchforkProjectile.cs +++ b/Projectiles/Rogue/XerocPitchforkProjectile.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 12; - projectile.height = 12; + projectile.width = 20; + projectile.height = 20; projectile.friendly = true; projectile.penetrate = -1; projectile.extraUpdates = 1; @@ -32,10 +32,10 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(135f); if (Main.rand.NextBool(3)) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 58, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 62, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } if (projectile.spriteDirection == -1) { diff --git a/Projectiles/Rogue/XerocPitchforkProjectile.png b/Projectiles/Rogue/XerocPitchforkProjectile.png index 5ff0fa6cf6..ca5e3d8840 100644 Binary files a/Projectiles/Rogue/XerocPitchforkProjectile.png and b/Projectiles/Rogue/XerocPitchforkProjectile.png differ diff --git a/Projectiles/Summon/FrostMistFriendly.cs b/Projectiles/Summon/FrostMistFriendly.cs index b80a01a5a3..2742d3a92d 100644 --- a/Projectiles/Summon/FrostMistFriendly.cs +++ b/Projectiles/Summon/FrostMistFriendly.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Mist"); - Main.projFrames[projectile.type] = 6; + Main.projFrames[projectile.type] = 8; ProjectileID.Sets.MinionShot[projectile.type] = true; } @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 3) + if (projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } diff --git a/Projectiles/Summon/FrostMistFriendly.png b/Projectiles/Summon/FrostMistFriendly.png index 8349afb42d..ef17040dd0 100644 Binary files a/Projectiles/Summon/FrostMistFriendly.png and b/Projectiles/Summon/FrostMistFriendly.png differ diff --git a/Projectiles/Summon/HerringMinion.cs b/Projectiles/Summon/HerringMinion.cs index 36d87f9dba..ea46870676 100644 --- a/Projectiles/Summon/HerringMinion.cs +++ b/Projectiles/Summon/HerringMinion.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Herring"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 8; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; } @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 3) + if (projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } diff --git a/Projectiles/Summon/HerringMinion.png b/Projectiles/Summon/HerringMinion.png index 9d384c9345..5e8bef7fba 100644 Binary files a/Projectiles/Summon/HerringMinion.png and b/Projectiles/Summon/HerringMinion.png differ diff --git a/Projectiles/Summon/MagicBullet.cs b/Projectiles/Summon/MagicBullet.cs index 5e92de59ea..f87517bbc9 100644 --- a/Projectiles/Summon/MagicBullet.cs +++ b/Projectiles/Summon/MagicBullet.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -60,5 +61,7 @@ namespace CalamityMod.Projectiles.Summon { return new Color(189, 51, 164, projectile.alpha); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) => projectile.timeLeft < 600; } } diff --git a/Projectiles/Summon/ReaverOrb.cs b/Projectiles/Summon/ReaverOrb.cs index 4ccf243923..d803995de9 100644 --- a/Projectiles/Summon/ReaverOrb.cs +++ b/Projectiles/Summon/ReaverOrb.cs @@ -75,12 +75,12 @@ namespace CalamityMod.Projectiles.Summon projectile.damage = damage2; } Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 1f / 255f, (255 - projectile.alpha) * 0f / 255f); - 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) + Main.player[projectile.owner].gfxOffY - 60f; - if (Main.player[projectile.owner].gravDir == -1f) + 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 + 120f; - projectile.rotation = 3.14f; + projectile.rotation = MathHelper.Pi; } else { diff --git a/Projectiles/Summon/SandElementalHealer.cs b/Projectiles/Summon/SandElementalHealer.cs index ffa5c68efd..f7361227a3 100644 --- a/Projectiles/Summon/SandElementalHealer.cs +++ b/Projectiles/Summon/SandElementalHealer.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = 0; } - if ((double)Math.Abs(projectile.velocity.X) > 0.2) + if (Math.Abs(projectile.velocity.X) > 0.2f) { projectile.spriteDirection = -projectile.direction; } diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index 2f60590d2d..803cb848d5 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Summon player.MinionDamage()); projectile.damage = damage2; } - if ((double)Math.Abs(projectile.velocity.X) > 0.2) + if (Math.Abs(projectile.velocity.X) > 0.2f) { projectile.spriteDirection = -projectile.direction; } diff --git a/Projectiles/Summon/SandElementalMinion.png b/Projectiles/Summon/SandElementalMinion.png index 22e16e792d..a0b71ad531 100644 Binary files a/Projectiles/Summon/SandElementalMinion.png and b/Projectiles/Summon/SandElementalMinion.png differ diff --git a/Projectiles/Summon/SirenSongFriendly.png b/Projectiles/Summon/SirenSongFriendly.png index c2832ae6e8..1738907123 100644 Binary files a/Projectiles/Summon/SirenSongFriendly.png and b/Projectiles/Summon/SirenSongFriendly.png differ diff --git a/Projectiles/Summon/WaterSpearFriendly.png b/Projectiles/Summon/WaterSpearFriendly.png index b923a9ea8b..a50659774e 100644 Binary files a/Projectiles/Summon/WaterSpearFriendly.png and b/Projectiles/Summon/WaterSpearFriendly.png differ diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index cbc19cb5d6..1f0624e0fa 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -15,19 +15,18 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Wulfrum Droid"); - Main.projFrames[projectile.type] = 3; + Main.projFrames[projectile.type] = 12; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; } public override void SetDefaults() { - projectile.width = 30; - projectile.height = 30; + projectile.width = 26; + projectile.height = 32; projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; - //projectile.aiStyle = 62; projectile.minionSlots = 1f; projectile.timeLeft = 18000; projectile.penetrate = -1; @@ -44,24 +43,23 @@ namespace CalamityMod.Projectiles.Summon { projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) + int dustAmt = 36; + for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++) { - Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center; - Vector2 vector7 = vector6 - projectile.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 61, vector7.X * 1.1f, vector7.Y * 1.1f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + Vector2 source = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + source = source.RotatedBy((double)((float)(dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + projectile.Center; + Vector2 dustVel = source - projectile.Center; + int green = Dust.NewDust(source + dustVel, 0, 0, 61, dustVel.X * 1.1f, dustVel.Y * 1.1f, 100, default, 1.4f); + Main.dust[green].noGravity = true; + Main.dust[green].noLight = true; + Main.dust[green].velocity = dustVel; } dust += 1f; } if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / - projectile.Calamity().spawnedPlayerMinionDamageValue * - player.MinionDamage()); + projectile.Calamity().spawnedPlayerMinionDamageValue * player.MinionDamage()); projectile.damage = damage2; } projectile.frameCounter++; @@ -70,13 +68,13 @@ namespace CalamityMod.Projectiles.Summon projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame >= 3) + if (projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } - bool flag64 = projectile.type == ModContent.ProjectileType(); + bool correctMinion = projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); - if (flag64) + if (correctMinion) { if (player.dead) { @@ -88,135 +86,132 @@ namespace CalamityMod.Projectiles.Summon } } projectile.MinionAntiClump(); - Vector2 vector2_3 = projectile.position; - float num7 = 450f; - bool flag = false; - int num8 = -1; + Vector2 targetVector = projectile.position; + float range = 450f; + bool foundTarget = false; + int targetIndex = -1; if (player.HasMinionAttackTargetNPC) { NPC npc = Main.npc[player.MinionAttackTargetNPC]; if (npc.CanBeChasedBy((object) this, false)) { - float num1 = Vector2.Distance(npc.Center, projectile.Center); - if ((!flag && num1 < num7) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + float targetDist = Vector2.Distance(npc.Center, projectile.Center); + if ((!foundTarget && targetDist < range) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) { - num7 = num1; - vector2_3 = npc.Center; - flag = true; - num8 = npc.whoAmI; + range = targetDist; + targetVector = npc.Center; + foundTarget = true; + targetIndex = npc.whoAmI; } } } - if (!flag) + if (!foundTarget) { - for (int index2 = 0; index2 < Main.npc.Length; ++index2) + for (int npcIndex = 0; npcIndex < Main.npc.Length; ++npcIndex) { - NPC npc = Main.npc[index2]; + NPC npc = Main.npc[npcIndex]; if (npc.CanBeChasedBy((object) this, false)) { - float num1 = Vector2.Distance(npc.Center, projectile.Center); - if ((!flag && num1 < num7) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + float targetDist = Vector2.Distance(npc.Center, projectile.Center); + if ((!foundTarget && targetDist < range) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) { - num7 = num1; - vector2_3 = npc.Center; - flag = true; - num8 = index2; + range = targetDist; + targetVector = npc.Center; + foundTarget = true; + targetIndex = npcIndex; } } } } - int num9 = 500; - if (flag) - num9 = 1000; - if ((double) Vector2.Distance(player.Center, projectile.Center) > (double) num9) + float separationAnxietyDist = 500f; + if (foundTarget) + separationAnxietyDist = 1000f; + if (Vector2.Distance(player.Center, projectile.Center) > separationAnxietyDist) { projectile.ai[0] = 1f; projectile.netUpdate = true; } - if ((double) projectile.ai[0] == 1.0) + if (projectile.ai[0] == 1f) projectile.tileCollide = false; - if (flag && (double) projectile.ai[0] == 0.0) + if (foundTarget && projectile.ai[0] == 0f) { - Vector2 vector2_1 = vector2_3 - projectile.Center; - float num1 = vector2_1.Length(); - vector2_1.Normalize(); - if ((double) num1 > 200.0) + Vector2 targetPos = targetVector - projectile.Center; + float targetDist = targetPos.Length(); + targetPos.Normalize(); + if (targetDist > 200f) { - float num2 = 6f; - Vector2 vector2_2 = vector2_1 * num2; - projectile.velocity.X = (float) (((double) projectile.velocity.X * 40.0 + (double) vector2_2.X) / 41.0); - projectile.velocity.Y = (float) (((double) projectile.velocity.Y * 40.0 + (double) vector2_2.Y) / 41.0); + float speed = 6f; + Vector2 goToTarget = targetPos * speed; + projectile.velocity.X = (projectile.velocity.X * 40f + goToTarget.X) / 41f; + projectile.velocity.Y = (projectile.velocity.Y * 40f + goToTarget.Y) / 41f; } - else if ((double) projectile.velocity.Y > -1.0) + else if (projectile.velocity.Y > -1f) projectile.velocity.Y -= 0.1f; } else { if (!Collision.CanHitLine(projectile.Center, 1, 1, player.Center, 1, 1)) projectile.ai[0] = 1f; - float num1 = 6f; - if ((double) projectile.ai[0] == 1.0) - num1 = 15f; - Vector2 center = projectile.Center; - Vector2 vector2_1 = player.Center - center + new Vector2(0.0f, -60f); - float num3 = vector2_1.Length(); - if ((double) num3 > 200.0 && (double) num1 < 9.0) - num1 = 9f; - if ((double) num3 < 100.0 && (double) projectile.ai[0] == 1.0 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + float returnSpeed = 6f; + if (projectile.ai[0] == 1f) + returnSpeed = 15f; + Vector2 playerVec = player.Center - projectile.Center + new Vector2(0f, -60f); + float playerDist = playerVec.Length(); + if (playerDist > 200f && returnSpeed < 9f) + returnSpeed = 9f; + if (playerDist < 100f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { - projectile.ai[0] = 0.0f; + projectile.ai[0] = 0f; projectile.netUpdate = true; } - if ((double) num3 > 2000.0) + if (playerDist > 2000f) { projectile.position.X = player.Center.X - (float) (projectile.width / 2); projectile.position.Y = player.Center.Y - (float) (projectile.width / 2); + projectile.netUpdate = true; } - else if ((double) num3 > 70.0) + else if (playerDist > 70f) { - vector2_1.Normalize(); - projectile.velocity = (projectile.velocity * 20f + vector2_1 * num1) / 21f; + playerVec.Normalize(); + projectile.velocity = (projectile.velocity * 20f + playerVec * returnSpeed) / 21f; } else { - if ((double) projectile.velocity.X == 0.0 && (double) projectile.velocity.Y == 0.0) + if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) { projectile.velocity.X = -0.15f; projectile.velocity.Y = -0.05f; } - projectile.velocity = projectile.velocity * 1.01f; + projectile.velocity *= 1.01f; } } projectile.rotation = projectile.velocity.X * 0.05f; - if ((double) projectile.velocity.X > 0.0) + if (projectile.velocity.X > 0f) projectile.spriteDirection = projectile.direction = 1; - else if ((double) projectile.velocity.X < 0.0) + else if (projectile.velocity.X < 0f) projectile.spriteDirection = projectile.direction = -1; - if ((double) projectile.ai[1] > 0.0) + if (projectile.ai[1] > 0f) projectile.ai[1] += (float) Main.rand.Next(1, 4); - if ((double) projectile.ai[1] > 90.0) + if (projectile.ai[1] > 90f) { projectile.ai[1] = 0.0f; projectile.netUpdate = true; } - if ((double) projectile.ai[1] != 0.0) + if (projectile.ai[1] != 0f) return; ++projectile.ai[1]; if (Main.myPlayer != projectile.owner) return; - if (!flag) + if (!foundTarget) return; - Vector2 vec = vector2_3 - projectile.Center; - vec.Normalize(); - Vector2 vec2 = vec * 10f; - int bolt = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vec2.X, vec2.Y, ModContent.ProjectileType(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f); + Vector2 velocity = targetVector - projectile.Center; + velocity.Normalize(); + velocity *= 10f; + int bolt = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); Main.projectile[bolt].netUpdate = true; projectile.netUpdate = true; } - public override bool CanDamage() - { - return false; - } + public override bool CanDamage() => false; } } diff --git a/Projectiles/Summon/WulfrumDroid.png b/Projectiles/Summon/WulfrumDroid.png index c227fdff07..fec767973b 100644 Binary files a/Projectiles/Summon/WulfrumDroid.png and b/Projectiles/Summon/WulfrumDroid.png differ diff --git a/Projectiles/Typeless/KelvinCatalystStar.png b/Projectiles/Typeless/KelvinCatalystStar.png index 63cf056df5..4c9d479f3b 100644 Binary files a/Projectiles/Typeless/KelvinCatalystStar.png and b/Projectiles/Typeless/KelvinCatalystStar.png differ diff --git a/Projectiles/Typeless/WulfrumBobber.cs b/Projectiles/Typeless/WulfrumBobber.cs index 2668a7b540..f178c2fbf2 100644 --- a/Projectiles/Typeless/WulfrumBobber.cs +++ b/Projectiles/Typeless/WulfrumBobber.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDrawExtras(SpriteBatch spriteBatch) { - Player player = Main.player[projectile.owner]; - CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType(), new Color(200, 200, 200, 100)); + CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType(), new Color(200, 200, 200, 100), 38, 28f); return false; } } diff --git a/Projectiles/Typeless/WulfrumBobber.png b/Projectiles/Typeless/WulfrumBobber.png index 7d03394d6f..19d0f06aea 100644 Binary files a/Projectiles/Typeless/WulfrumBobber.png and b/Projectiles/Typeless/WulfrumBobber.png differ diff --git a/Projectiles/Typeless/XerocBlast.cs b/Projectiles/Typeless/XerocBlast.cs index 498481348e..3a1db33347 100644 --- a/Projectiles/Typeless/XerocBlast.cs +++ b/Projectiles/Typeless/XerocBlast.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless num466 = num465 / num466; num463 *= num466; num464 *= num466; - int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 1f); + int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[num467]; dust.noGravity = true; dust.position.X = projectile.Center.X; diff --git a/Projectiles/Typeless/XerocBubble.cs b/Projectiles/Typeless/XerocBubble.cs index 4503b2e48d..986923299c 100644 --- a/Projectiles/Typeless/XerocBubble.cs +++ b/Projectiles/Typeless/XerocBubble.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Typeless { for (int num468 = 0; num468 < 1; num468++) { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 1f); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; } diff --git a/Projectiles/Typeless/XerocBubble.png b/Projectiles/Typeless/XerocBubble.png index 637b8391b1..1c0aafc145 100644 Binary files a/Projectiles/Typeless/XerocBubble.png and b/Projectiles/Typeless/XerocBubble.png differ diff --git a/Projectiles/Typeless/XerocFire.cs b/Projectiles/Typeless/XerocFire.cs index 1cb3dbfa08..f3d8d7e5f1 100644 --- a/Projectiles/Typeless/XerocFire.cs +++ b/Projectiles/Typeless/XerocFire.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Projectiles.Typeless projectile.ai[0] = 5f; if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f) { - projectile.velocity.X = projectile.velocity.X * 0.97f; - if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01) + projectile.velocity.X *= 0.97f; + if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f) { projectile.velocity.X = 0f; projectile.netUpdate = true; @@ -51,16 +51,9 @@ namespace CalamityMod.Projectiles.Typeless projectile.velocity.Y = projectile.velocity.Y + 0.2f; } projectile.rotation += projectile.velocity.X * 0.1f; - int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 58, 0f, 0f, 100, default, 0.75f); - Dust dust = Main.dust[num199]; - dust.position.X -= 2f; - dust.position.Y += 2f; - dust.scale += (float)Main.rand.Next(50) * 0.01f; - dust.noGravity = true; - dust.velocity.Y -= 2f; - if (Main.rand.NextBool(2)) + if (Main.rand.NextBool(3)) { - int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 58, 0f, 0f, 100, default, 0.75f); + int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 62, 0f, 0f, 100, default, 0.75f); Dust dust2 = Main.dust[num200]; dust2.position.X -= 2f; dust2.position.Y += 2f; @@ -68,9 +61,19 @@ namespace CalamityMod.Projectiles.Typeless dust2.noGravity = true; dust2.velocity *= 0.1f; } - if ((double)projectile.velocity.Y < 0.25 && (double)projectile.velocity.Y > 0.15) + else + { + int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 62, 0f, 0f, 100, default, 0.75f); + Dust dust = Main.dust[num199]; + dust.position.X -= 2f; + dust.position.Y += 2f; + dust.scale += (float)Main.rand.Next(50) * 0.01f; + dust.noGravity = true; + dust.velocity.Y -= 2f; + } + if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) { - projectile.velocity.X = projectile.velocity.X * 0.8f; + projectile.velocity.X *= 0.8f; } projectile.rotation = -projectile.velocity.X * 0.05f; if (projectile.velocity.Y > 16f) diff --git a/Projectiles/Typeless/XerocFire.png b/Projectiles/Typeless/XerocFire.png index 28f94674d6..297ed01ef2 100644 Binary files a/Projectiles/Typeless/XerocFire.png and b/Projectiles/Typeless/XerocFire.png differ diff --git a/Projectiles/Typeless/XerocOrb.cs b/Projectiles/Typeless/XerocOrb.cs index 5a7607f9da..00a76b1ba2 100644 --- a/Projectiles/Typeless/XerocOrb.cs +++ b/Projectiles/Typeless/XerocOrb.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 7f, 20f); diff --git a/Projectiles/Typeless/XerocOrb.png b/Projectiles/Typeless/XerocOrb.png index 15e8775737..c1fdbf1381 100644 Binary files a/Projectiles/Typeless/XerocOrb.png and b/Projectiles/Typeless/XerocOrb.png differ diff --git a/Projectiles/Typeless/XerocStar.cs b/Projectiles/Typeless/XerocStar.cs index 285ed3a9b2..511f7f198e 100644 --- a/Projectiles/Typeless/XerocStar.cs +++ b/Projectiles/Typeless/XerocStar.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless { for (int num468 = 0; num468 < 1; num468++) { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 58, 0f, 0f, 100, default, 2f); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 62, 0f, 0f, 100, default, 2f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; } diff --git a/Projectiles/Typeless/XerocStar.png b/Projectiles/Typeless/XerocStar.png index 454174ef8a..3ccaa4660b 100644 Binary files a/Projectiles/Typeless/XerocStar.png and b/Projectiles/Typeless/XerocStar.png differ diff --git a/Tiles/Furniture/BossTrophy.cs b/Tiles/Furniture/BossTrophy.cs index 752e6ce492..e6731142a8 100644 --- a/Tiles/Furniture/BossTrophy.cs +++ b/Tiles/Furniture/BossTrophy.cs @@ -110,6 +110,9 @@ namespace CalamityMod.Tiles.Furniture break; case 26: item = ModContent.ItemType(); + break; + case 27: + item = ModContent.ItemType(); break; } if (item > 0) diff --git a/Tiles/Furniture/BossTrophy.png b/Tiles/Furniture/BossTrophy.png index b521b489bd..3970e3d5cb 100644 Binary files a/Tiles/Furniture/BossTrophy.png and b/Tiles/Furniture/BossTrophy.png differ diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinFlame.png b/Tiles/FurnitureCosmilite/CosmiliteBasinFlame.png new file mode 100644 index 0000000000..4bda7186c9 Binary files /dev/null and b/Tiles/FurnitureCosmilite/CosmiliteBasinFlame.png differ diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs index a76b519ecc..78d10a7148 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs @@ -1,14 +1,18 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.FurnitureCosmilite; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -using CalamityMod.Items.Placeables.FurnitureCosmilite; namespace CalamityMod.Tiles.FurnitureCosmilite { public class CosmiliteBasinTile : ModTile { + int animationFrame = 0; + public override void SetDefaults() { Main.tileLighted[Type] = true; @@ -42,6 +46,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite if (frameCounter >= 6) { frame = (frame + 1) % 6; + animationFrame = frame; frameCounter = 0; } } @@ -67,5 +72,19 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { CalamityUtils.LightHitWire(Type, i, j, 3, 3); } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + CalamityUtils.DrawStaticFlameEffect(ModContent.GetTexture("CalamityMod/Tiles/FurnitureCosmilite/CosmiliteBasinFlame"), i, j, offsetY: animationFrame * animationFrameHeight); + } + + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) + { + Tile tile = Main.tile[i, j]; + if (tile.frameY == 18) + { + CalamityUtils.DrawFlameSparks((int)CalamityDusts.PurpleCosmolite, 5, i, j); + } + } } } \ No newline at end of file diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png index 4abbed3430..cee44a5c37 100644 Binary files a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png and b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.png differ diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index ca8c0ebecb..89a2e24768 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -1032,8 +1032,7 @@ namespace CalamityMod ItemID.SolarFlarePickaxe, ItemID.VortexPickaxe, ItemID.NebulaPickaxe, - ItemID.StardustPickaxe, - ModContent.ItemType() + ItemID.StardustPickaxe }); RecipeGroup.RegisterGroup("LunarPickaxe", group); diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index ed2cbc88e1..30ed3cb883 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -958,6 +958,8 @@ namespace CalamityMod { newDamage = (int)((dmgInput - cap) * 0.1) + cap; } + if (newDamage < 1) + newDamage = 1; return newDamage; } @@ -2909,12 +2911,13 @@ namespace CalamityMod public static void DrawFishingLine(this Projectile projectile, int fishingRodType, Color poleColor, int xPositionAdditive = 45, float yPositionAdditive = 35f) { Player player = Main.player[projectile.owner]; - if (projectile.bobber && player.ActiveItem().holdStyle > 0) + Item item = Main.mouseItem.IsAir ? player.HeldItem : Main.mouseItem; + if (projectile.bobber && item.holdStyle > 0) { float pPosX = player.MountedCenter.X; float pPosY = player.MountedCenter.Y; pPosY += player.gfxOffY; - int type = player.ActiveItem().type; + int type = item.type; float gravDir = player.gravDir; if (type == fishingRodType)