From 92101b786cb5a955c3adc863eefe91cf4e134e4c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jan 2020 00:07:43 -0500 Subject: [PATCH] added Sirius --- Buffs/Summon/SiriusBuff.cs | 36 +++ Buffs/Summon/SiriusBuff.png | Bin 0 -> 559 bytes CalPlayer/CalamityPlayer.cs | 2 + Items/Weapons/Summon/CosmicImmaterializer.cs | 2 +- Items/Weapons/Summon/Sirius.cs | 105 ++++++++ Items/Weapons/Summon/Sirius.png | Bin 0 -> 1353 bytes Projectiles/Summon/SiriusBeam.cs | 54 +++++ Projectiles/Summon/SiriusBeam.png | Bin 0 -> 135 bytes Projectiles/Summon/SiriusExplosion.cs | 237 +++++++++++++++++++ Projectiles/Summon/SiriusExplosion.png | Bin 0 -> 3066 bytes Projectiles/Summon/SiriusMinion.cs | 163 +++++++++++++ Projectiles/Summon/SiriusMinion.png | Bin 0 -> 677 bytes 12 files changed, 598 insertions(+), 1 deletion(-) create mode 100644 Buffs/Summon/SiriusBuff.cs create mode 100644 Buffs/Summon/SiriusBuff.png create mode 100644 Items/Weapons/Summon/Sirius.cs create mode 100644 Items/Weapons/Summon/Sirius.png create mode 100644 Projectiles/Summon/SiriusBeam.cs create mode 100644 Projectiles/Summon/SiriusBeam.png create mode 100644 Projectiles/Summon/SiriusExplosion.cs create mode 100644 Projectiles/Summon/SiriusExplosion.png create mode 100644 Projectiles/Summon/SiriusMinion.cs create mode 100644 Projectiles/Summon/SiriusMinion.png diff --git a/Buffs/Summon/SiriusBuff.cs b/Buffs/Summon/SiriusBuff.cs new file mode 100644 index 0000000000..107fb96793 --- /dev/null +++ b/Buffs/Summon/SiriusBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class SiriusBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Sirius"); + Description.SetDefault("A bit too bright, but it helps me"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.sirius = true; + } + if (!modPlayer.sirius) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/SiriusBuff.png b/Buffs/Summon/SiriusBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..b3389bc82509fcffcc044b2545f84fd3511bbeee GIT binary patch literal 559 zcmV+~0?_@5P)UUCS4iu8Hl`NQp1=z;becN9>}#k{4fGxQ&exsV);0dRC2 z4Xl@9T7Q=D_rJSwRRIezv5bYwwh;h4GjG>h1ufiDz-IeTLHoL!19B?itJts1!~^rG zZGXP;cq4Ql<$})1p6)uPfIQtB_noc(t-dYhdcq4wili2NC9Zd}0Cd+JgeoGqqd>Cn z8Gw9x8F+WLz55OT>id0$6Fu=yH;F50YRP2Prnn2bx7_hAXpE#^MZ|ivGwjN zV6$I6oS>W#!$S5KVJ^ltr*w6%3T(`6=VHfCIp5POVx@ga*)Cc5a|I&*{_FS^OZc*y xi*oRg0000IbVXQnMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1jk-{#pP4 literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e21906a828..64ef81094c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -631,6 +631,7 @@ namespace CalamityMod.CalPlayer public bool eAxe = false; public bool endoCooper = false; public bool SPG = false; + public bool sirius = false; public bool aChicken = false; public bool cLamp = false; public bool pGuy = false; @@ -1365,6 +1366,7 @@ namespace CalamityMod.CalPlayer eAxe = false; endoCooper = false; SPG = false; + sirius = false; aChicken = false; cLamp = false; pGuy = false; diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index da76374f2b..f274a58061 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs new file mode 100644 index 0000000000..ae2d1e1855 --- /dev/null +++ b/Items/Weapons/Summon/Sirius.cs @@ -0,0 +1,105 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Items.Placeables.Ores; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class Sirius : ModItem + { + int siriusSlots; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sirius"); + Tooltip.SetDefault("Summons the brightest star in the night sky to shine upon your foes\n" + + "Consumes all of the remaining minion slots on use\n" + + "Increased power based on the number of minion slots used"); + } + + public override void SetDefaults() + { + item.width = 62; + item.height = 62; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.UseSound = SoundID.Item44; + + item.summon = true; + item.mana = 60; + item.damage = 500; + item.knockBack = 3f; + item.autoReuse = true; + item.useTime = 36; + item.useAnimation = 36; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + + item.value = Item.buyPrice(1, 40, 0, 0); + item.rare = 10; + item.Calamity().postMoonLordRarity = 13; + } + + public override bool CanUseItem(Player player) + { + return siriusSlots >= 1; + } + + public override void HoldItem(Player player) + { + double minionCount = 0; + for (int j = 0; j < Main.projectile.Length; j++) + { + if (Main.projectile[j].active && Main.projectile[j].owner == player.whoAmI && Main.projectile[j].minion) + { + minionCount += Main.projectile[j].minionSlots; + } + } + siriusSlots = (int)((double)player.maxMinions - minionCount); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + for (int x = 0; x < Main.projectile.Length; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.active && projectile.owner == player.whoAmI && projectile.type == ModContent.ProjectileType()) + { + projectile.Kill(); + } + } + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, siriusSlots); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 12); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool UseItem(Player player) + { + if (player.altFunctionUse == 2) + { + player.MinionNPCTargetAim(); + } + return base.UseItem(player); + } + } +} diff --git a/Items/Weapons/Summon/Sirius.png b/Items/Weapons/Summon/Sirius.png new file mode 100644 index 0000000000000000000000000000000000000000..7fbaf868385136a7219b4bfacdbf719f94fa1097 GIT binary patch literal 1353 zcmV-P1-AN$P)P4BNob{{G~p3M3#~wac!)|M5Nuc# zv4IU@0h_Wwf*$}9NOS`d?8pXn1*=HFqEv+i0(DUkNRXhUqE#9@1T5k>t{=nV`q;kL zGnt9))NNRaQgl40T_E|3V_c}PC4%P?1{4g)XvNU9X#secfQ&9`^xVh_WQnd%#JU7w=Pyp zA9?UG0B+r%0pOp@IRGyF_?^~XV)%4@`N_u*05EsHqHULDlfcIKHP7l^+1oTLBu8dd zKFXox0Eumhb;;_loLUB&*Mh1?pSxH9)zlpT-1o$B0G8)}vH`x% zeE_r@78<7C{TP6)BliZoa_hVC$%E4X?8&Ig?BATKy)P~;0uYHrEr43B3P5@9^FT|j zUPsIelFdJV=51~L`o4+Kcu(=l+CsWsGjA3)9AkZOP>rSvg**V!Xk4A^&|Ls*#U=qb z`he=cCFV_HM<*?S?4_&P`p|f{h-ojAK8~ryzQlTNb-@A{zik$PYPGC>>)Ae?QYA@g z{WtBnwSEyRO{aOp7r=%n7;G1#N#fB-R<5v7u>NvOUE=04NpFYJI5y zBUe`(|8Hn~r--R&G!C?zmVR08d~zUV0hG3i+WswQvALF2qq5O`YLqrgMq6Jfcu_%bK zcsywV*tQbvmJ7@py#=%1w_Eo!+e=Ov9vQU&^6P7k=NlT|EfR?VEtV@4RWpkz`IY{+ z#o)FTo;)EfXzj(c)C(q|aW~wuxry|zf@J6YZ=3>}v!F8j`P88ofMzamFbK3)c$sUVd1U;!wk$?BjrZAp35|Qubyk;AlGM&(UQB;` z?oz#_ZeHfZq?_Ii~*F7B@cN^%Z?x@V`tnEW>!p?_M9UG=_Z$Y?`}b}MtZ~@F-L1={~l)b4)GJ?jx}*Atqc@5Hymd-O-%D)BnQoj@t9eYOYLobTPhWq8S`%AZ!g547~N^?cS~T6Thn(x z477hIZpO6NyC{=hS6aO$xW+T}Z%f=NGPCx+-c9-?u*Mseo7>#h&1PB%tZ{4d_WObM zZ&J)G9vZ(%_#b(!Bm#q{CS3pk01|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000 LNkvXXu0mjfDOs3l literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/SiriusBeam.cs b/Projectiles/Summon/SiriusBeam.cs new file mode 100644 index 0000000000..d8b4f32b88 --- /dev/null +++ b/Projectiles/Summon/SiriusBeam.cs @@ -0,0 +1,54 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.Buffs.DamageOverTime; + +namespace CalamityMod.Projectiles.Summon +{ + public class SiriusBeam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Beam"); + } + + public override void SetDefaults() + { + projectile.width = 4; + projectile.height = 4; + projectile.friendly = true; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.extraUpdates = 100; + projectile.timeLeft = 1000; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 9f) + { + for (int num447 = 0; num447 < 4; num447++) + { + Vector2 vector33 = projectile.position; + vector33 -= projectile.velocity * ((float)num447 * 0.25f); + projectile.alpha = 255; + int num448 = Dust.NewDust(vector33, 1, 1, 20, 0f, 0f, 0, default, 1f); + Main.dust[num448].position = vector33; + Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; + Main.dust[num448].velocity *= 0.2f; + Main.dust[num448].noGravity = true; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + float x4 = Main.rgbToHsl(new Color(103, 203, Main.DiscoB)).X; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, x4, (float)projectile.whoAmI); + } + } +} diff --git a/Projectiles/Summon/SiriusBeam.png b/Projectiles/Summon/SiriusBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..15e877573779272f931ab67d818cf9f2b8911a17 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=*pj^6T^Rm@;DWu&Cj&(|3p^r= z85sBugD~Uq{1qucLG}_)Usv`AZ0utE^0#a@0p%D(JY5_^IIbuE`TyUZ*(f2&fw_g1 Y;aDFttLt^E7eILiPgg&ebxsLQ0Jwf72LJ#7 literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/SiriusExplosion.cs b/Projectiles/Summon/SiriusExplosion.cs new file mode 100644 index 0000000000..53ade646db --- /dev/null +++ b/Projectiles/Summon/SiriusExplosion.cs @@ -0,0 +1,237 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.Buffs.DamageOverTime; +namespace CalamityMod.Projectiles.Summon +{ + public class SiriusExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 14; + projectile.alpha = 255; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.timeLeft = 900; + projectile.minion = true; + } + + public override void AI() + { + Color newColor2 = Main.hslToRgb(0.5f, 1f, projectile.ai[0]); + int num978 = (int)projectile.ai[1]; + if (num978 < 0 || num978 >= 1000 || (!Main.projectile[num978].active && Main.projectile[num978].type != ModContent.ProjectileType())) + { + projectile.ai[1] = -1f; + } + else + { + DelegateMethods.v3_1 = newColor2.ToVector3() * 0.5f; + Utils.PlotTileLine(projectile.Center, Main.projectile[num978].Center, 8f, new Utils.PerLinePoint(DelegateMethods.CastLight)); + } + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = Main.rand.NextFloat() * 0.8f + 0.8f; + projectile.direction = (Main.rand.Next(2) > 0) ? 1 : -1; + } + projectile.rotation = projectile.localAI[1] / 40f * 6.28318548f * (float)projectile.direction; + if (projectile.alpha > 0) + { + projectile.alpha -= 8; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + if (projectile.alpha == 0) + { + Lighting.AddLight(projectile.Center, newColor2.ToVector3() * 0.5f); + } + int num3; + for (int num979 = 0; num979 < 2; num979 = num3 + 1) + { + if (Main.rand.NextBool(10)) + { + Vector2 value55 = Vector2.UnitY.RotatedBy((double)((float)num979 * 3.14159274f), default).RotatedBy((double)projectile.rotation, default); + Dust dust24 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)]; + dust24.noGravity = true; + dust24.noLight = true; + dust24.scale = projectile.Opacity * projectile.localAI[0]; + dust24.position = projectile.Center; + dust24.velocity = value55 * 2.5f; + } + num3 = num979; + } + for (int num980 = 0; num980 < 2; num980 = num3 + 1) + { + if (Main.rand.NextBool(10)) + { + Vector2 value56 = Vector2.UnitY.RotatedBy((double)((float)num980 * 3.14159274f), default); + Dust dust25 = Main.dust[Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 225, newColor2, 1.5f)]; + dust25.noGravity = true; + dust25.noLight = true; + dust25.scale = projectile.Opacity * projectile.localAI[0]; + dust25.position = projectile.Center; + dust25.velocity = value56 * 2.5f; + } + num3 = num980; + } + if (Main.rand.NextBool(10)) + { + float scaleFactor13 = 1f + Main.rand.NextFloat() * 2f; + float fadeIn = 1f + Main.rand.NextFloat(); + float num981 = 1f + Main.rand.NextFloat(); + Vector2 vector136 = Utils.RandomVector2(Main.rand, -1f, 1f); + if (vector136 != Vector2.Zero) + { + vector136.Normalize(); + } + vector136 *= 20f + Main.rand.NextFloat() * 100f; + Vector2 vector137 = projectile.Center + vector136; + Point point3 = vector137.ToTileCoordinates(); + bool flag52 = true; + if (!WorldGen.InWorld(point3.X, point3.Y, 0)) + { + flag52 = false; + } + if (flag52 && WorldGen.SolidTile(point3.X, point3.Y)) + { + flag52 = false; + } + if (flag52) + { + Dust dust26 = Main.dust[Dust.NewDust(vector137, 0, 0, 267, 0f, 0f, 127, newColor2, 1f)]; + dust26.noGravity = true; + dust26.position = vector137; + dust26.velocity = -Vector2.UnitY * scaleFactor13 * (Main.rand.NextFloat() * 0.9f + 1.6f); + dust26.fadeIn = fadeIn; + dust26.scale = num981; + dust26.noLight = true; + Dust dust27 = Dust.CloneDust(dust26); + Dust dust = dust27; + dust.scale *= 0.65f; + dust = dust27; + dust.fadeIn *= 0.65f; + dust27.color = new Color(255, 255, 255, 255); + } + } + projectile.scale = projectile.Opacity / 2f * projectile.localAI[0]; + projectile.velocity = Vector2.Zero; + projectile.localAI[1] += 1f; + if (projectile.localAI[1] >= 60f) + { + projectile.Kill(); + return; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Color color25 = Lighting.GetColor((int)((double)projectile.position.X + (double)projectile.width * 0.5) / 16, (int)(((double)projectile.position.Y + (double)projectile.height * 0.5) / 16.0)); + Vector2 vector59 = projectile.position + new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Texture2D texture2D34 = Main.projectileTexture[projectile.type]; + Rectangle rectangle17 = texture2D34.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame); + Color alpha5 = projectile.GetAlpha(color25); + Vector2 origin11 = rectangle17.Size() / 2f; + Color color60 = Main.hslToRgb(0.5f, 1f, projectile.ai[0]).MultiplyRGBA(new Color(255, 255, 255, 0)); + Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, projectile.rotation, origin11, projectile.scale * 2f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture2D34, vector59, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60, 0f, origin11, projectile.scale * 2f, SpriteEffects.None, 0f); + if (projectile.ai[1] != -1f && projectile.Opacity > 0.3f) + { + Vector2 vector61 = Main.projectile[(int)projectile.ai[1]].Center - projectile.Center; + Vector2 vector62 = new Vector2(1f, vector61.Length() / (float)texture2D34.Height); + float rotation27 = vector61.ToRotation() + 1.57079637f; + float num279 = MathHelper.Distance(30f, projectile.localAI[1]) / 20f; + num279 = MathHelper.Clamp(num279, 0f, 1f); + if (num279 > 0f) + { + Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), color60 * num279, rotation27, origin11, vector62, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture2D34, vector59 + vector61 / 2f, new Microsoft.Xna.Framework.Rectangle?(rectangle17), alpha5 * num279, rotation27, origin11, vector62 / 2f, SpriteEffects.None, 0f); + } + } + return false; + } + + public override void Kill(int timeLeft) + { + Vector2 spinningpoint = new Vector2(0f, -3f).RotatedByRandom(3.1415927410125732); + float num69 = (float)Main.rand.Next(7, 13); + Vector2 value5 = new Vector2(2.1f, 2f); + Color newColor = Main.hslToRgb(0.5f, 1f, projectile.ai[0]); + newColor.A = 255; + float num72; + for (float num70 = 0f; num70 < num69; num70 = num72 + 1f) + { + int num71 = Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f); + Main.dust[num71].position = projectile.Center; + Main.dust[num71].velocity = spinningpoint.RotatedBy((double)(6.28318548f * num70 / num69), default) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f); + Main.dust[num71].noGravity = true; + Main.dust[num71].scale = 2f; + Main.dust[num71].fadeIn = Main.rand.NextFloat() * 2f; + Dust dust11 = Dust.CloneDust(num71); + Dust dust = dust11; + dust.scale /= 2f; + dust = dust11; + dust.fadeIn /= 2f; + dust11.color = new Color(255, 255, 255, 255); + num72 = num70; + } + for (float num73 = 0f; num73 < num69; num73 = num72 + 1f) + { + int num74 = Dust.NewDust(projectile.Center, 0, 0, 267, 0f, 0f, 0, newColor, 1f); + Main.dust[num74].position = projectile.Center; + Main.dust[num74].velocity = spinningpoint.RotatedBy((double)(6.28318548f * num73 / num69), default) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f); + Dust dust = Main.dust[num74]; + dust.velocity *= Main.rand.NextFloat() * 0.8f; + Main.dust[num74].noGravity = true; + Main.dust[num74].scale = Main.rand.NextFloat() * 1f; + Main.dust[num74].fadeIn = Main.rand.NextFloat() * 2f; + Dust dust12 = Dust.CloneDust(num74); + dust = dust12; + dust.scale /= 2f; + dust = dust12; + dust.fadeIn /= 2f; + dust12.color = new Color(255, 255, 255, 255); + num72 = num73; + } + if (Main.myPlayer == projectile.owner) + { + projectile.friendly = true; + int width = projectile.width; + int height2 = projectile.height; + int num75 = projectile.penetrate; + projectile.position = projectile.Center; + projectile.width = projectile.height = 60; + projectile.Center = projectile.position; + projectile.penetrate = -1; + projectile.maxPenetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + projectile.penetrate = num75; + projectile.position = projectile.Center; + projectile.width = width; + projectile.height = height2; + projectile.Center = projectile.position; + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + } +} diff --git a/Projectiles/Summon/SiriusExplosion.png b/Projectiles/Summon/SiriusExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..0968156e79f880c08816086f5cac6b8bd7c93d37 GIT binary patch literal 3066 zcmVPx#1ZP1_K>z@;j|==^1poj6BT!6KMF0Q*0s;a90|NvE1O){J1_lNQ2nY!Y2@4Ag z3=9m##l;N`4Gsz?O-)TuP*7AN$ts000VgNkl*~!l*IaYW zHH{nTuMEFeLHq9eBmJduSpr?eK9?faLHdj2%6)9sa1q7tmGdCTaPwP`;abl9R$Zz< zRfMy!L%=I7(9T>#ac%@Z0(^Fj!ki4Zn7L`^BG!2bwCctT1&QYDtqP5r5MzQ}wy!seR#$pxP^AFg@x=FNZbPoF;h zBi@Iu!r*EfGTsu(^9rj4a?wj!B@X-)svLkg z@S$|DIInKU;o;%!TeoiA4j=B;?M%6GAM@~DYoTo9=J4H?-JXzXdJm2X83O&2XR0g_ zXe*I78x|8qOOP4|K9Gdrz}4srL5?DB0ueKoLe*IF$whAJaBlYW-pN*t`>i7rNjfCKY#uwzKN1wvF`ysz#EML-(tl09hqS)*6KawHRPzq9^sov zVVtSe)Me^w#^<=9&o;_pfd+{i+3(Lwdy?rTjy(s&V;nwh@&+;Hc_~tR4~5}*5I5uO z+8hzQe=OIb>7&~*p1JtKfPyK;NzqaX@PV~i?$;&7;--5TuZ=ty3PN62~l zn6b|55ejhvi3IF}<^H0^nQ}E#0xe3I1+*f7zN}dVBTh9AXXC&j(jPM27Aa1 z3*+@wBs`)NFQ|()wLqk)HLezGZ-GEt4nP!D7NkJ>m|2`aHzND=e#vya%VZ}fCu%ds zI$M{jeZA{u5{I>$8zo2t_QwOU67FVHxWxi_uk<8y5i+1q4MsZ)Z`VH#qZhS(Ir!wa z7=kj6AxyQ%;oRB_r;QUrEK{le3z$ zzj*QDZ;u~8{)OK@(YLvG@1FMj^y!n@@jm+H$&)94dH3$!-=kaaMg24$kX`=uteAf? z9{!z3|FeLg^i49R;_PP>RZ^rLrJvAG(H}dBhmy33Gu1NaBAE3X> zati$!&N3#@tg1s?geofHB<+UjG${_|U(SynJ(3x>Jzm!PV?|DA?;LwN)hdvaekCuA z^$nSwu#4DRLS!s75M)y)qY$8N7|f}&WR8|6P@5bBR^=UGYwc=*TmV(7V*vfYJfJT_ zK{KcPbocJv4K_u*r)0U*x1))GPkObeBgkf}d5GUnyI3vI6fQoSJ(j!-uLxUpE)u9d z0Uvg#KJ6I7wQmj3V31AP8U6V2`Sa%uHpRDZ-(z2U$L5`Em4P&=!Qj9vrnhYnI{Ur_c9mI>6w!L4@jstxi^VMAX+t)H<KYR3@qk< z$yj1x;It;t5XOT4GB4LR z!N{9?oaDZKI0{`%rgE+AMlEHvK;8ssQbdF@7l@C-+dXWlo^2#ool^X0EP@6f|)# zA1>kuyPL$J>ql$|;>8-~AyE6MSrnW1#3Ka6^4_iPGOlOUJ1936Y})PJe^Sf|RB+Hl zBIaNSgZbbbS_uRHayE>44#s*6ksW(4ykpma&s19vb}35)n!H8fR0PG)EQNxK4J1rj z`-u49cyf)wSeV{HB}e@Ylw0T))d!Z5=-nRXWw?mZzmts6o9AD{{4(apaeDtsZvT&- zHr~Ig6SeWVru~|K{rdI4@z0(;`x(#Sbixndyb0~27Jd5IbQ$&EUhTFqhc)(@7ur|5iKW_`TDnZ9#Jr(6 zx@lcF%~F9zH*_IrLkwAnpSBJ_UxaZ!(cVYI9Nb1OAZFZi?9=>WR?aZJm}6NJCuxE( zH^bHJb%QEYlD;QW(5^i(7PK2hgShr9Vc_;q6kEwBaez3N_iD+mA+tBftPzN$y~GrT z&sv}r2GotyNdnqw^hp53${W%IavyW5v5Ym$jdpwAbh|aw?lPV2_Q08MP%S{^ZHojw zp*SRte!MNyD5v`fbDk6>PfU^cpiMg1cTSwGhdjs9Z?Q2(zuACqr}XM8?e_N|n))Zl zrYHxN=g{sezTIRzjEDnmd?`DNTR?Ap6$yNJbWuk@A7pd(59dB;5u+V4!X`rPKQD3M ztOCJSjwzuaLXFiv(); + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + player.AddBuff(ModContent.BuffType(), 3600); + if (flag64) + { + if (player.dead) + { + modPlayer.sirius = false; + } + if (modPlayer.sirius) + { + projectile.timeLeft = 2; + } + } + projectile.minionSlots = projectile.ai[0]; + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2) + player.gfxOffY - 60f; + if (player.gravDir == -1f) + { + projectile.position.Y = projectile.position.Y + 150f; + projectile.rotation = 3.14f; + } + else + { + projectile.rotation = 0f; + } + projectile.position.X = (float)(int)projectile.position.X; + projectile.position.Y = (float)(int)projectile.position.Y; + float num395 = (float)Main.mouseTextColor / 200f - 0.35f; + num395 *= 0.2f; + projectile.scale = num395 + 0.95f; + if (projectile.localAI[0] == 0f) + { + projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + int num501 = 50; + for (int num502 = 0; num502 < num501; num502++) + { + int num503 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 20, 0f, 0f, 0, default, 1f); + Main.dust[num503].velocity *= 2f; + Main.dust[num503].scale *= 1.15f; + } + projectile.localAI[0] += 1f; + } + if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = damage2; + } + if (projectile.owner == Main.myPlayer) + { + if (projectile.ai[1] != 0f) + { + projectile.ai[1] -= 1f; + return; + } + float num396 = projectile.position.X; + float num397 = projectile.position.Y; + float num398 = 700f; + bool flag11 = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num539 = npc.position.X + (float)(npc.width / 2); + float num540 = npc.position.Y + (float)(npc.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + { + num396 = num539; + num397 = num540; + flag11 = true; + } + } + } + else + { + for (int num399 = 0; num399 < Main.npc.Length; num399++) + { + if (Main.npc[num399].CanBeChasedBy(projectile, true)) + { + float num400 = Main.npc[num399].position.X + (float)(Main.npc[num399].width / 2); + float num401 = Main.npc[num399].position.Y + (float)(Main.npc[num399].height / 2); + float num402 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num400) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num401); + if (num402 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num399].position, Main.npc[num399].width, Main.npc[num399].height)) + { + num398 = num402; + num396 = num400; + num397 = num401; + flag11 = true; + } + } + } + } + if (flag11) + { + float num403 = 35f; + Vector2 vector29 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num404 = num396 - vector29.X; + float num405 = num397 - vector29.Y; + float num406 = (float)Math.Sqrt((double)(num404 * num404 + num405 * num405)); + num406 = num403 / num406; + num404 *= num406; + num405 *= num406; + float damageMult = ((float)Math.Log(projectile.ai[0], MathHelper.E)) + 1f; + int beam = Projectile.NewProjectile(projectile.Center.X - 4f, projectile.Center.Y, num404, num405, ModContent.ProjectileType(), (int)(projectile.damage * damageMult), projectile.knockBack, projectile.owner); + Main.projectile[beam].penetrate = (int)projectile.ai[0]; + projectile.ai[1] = 30f; + } + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(200, 200, 200, 200); + } + + public override bool CanDamage() + { + return false; + } + } +} diff --git a/Projectiles/Summon/SiriusMinion.png b/Projectiles/Summon/SiriusMinion.png new file mode 100644 index 0000000000000000000000000000000000000000..a2b6f1bc7dd87fb57ce8555b857c8a93bb112968 GIT binary patch literal 677 zcmV;W0$TlvP)O~O$gExs#1W$$d z5Bvjq6-uF!TmOR;yy!)t6vTjFsGqT-5o(NyWj*Y^F*8l-epFbOeJ;B*J3E;?JMTM_ zje$=Fr_yq2+D8Lm_v^H;exLar*kch5%q@*xZ)_V$Stku;>-Z<8l;wJUd&yJ(;WH-W zcYc}xL(`K0WYVijbb7^=vF@Sy$I(**SH?~I}jQ0VMNjvTB--Kt5Nv1CsF95jO zKL;Q=YIU`2w@VBT0MPN)YVUR>2#>MC=`jGM%YqV(f*zgmMA1`phR4`#@meWMH0ouE zPQATT0&C3i^Ov=+ceodT+}>{!V14UD&GuvOJ_FD-@X`P{+&KiCubofNSY`KMqnn!h zlmzbcm(I%OEda~2D>cmt^$Z5zm~N=Krvre}dD*P4f5_BB=7e~A%m64HpDFcXFu2Al zzjExIr|ho;$>d*B{r}|yXO^-6WYVijecSLG>*?7$;XoTx40XM?%t!`zI+xrcbMM>Q z0RXv;ta3fj#;mhwjyWUBW1fxaL~Es6V>;1(%*JtAmv0(xT~O*}F3DVzvheHZO1a-D zPv2POhNc$)lx_;Z{aTkC?N`crd$)wgSaW9&0I}8!1FGJKrL5?bHL&G%y8#eudgW;qtP$nH6}aH+(y={E}wn>;j7=k8uRro z9-@EWf^{M1lDq%_01|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000 LNkvXXu0mjf)Z#p! literal 0 HcmV?d00001