From 015abc5fbf8e39e9562e2b8a582c08f71fe43cba Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 18 Mar 2020 20:53:42 -0500 Subject: [PATCH] Brimmy summon --- Buffs/Summon/DormantBrimseekerBuff.cs | 36 +++ Buffs/Summon/DormantBrimseekerBuff.png | Bin 0 -> 584 bytes Items/TreasureBags/BrimstoneWaifuBag.cs | 2 + Items/Weapons/Summon/DormantBrimseeker.cs | 58 +++++ Items/Weapons/Summon/DormantBrimseeker.png | Bin 0 -> 650 bytes ModSupport/WeakReferenceSupport.cs | 3 +- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 2 + Projectiles/Summon/BrimseekerAuraBall.cs | 82 +++++++ Projectiles/Summon/BrimseekerAuraBall.png | Bin 0 -> 191 bytes Projectiles/Summon/DormantBrimseekerAura.cs | 115 +++++++++ Projectiles/Summon/DormantBrimseekerAura.png | Bin 0 -> 650 bytes Projectiles/Summon/DormantBrimseekerBab.cs | 227 ++++++++++++++++++ Projectiles/Summon/DormantBrimseekerBab.png | Bin 0 -> 2518 bytes .../Summon/DormantBrimseekerSummoner.cs | 54 +++++ .../Summon/DormantBrimseekerSummoner.png | Bin 0 -> 650 bytes 15 files changed, 578 insertions(+), 1 deletion(-) create mode 100644 Buffs/Summon/DormantBrimseekerBuff.cs create mode 100644 Buffs/Summon/DormantBrimseekerBuff.png create mode 100644 Items/Weapons/Summon/DormantBrimseeker.cs create mode 100644 Items/Weapons/Summon/DormantBrimseeker.png create mode 100644 Projectiles/Summon/BrimseekerAuraBall.cs create mode 100644 Projectiles/Summon/BrimseekerAuraBall.png create mode 100644 Projectiles/Summon/DormantBrimseekerAura.cs create mode 100644 Projectiles/Summon/DormantBrimseekerAura.png create mode 100644 Projectiles/Summon/DormantBrimseekerBab.cs create mode 100644 Projectiles/Summon/DormantBrimseekerBab.png create mode 100644 Projectiles/Summon/DormantBrimseekerSummoner.cs create mode 100644 Projectiles/Summon/DormantBrimseekerSummoner.png diff --git a/Buffs/Summon/DormantBrimseekerBuff.cs b/Buffs/Summon/DormantBrimseekerBuff.cs new file mode 100644 index 0000000000..ba461e80fe --- /dev/null +++ b/Buffs/Summon/DormantBrimseekerBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class DormantBrimseekerBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Dormant Brimseeker"); + Description.SetDefault("Does it want something from you?"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.brimseeker = true; + } + if (!modPlayer.brimseeker) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/DormantBrimseekerBuff.png b/Buffs/Summon/DormantBrimseekerBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..b4ef01bb0d064c2a6b4846aa6eb1b522def90268 GIT binary patch literal 584 zcmV-O0=NB%P)Px%0!c(cR9J=8mrZL^K^TRfTNIMo(1=mn3bqisxadl#*o7{oi}pW=TcP05g;K0hqWo4#16@wzl{04gmPr*!Kp0c)bF^XnPlcwfq18 zjqjWPG;yu<28cj`b9xYS;qjcUaC7IISN||)alf7S>OgbiVkrVF+czto{Rl%AnQD`Q-5-bDjU+v!svs6%e+{ zwili@+&v)hd@-C6n%ch2 zvfdmngdA_#mB-Ip)Tt8UQJ~qfY&JY(d0k5UFEm>36?DTAPF;cIwEm7ug;E@U$3FpG W>7U5(SR5??0000(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/Weapons/Summon/DormantBrimseeker.cs b/Items/Weapons/Summon/DormantBrimseeker.cs new file mode 100644 index 0000000000..b617a29f4f --- /dev/null +++ b/Items/Weapons/Summon/DormantBrimseeker.cs @@ -0,0 +1,58 @@ +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class DormantBrimseeker : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dormant Brimseeker"); + Tooltip.SetDefault("Summons a brimseeker to keep you company\n" + + "'You could’ve sworn that they turned even scarier when you looked at their reflections in a mirror'"); + } + + public override void SetDefaults() + { + item.damage = 97; + item.mana = 12; + item.width = item.height = 32; + item.useTime = item.useAnimation = 25; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.noUseGraphic = true; + item.knockBack = 3f; + item.UseSound = SoundID.Item20; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + + item.value = Item.buyPrice(0, 36, 0, 0); + item.rare = 5; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float totalSlots = 0f; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].minion && Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) + { + totalSlots += Main.projectile[i].minionSlots; + } + } + if (totalSlots < player.maxMinions) + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + } + else if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0f) + { + Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); + } + return false; + } + } +} diff --git a/Items/Weapons/Summon/DormantBrimseeker.png b/Items/Weapons/Summon/DormantBrimseeker.png new file mode 100644 index 0000000000000000000000000000000000000000..05cc154fbb4e2271e70cfc7bab202fbe96995f00 GIT binary patch literal 650 zcmV;50(Jd~P)Px%L`g(JR7i=q@8V=^ff1P7suQqa{w7e~QDTtzo0 z*9s2)1O5X#Xq-h5l!AltN3aS}NLosYNdsx}98ON-c_wWGg_rO2?tS;(0JlfKsb%`b!&M23dyCK%);(Bl>W6avXrU#8l6L#kDd3%hkHsp>xr3Cr@c$ z|Kx!Yy9mHMs|XSeq#LG#NYMI&BZ&_RY%x zJb6?w9q;?1zF>pDU50 z=6${(1b&B8DXE_Fd{z2~hgj7mmzYnxQ3sH3uA3kyN212z`jPuJe8j39@@{=~023|@ zKxMmTNEclNfEPdQDb8X&e0YgfO0Idn>9y=B@7zcfOi5LGx(); int summon = ItemType(); - List loot = new List() { ItemType(), ItemID.SoulofFright, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; + List loot = new List() { ItemType(), ItemID.SoulofFright, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.GreaterHealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use a [i:{summon}] in the Brimstone Crag"; string despawn = CalamityUtils.ColorMessage("Brimstone Elemental withdraws to the ruins of her shrine.", new Color(0xDC, 0x14, 0x3C)); @@ -741,6 +741,7 @@ namespace CalamityMod sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); + sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), ProjectileType()); sAssociation.Call("AddMinionInfo", ItemType(), BuffType(), new List() { ProjectileType(), ProjectileType(), ProjectileType()}, new List() {1f-0.6666666f, 0.3333333f, 0.3333333f}); //Entropy's Vigil is a bruh moment diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index a1922433af..c652f756b7 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -9,6 +9,7 @@ using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -192,6 +193,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental // Weapons DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Equipment DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); diff --git a/Projectiles/Summon/BrimseekerAuraBall.cs b/Projectiles/Summon/BrimseekerAuraBall.cs new file mode 100644 index 0000000000..76cac58488 --- /dev/null +++ b/Projectiles/Summon/BrimseekerAuraBall.cs @@ -0,0 +1,82 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class BrimseekerAuraBall : ModProjectile + { + public static float MovementSpeed = 4f; + public static float RotationalSpeed = 0.08f; + public bool initialized = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Seeker"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.tileCollide = false; + } + + public override void AI() + { + if (!initialized) + { + projectile.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi); + projectile.localAI[1] = Main.rand.NextFloat(-RotationalSpeed, RotationalSpeed); + initialized = true; + } + projectile.tileCollide = false; + + Projectile parent = Main.projectile[(int)projectile.ai[0]]; + + if (parent.active) + { + Vector2 positionDelta = new Vector2(0, projectile.localAI[0]); + positionDelta = positionDelta.RotatedBy(projectile.rotation); + + projectile.Center = parent.Center + positionDelta; + projectile.rotation += projectile.localAI[1]; + + if (projectile.timeLeft % 200 / MovementSpeed < 100 / MovementSpeed) + { + projectile.localAI[0] += MovementSpeed; + } + else + { + projectile.localAI[0] -= MovementSpeed; + } + } + else + { + projectile.Kill(); + } + + int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity.Y = -0.15f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 240); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 240); + } + } +} diff --git a/Projectiles/Summon/BrimseekerAuraBall.png b/Projectiles/Summon/BrimseekerAuraBall.png new file mode 100644 index 0000000000000000000000000000000000000000..896fc188109d89fcd38065e11283135f5a879681 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!4OXu#}JL+hIBx&| literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/DormantBrimseekerAura.cs b/Projectiles/Summon/DormantBrimseekerAura.cs new file mode 100644 index 0000000000..772531f5d7 --- /dev/null +++ b/Projectiles/Summon/DormantBrimseekerAura.cs @@ -0,0 +1,115 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class DormantBrimseekerAura : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dormant Brimseeker Aura Projecter"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 30; + projectile.height = 30; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + } + + public override void AI() + { + projectile.rotation = projectile.rotation.AngleLerp(-MathHelper.PiOver4, 0.045f); + projectile.velocity *= 0.975f; + if (Math.Abs(projectile.rotation + MathHelper.PiOver4) < 0.04f) + { + if (projectile.localAI[0] == 0f) + { + Main.PlaySound(SoundID.DD2_EtherianPortalOpen, projectile.Center); + for (int i = 0; i < 30; i++) + { + float angle = 1.4f * (i / 30f) - 0.7f; + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = new Vector2(0f, -14f).RotatedBy(angle); + dust.noGravity = true; + } + for (int i = 0; i < 50; i++) + { + float angle = 2.4f * (i / 50f) - 1.2f; + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = new Vector2(0f, 8f).RotatedBy(angle); + } + projectile.timeLeft = 820; + projectile.localAI[0] = 1f; + } + else + { + if (projectile.localAI[1] < 400f) + { + projectile.localAI[1] += 6f; + } + projectile.ai[1] += MathHelper.ToRadians(1.2f); + for (int i = 0; i < 85; i++) + { + float angle = MathHelper.TwoPi / 85f * i + projectile.ai[1]; + Dust dust = Dust.NewDustPerfect(projectile.Center + angle.ToRotationVector2() * projectile.localAI[1], (int)CalamityDusts.Brimstone); + dust.noGravity = true; + dust.velocity = Vector2.Zero; + if (Main.rand.NextBool(360)) + dust.scale = 1.5f; + } + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && + Main.projectile[i].owner == projectile.owner && Main.projectile[i].localAI[1] == 0f) + { + if (Main.projectile[i].Distance(projectile.Center) < projectile.localAI[1]) + { + for (int j = 0; j < 30; j++) + { + Dust dust = Dust.NewDustPerfect(Main.projectile[i].Center, (int)CalamityDusts.Brimstone); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 7f; + } + Main.projectile[i].localAI[1] = 1f; + Main.PlaySound(SoundID.Item45, Main.projectile[i].Center); + } + } + } + + if (Main.rand.NextBool(50)) + { + int idx = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 120, + 3f, projectile.owner, projectile.whoAmI); + Main.projectile[idx].timeLeft = projectile.timeLeft; + } + } + } + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && + Main.projectile[i].owner == projectile.owner && Main.projectile[i].localAI[1] == 1f) + { + for (int j = 0; j < 30; j++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 7f; + } + Main.PlaySound(SoundID.Item29, Main.projectile[i].Center); + Main.projectile[i].localAI[1] = 0f; + } + } + } + } +} diff --git a/Projectiles/Summon/DormantBrimseekerAura.png b/Projectiles/Summon/DormantBrimseekerAura.png new file mode 100644 index 0000000000000000000000000000000000000000..05cc154fbb4e2271e70cfc7bab202fbe96995f00 GIT binary patch literal 650 zcmV;50(Jd~P)Px%L`g(JR7i=q@8V=^ff1P7suQqa{w7e~QDTtzo0 z*9s2)1O5X#Xq-h5l!AltN3aS}NLosYNdsx}98ON-c_wWGg_rO2?tS;(0JlfKsb%`b!&M23dyCK%);(Bl>W6avXrU#8l6L#kDd3%hkHsp>xr3Cr@c$ z|Kx!Yy9mHMs|XSeq#LG#NYMI&BZ&_RY%x zJb6?w9q;?1zF>pDU50 z=6${(1b&B8DXE_Fd{z2~hgj7mmzYnxQ3sH3uA3kyN212z`jPuJe8j39@@{=~023|@ zKxMmTNEclNfEPdQDb8X&e0YgfO0Idn>9y=B@7zcfOi5LGx(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isProperProjectile) + { + if (player.dead) + { + modPlayer.brimseeker = false; + } + if (modPlayer.brimseeker) + { + projectile.timeLeft = 2; + } + } + + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + if (potentialTarget == null) + { + projectile.rotation = projectile.rotation.AngleTowards(0f, 0.1f); + projectile.direction = projectile.spriteDirection = (projectile.velocity.X < 0).ToDirectionInt(); + projectile.ai[1] += MathHelper.ToRadians(3f); + if (projectile.ai[1] >= MathHelper.Pi * 4f) + { + projectile.ai[1] = 0f; + } + Vector2 destination = player.Center + projectile.ai[1].ToRotationVector2() * new Vector2(1f, (float)Math.Cos(projectile.ai[1])) * 200f; + + projectile.velocity = (projectile.velocity * 18f + projectile.DirectionTo(destination) * 14f) / 20f; + + projectile.frameCounter++; + if (projectile.frameCounter >= 6) + { + projectile.frameCounter = 0; + projectile.frame++; + } + if (projectile.frame >= 4 + (projectile.localAI[1] == 1f).ToInt() * 4) + { + projectile.frame = (projectile.localAI[1] == 1f).ToInt() * 4; + } + + float acceleration = 0.1f; + for (int index = 0; index < Main.projectile.Length; index++) + { + Projectile proj = Main.projectile[index]; + if (index != projectile.whoAmI && + proj.active && proj.owner == projectile.owner && + proj.type == projectile.type && Math.Abs(projectile.position.X - proj.position.X) + Math.Abs(projectile.position.Y - proj.position.Y) < projectile.width) + { + if (projectile.position.X < proj.position.X) + { + projectile.velocity.X -= acceleration; + } + else + { + projectile.velocity.X += acceleration; + } + if (projectile.position.Y < proj.position.Y) + { + projectile.velocity.Y -= acceleration; + } + else + { + projectile.velocity.Y += acceleration; + } + } + } + } + else + { + if (projectile.Distance(potentialTarget.Center) < 1100f && projectile.ai[0] == 0f) + { + Main.PlaySound(SoundID.DD2_DrakinShot, projectile.Center); + projectile.ai[0]++; + float acceleration = (projectile.localAI[1] == 1f) ? 1.6f : 0.8f; + float minSpeed = (projectile.localAI[1] == 1f) ? 13f : 8f; + float maxSpeed = (projectile.localAI[1] == 1f) ? 21f : 18f; + projectile.velocity = projectile.DirectionTo(potentialTarget.Center) * MathHelper.Clamp(projectile.velocity.Length() + acceleration, minSpeed, maxSpeed); + projectile.rotation = projectile.AngleTo(potentialTarget.Center) + (projectile.spriteDirection == 1).ToInt() * MathHelper.Pi; + } + else if (projectile.ai[0] > 0) + { + projectile.ai[0]++; + SeekingTarget = false; + } + else if (projectile.Distance(potentialTarget.Center) >= 1100f) + { + projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(potentialTarget.Center) + (projectile.spriteDirection == 1).ToInt() * MathHelper.Pi, 0.1f); + projectile.velocity = projectile.DirectionTo(potentialTarget.Center) * MathHelper.Clamp(projectile.velocity.Length() + 2f, 6f, 15f); + SeekingTarget = true; + projectile.ai[0] = 0f; + } + + if (projectile.ai[0] >= MaxChargeTime) + { + projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(potentialTarget.Center) + (projectile.spriteDirection == 1).ToInt() * MathHelper.Pi, 0.1f); + } + + projectile.frameCounter++; + if (projectile.frameCounter >= 6) + { + projectile.frameCounter = 0; + projectile.frame++; + } + if (projectile.frame >= 8) + { + projectile.frame = 4; + } + + if (projectile.ai[0] >= MaxChargeTime + TurnTime) + projectile.ai[0] = 0f; + } + Lighting.AddLight(projectile.Center, Color.Red.ToVector3()); + } + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + if ((projectile.ai[0] > 0f && projectile.ai[0] <= MaxChargeTime && projectile.velocity.Length() >= 8f) || SeekingTarget) + { + Texture2D projectileTexture = ModContent.GetTexture(Texture); + Texture2D flameTexture = Main.extraTexture[55]; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + float completionRatio = projectile.ai[0] / 30f; + if (projectile.ai[0] > 30f) + completionRatio = 1f - (30f - projectile.ai[0]) / 30f; + + Vector2 modifiedProjectileTexture = new Vector2(projectileTexture.Width / 2,projectileTexture.Height / Main.projFrames[projectile.type] / 2); + for (int oldPositionDrawIndex = 6; oldPositionDrawIndex >= 0; oldPositionDrawIndex--) + { + Color drawColor = Color.Lerp(Color.LightGoldenrodYellow, new Color(142, 24, 67), completionRatio); + drawColor = Color.Lerp(drawColor, new Color(142, 24, 67), oldPositionDrawIndex / 9.7f); + drawColor.A = (byte)(64f * completionRatio); + drawColor.R = (byte)(drawColor.R * (10 - oldPositionDrawIndex) / 20); + drawColor.G = (byte)(drawColor.G * (10 - oldPositionDrawIndex) / 20); + drawColor.B = (byte)(drawColor.B * (10 - oldPositionDrawIndex) / 20); + drawColor.A = (byte)(drawColor.A * (10 - oldPositionDrawIndex) / 20); + drawColor *= completionRatio; + int yFrame = ((int)projectile.ai[0] / 2 - oldPositionDrawIndex) % 4; + if (yFrame < 0) + { + yFrame += 4; + } + Rectangle flameFrameRectangle = flameTexture.Frame(1, 4, 0, yFrame); + Vector2 flameOrigin = new Vector2(flameTexture.Width / 2, flameTexture.Height / 8 + 14); + spriteBatch.Draw(flameTexture, + new Vector2(projectile.oldPos[oldPositionDrawIndex].X - Main.screenPosition.X + projectile.width / 2 - projectileTexture.Width * projectile.scale / 2f + modifiedProjectileTexture.X * projectile.scale, projectile.oldPos[oldPositionDrawIndex].Y - Main.screenPosition.Y + projectile.height - projectileTexture.Height * projectile.scale / Main.projFrames[projectile.type] + 4f + modifiedProjectileTexture.Y * projectile.scale + projectile.gfxOffY), + new Rectangle?(flameFrameRectangle), + drawColor, + projectile.oldRot[oldPositionDrawIndex] + projectile.oldSpriteDirection[oldPositionDrawIndex] * MathHelper.PiOver2, + flameOrigin, + MathHelper.Lerp(0.1f, 1.2f, (10f - oldPositionDrawIndex) / 10f), + spriteEffects, + 0f); + } + } + } + } +} diff --git a/Projectiles/Summon/DormantBrimseekerBab.png b/Projectiles/Summon/DormantBrimseekerBab.png new file mode 100644 index 0000000000000000000000000000000000000000..2413c37fc8b3fb849a6de671b5cb7bcca3b77a10 GIT binary patch literal 2518 zcmeH||2xxb7{@=#hPBPNO0CVPNaaW;YNX`rwz9>BqA1cqG@l_7MaE2vRrEz$MM>p^ z`F5;E8rHg!tmHy=YD{%#`C3^TJF9b@f8w0(>w2#Hd7k^1`+2`#_x0rZlJN)_3I+fG zf=KYBXtNyv=ve5_*Y4D)YLPbSBvA0~K;<*^u=b!E=|*w`fNIVHbr=Ky<^#Sy{$ASq zWyaPvOYFlIJGo=MPFdJjICv{|?womYT3h-VKNa|IE3meMuALkmAdy0*YX08=P^a~* zv~C-KgrEcfK(>BgI+D2C5dZ+85|v|Xr|K!X^gvIPEDDnDa#d&_<+A6SN-+_6k=a99$IWM&BcXu1deWrgMhV09 zTAYVLQ=@dyW|aSa;{DX;BT}w|%e71n9)0CCa_-BQ2g9s>l1bb1%VLc>B~=lAyF~~0 znDw5H8XMElU>O{+DY=iwcq zzTc+{A6(dfSvR)l(nkP83fOv zGPgJYeP*&IBKeJ7s!)X!t_!fCaqN@n&OwPgdLLusSXIxZqE2q!i+3H7HQzf715sHX z81w7u*Jwy{sQT{K&;_4k z^8(E}4>RqC;`_{QN?S#{XQ}jN!*B|msO1knV2z(vcfG6U&mGOM256~|?E7uLWF zGriWIu||5XdUA0p>Q)JZ>RXLjnHiOk_!kC!sUR&Ms(1Rd_63^(L*3}5d-@#6reW*r z(V?ul6q&`MqakXkvpFcgYBeI?NX7Fg?P1BF^I!qLJwh3g4DQRmE>M=qA8t873E@F8 zHv5OnGO~~TV2&`h3Di@pSn(?IDC8gJw6^V>!SEcOuaNZjFKGF<<-8u80%S#T752i2@e|P$Vug9Lz@(bAdyEIvh#ey7qH}U(MJ<# zG9CK)j=8z3g;Ce7HMHO<+>W!?%G+EU7(^cUDRiYf$|u$gTiXx~dbq0>jmkr5v zznU3LgINbZ9iLOy*^Fc*(X*^Jq2Y3assSy6fxoM!gIhbzTw@@e?)3o`f6N@EZAi4d z*uHf~37b(pROp}Qcz0k<*T-*f&;y<6@wB_6N~402kLS8JbKbbth>0r(>_V}<^$B~2C=-?dKa#`YK!-kA`mXK9T(E|2nKg+vG?^E`KG_Db92Ui_K8o**TI$o{IUZTA9-hTgK NiC$#SO85Ple*=u!)_VW| literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/DormantBrimseekerSummoner.cs b/Projectiles/Summon/DormantBrimseekerSummoner.cs new file mode 100644 index 0000000000..9c82495d12 --- /dev/null +++ b/Projectiles/Summon/DormantBrimseekerSummoner.cs @@ -0,0 +1,54 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class DormantBrimseekerSummoner : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dormant Brimseeker"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.friendly = true; + projectile.width = 30; + projectile.height = 30; + projectile.minion = true; + projectile.minionSlots = 0f; + projectile.ignoreWater = true; + projectile.tileCollide = true; + } + + public override void AI() + { + projectile.rotation = projectile.rotation.AngleLerp(-MathHelper.PiOver4, 0.045f); + projectile.velocity *= 0.975f; + if (projectile.ai[0]++ == 110f) + { + Main.PlaySound(SoundID.Item100, projectile.Center); + } + if (projectile.ai[0]++ >= 90f) + { + for (int i = 0; i < (180 - (int)projectile.ai[0]) / 2; i++) + { + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.Brimstone); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1f, 4f); + dust.noGravity = true; + } + projectile.alpha = (int)(255 * (projectile.ai[0] - 90f) / 90f); + } + if (projectile.ai[0] >= 180f) + { + Projectile.NewProjectile(projectile.Center, Vector2.UnitY * 7f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, + projectile.owner); + projectile.Kill(); + } + } + } +} diff --git a/Projectiles/Summon/DormantBrimseekerSummoner.png b/Projectiles/Summon/DormantBrimseekerSummoner.png new file mode 100644 index 0000000000000000000000000000000000000000..05cc154fbb4e2271e70cfc7bab202fbe96995f00 GIT binary patch literal 650 zcmV;50(Jd~P)Px%L`g(JR7i=q@8V=^ff1P7suQqa{w7e~QDTtzo0 z*9s2)1O5X#Xq-h5l!AltN3aS}NLosYNdsx}98ON-c_wWGg_rO2?tS;(0JlfKsb%`b!&M23dyCK%);(Bl>W6avXrU#8l6L#kDd3%hkHsp>xr3Cr@c$ z|Kx!Yy9mHMs|XSeq#LG#NYMI&BZ&_RY%x zJb6?w9q;?1zF>pDU50 z=6${(1b&B8DXE_Fd{z2~hgj7mmzYnxQ3sH3uA3kyN212z`jPuJe8j39@@{=~023|@ zKxMmTNEclNfEPdQDb8X&e0YgfO0Idn>9y=B@7zcfOi5LGx