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/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/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/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/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/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/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/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/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/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/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/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/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/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 3cd80f7221..fa4a377112 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -584,9 +584,10 @@ namespace CalamityMod.NPCs.Leviathan 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 +599,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 +611,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 +631,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); diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index a2ef7193da..6010aca9f0 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; @@ -703,12 +704,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,18 +718,12 @@ 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); } } @@ -844,6 +839,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/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/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/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/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/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/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/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/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/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