From 2e14a265070f47714ea5a55395807016d40c9b65 Mon Sep 17 00:00:00 2001 From: GinYuH <> Date: Fri, 2 Jun 2023 18:48:45 -0700 Subject: [PATCH] entity --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 10 ++++++- NPCs/SupremeCalamitas/SupremeCirrus.png | Bin 0 -> 5909 bytes Projectiles/Boss/SCalRitualDrama.cs | 14 +++++++-- Tiles/Furniture/CraftingStations/SCalAltar.cs | 27 +++++++++++++++--- 4 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 NPCs/SupremeCalamitas/SupremeCirrus.png diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 00c5bc881d..2efec58b73 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -79,6 +79,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public bool spawnArena = false; public bool enteredBrothersPhase = false; public bool hasSummonedBrothers = false; + public bool cirrus = false; public int giveUpCounter = 1200; public int phaseChange = 0; @@ -269,6 +270,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas writer.Write(spawnArena); writer.Write(hasSummonedBrothers); writer.Write(enteredBrothersPhase); + writer.Write(cirrus); writer.Write(NPC.dontTakeDamage); writer.Write(NPC.chaseable); @@ -320,6 +322,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas spawnArena = reader.ReadBoolean(); hasSummonedBrothers = reader.ReadBoolean(); enteredBrothersPhase = reader.ReadBoolean(); + cirrus = reader.ReadBoolean(); NPC.dontTakeDamage = reader.ReadBoolean(); NPC.chaseable = reader.ReadBoolean(); @@ -2730,6 +2733,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas Texture2D texture2D15 = DownedBossSystem.downedCalamitas && !BossRushEvent.BossRushActive ? TextureAssets.Npc[NPC.type].Value : ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCalamitasHooded").Value; + if (cirrus) + { + texture2D15 = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCirrus").Value; + } + Vector2 vector11 = new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2f); Color color36 = Color.White; float amount9 = 0.5f; @@ -2821,7 +2829,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas GameShaders.Misc["CalamityMod:SupremeShield"].UseImage1("Images/Misc/Perlin"); Color forcefieldColor = Color.DarkViolet; - Color secondaryForcefieldColor = Color.Red * 1.4f; + Color secondaryForcefieldColor = (cirrus ? Color.HotPink : Color.Red) * 1.4f; if (!NPC.dontTakeDamage && (willCharge || NPC.ai[1] == 2f)) { diff --git a/NPCs/SupremeCalamitas/SupremeCirrus.png b/NPCs/SupremeCalamitas/SupremeCirrus.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd69ab6d3e7ff39ff7ababc0ffc1e218494ec59 GIT binary patch literal 5909 zcmeHL2~bn__6~}cDoDbbpq3B?ff}}eOJtRV-2h1tHSCM*s4Nu_0Z}v|p)4YZ5VR2t z2?$~#%2Kh4K|sI&5yaAe0TBrB5DOX+NO! zJKuL{E(BY-4Qd-85Qv<;9gYaj!4QZvPG&9mRyk7A0ZvlUMBDw4%FZnl;D>aO)d4FA zq&josqVGBgWG%$SiHryTZ;{=jyTx{=x~-GE2ky(*^<@jR*6D&}5aiF}PXzuiBB0#z9L$CkB!);J zE&u;MAf$JnX@VMle%$VGGz7Bgq2wdga;z)>0#V4Z$61l%yrzrfNF$Gx@zyCCvc9T$ zp3BS0Si$URIo<+Ew_M#M{*Er;{^`WwvAlr6D+S3*qL&k`A6w4nUY58`exG*^}@$tvv;F6ZO^rS_xKP~ISsjPe4E-?)*^|UAF z!-p1IGah~$gDrE;aB(sI&dZNQ7d|^xe;LLn&2?EMFV1%5H0(3)&y>$9F6)Y;#q@_j z)zy=i<`);ouD*NM)rA(oM>G@S#HmRi7scWaMZ93ftWvd!l;Yg$r>gS^b-}}jnd&D` zV$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LO@difBgeeE)fJU~tNuo_CAl1w8UHjef<~3UlT`4y;HZ$}q;xaPF*46Y ziISrkboV6^zChax+@I6VSv-)4-M_&F zY*WReU~?&o((8g{IuOe%ROA@qi z)peLhB%76cP>4PEXx zn*O^<%#^EY`CoAgvg0>Ev%zGbm)Bc~mjWZ=3tagmC8kJXd(J}EqI~L^J9tyN{)~Ky nC;KXf`z!4Ky=QpUSG6p~hH8Xr+#Pr%dF^PAC*Ugg`=tIAYDz3J literal 0 HcmV?d00001 diff --git a/Projectiles/Boss/SCalRitualDrama.cs b/Projectiles/Boss/SCalRitualDrama.cs index 1f4057ac28..b3bc0bfb54 100644 --- a/Projectiles/Boss/SCalRitualDrama.cs +++ b/Projectiles/Boss/SCalRitualDrama.cs @@ -74,10 +74,17 @@ namespace CalamityMod.Projectiles.Boss // Summon SCal serverside. // All the other acoustic and visual effects can happen client-side. if (Main.netMode != NetmodeID.MultiplayerClient) - CalamityUtils.SpawnBossBetter(Projectile.Center - new Vector2(60f), ModContent.NPCType()); + { + NPC scal = CalamityUtils.SpawnBossBetter(Projectile.Center - new Vector2(60f), ModContent.NPCType()); + if (Projectile.ai[1] == 1) + { + scal.ModNPC().cirrus = true; + } + } // Make a laugh sound and create a burst of brimstone dust. - SoundEngine.PlaySound(SupremeCalamitas.SpawnSound, Projectile.Center); + SoundStyle SpawnSound = Projectile.ai[1] == 1 ? SoundID.Item107 : SupremeCalamitas.SpawnSound; + SoundEngine.PlaySound(SpawnSound, Projectile.Center); // Make a sudden screen shake. Main.LocalPlayer.Calamity().GeneralScreenShakePower = Utils.GetLerpValue(3400f, 1560f, Main.LocalPlayer.Distance(Projectile.Center), true) * 16f; @@ -90,7 +97,8 @@ namespace CalamityMod.Projectiles.Boss burstDirectionVariance += j * 2; for (int k = 0; k < 40; k++) { - Dust burstDust = Dust.NewDustPerfect(Projectile.Center, (int)CalamityDusts.Brimstone); + int type = Projectile.ai[1] == 1 ? 69 : (int)CalamityDusts.Brimstone; + Dust burstDust = Dust.NewDustPerfect(Projectile.Center, type); burstDust.scale = Main.rand.NextFloat(3.1f, 3.5f); burstDust.position += Main.rand.NextVector2Circular(10f, 10f); burstDust.velocity = Main.rand.NextVector2Square(-burstDirectionVariance, burstDirectionVariance).SafeNormalize(Vector2.UnitY) * burstSpeed; diff --git a/Tiles/Furniture/CraftingStations/SCalAltar.cs b/Tiles/Furniture/CraftingStations/SCalAltar.cs index 33c2e44dd9..6411d1be94 100644 --- a/Tiles/Furniture/CraftingStations/SCalAltar.cs +++ b/Tiles/Furniture/CraftingStations/SCalAltar.cs @@ -1,9 +1,11 @@ using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.CraftingStations; +using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.SummonItems; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -63,10 +65,19 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations public static void HoverItemIcon() { - if (Main.LocalPlayer.HasItem(ModContent.ItemType())) + bool vodka = Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && CalamityWorld.getFixedBoi; + if (vodka) + { + Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } + else if (Main.LocalPlayer.HasItem(ModContent.ItemType())) + { Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } else + { Main.LocalPlayer.cursorItemIconID = ModContent.ItemType(); + } Main.LocalPlayer.noThrow = 2; Main.LocalPlayer.cursorItemIconEnabled = true; @@ -80,11 +91,13 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations int top = j - tile.TileFrameY / 18; if (!Main.LocalPlayer.HasItem(ModContent.ItemType()) && - !Main.LocalPlayer.HasItem(ModContent.ItemType())) + !Main.LocalPlayer.HasItem(ModContent.ItemType()) && !(Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && CalamityWorld.getFixedBoi)) { return true; } + bool vodka = Main.LocalPlayer.HeldItem.type == ModContent.ItemType() && CalamityWorld.getFixedBoi; + if (NPC.AnyNPCs(ModContent.NPCType()) || BossRushEvent.BossRushActive) return true; @@ -97,10 +110,16 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations ritualSpawnPosition += new Vector2(-10f, -24f); SoundEngine.PlaySound(SummonSound, ritualSpawnPosition); - Projectile.NewProjectile(new EntitySource_WorldEvent(), ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(new EntitySource_WorldEvent(), ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0, vodka.ToInt()); - if (!usingSpecialItem) + if (vodka) + { + Main.LocalPlayer.ConsumeItem(ModContent.ItemType(), true); + } + else if (!usingSpecialItem) + { Main.LocalPlayer.ConsumeItem(ModContent.ItemType(), true); + } return true; } }