diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8c46d8a4e4..7a916611d5 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -378,6 +378,7 @@ namespace CalamityMod.CalPlayer public bool thiefsDime = false; public bool dynamoStemCells = false; public bool etherealExtorter = false; + public bool blazingCore = false; //public bool dukeScales = false; public bool sandWaifu = false; public bool sandBoobWaifu = false; @@ -1090,6 +1091,7 @@ namespace CalamityMod.CalPlayer dynamoStemCells = false; etherealExtorter = false; //dukeScales = false; + blazingCore = false; daedalusReflect = false; daedalusSplit = false; @@ -3681,6 +3683,10 @@ namespace CalamityMod.CalPlayer { Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0f, 3f, 0f); } + if (blazingCore) + { + player.endurance += 0.1f; + } if (cFreeze) { int num = ModContent.BuffType(); @@ -9166,6 +9172,22 @@ namespace CalamityMod.CalPlayer } } } + if (blazingCore) + { + if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1 && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + { + for (int i = 0; i< 360; i += 3) + { + Vector2 BCDSpeed = new Vector2(5f, 5f).RotatedBy(MathHelper.ToRadians(i)); + Dust.NewDust(player.Center, 1, 1, 244, BCDSpeed.X, BCDSpeed.Y, 0, default, 1.1f); + } + Main.PlaySound(SoundID.Item14, player.Center); + int blazingSun = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), 1690, 0f, player.whoAmI, 0f, 0f); + Main.projectile[blazingSun].Center = player.Center; + int blazingSun2 = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); + Main.projectile[blazingSun2].Center = player.Center; + } + } if (ataxiaBlaze && Main.rand.NextBool(5)) { if (damage > 0) diff --git a/Items/Accessories/BlazingCore.cs b/Items/Accessories/BlazingCore.cs new file mode 100644 index 0000000000..c3f1112337 --- /dev/null +++ b/Items/Accessories/BlazingCore.cs @@ -0,0 +1,37 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class BlazingCore : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blazing Core"); + Tooltip.SetDefault("The searing core of the profaned goddess\n" + + "10% damage reduction \n" + + "Being hit creates a miniature sun that lingers, dealing damage to nearby enemies\n" + + "The sun will slowly drag enemies into it\n" + + "Only one sun can be active at once"); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 6)); + } + + public override void SetDefaults() + { + item.width = 42; + item.height = 46; + item.accessory = true; + item.expert = true; + item.rare = 9; + item.value = Item.buyPrice(1, 20, 0, 0); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.blazingCore = true; + } + } +} diff --git a/Items/Accessories/BlazingCore.png b/Items/Accessories/BlazingCore.png new file mode 100644 index 0000000000..2d1aeaabb0 Binary files /dev/null and b/Items/Accessories/BlazingCore.png differ diff --git a/Items/TreasureBags/ProvidenceBag.cs b/Items/TreasureBags/ProvidenceBag.cs index 78606d5fc0..2590fabc0b 100644 --- a/Items/TreasureBags/ProvidenceBag.cs +++ b/Items/TreasureBags/ProvidenceBag.cs @@ -55,6 +55,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItemChance(player, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); + DropHelper.DropItem(player, ModContent.ItemType()); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index a468d6bc3c..6e4990f910 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 90; + item.damage = 70; item.ranged = true; item.width = 60; item.height = 90; diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 2645dbda49..a02a75c510 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 320; + item.damage = 260; item.ranged = true; item.width = 64; item.height = 28; diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 685c552cdd..92bc722f6b 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 235; + item.damage = 210; item.ranged = true; item.width = 84; item.height = 34; diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index 99949f3aff..1056095af1 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 112; + item.damage = 86; item.width = 20; item.height = 12; item.useTime = 12; diff --git a/Projectiles/Typeless/BlazingSun.cs b/Projectiles/Typeless/BlazingSun.cs new file mode 100644 index 0000000000..d0946b0475 --- /dev/null +++ b/Projectiles/Typeless/BlazingSun.cs @@ -0,0 +1,112 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using System; +using CalamityMod.CalPlayer; +using CalamityMod.Buffs.DamageOverTime; + +namespace CalamityMod.Projectiles.Typeless +{ + public class BlazingSun : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blazing Sun"); + } + + public override void SetDefaults() + { + projectile.width = 130; + projectile.height = 130; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.alpha = 255; + projectile.timeLeft = 600; + projectile.penetrate = -1; + } + + public override void AI() + { + if (projectile.ai[0] < 45) + projectile.ai[0]++; + //Alpha + if (projectile.timeLeft > 50) + { + if (projectile.alpha > 50) + projectile.alpha -= 5; + if (projectile.alpha < 50) + projectile.alpha = 50; + } + else + { + if(projectile.alpha < 255) + projectile.alpha += 5; + if (projectile.alpha > 255) + projectile.alpha = 255; + } + + //Rotation + projectile.rotation += 0.025f; + //Light + Lighting.AddLight(projectile.Center, new Vector3(240, 185, 7) * (3f / 255)); + + //Dust + if(projectile.timeLeft > 40) + { + Vector2 Dpos = projectile.Center + new Vector2(Main.rand.NextFloat(80f,100f), Main.rand.NextFloat(80f,100f)).RotatedBy(MathHelper.ToRadians(Main.rand.Next(1,360))); + Vector2 Dspeed = Dpos - projectile.Center; + Dspeed.Normalize(); + Dspeed *= -5f; + float Dscale = Main.rand.NextFloat(1.5f, 2f); + int d1 = Dust.NewDust(Dpos, 1, 1, 244, Dspeed.X, Dspeed.Y, 0, default, Dscale); + Main.dust[d1].velocity = Dspeed; + } + + //Suction + if (projectile.ai[0] >= 45) + { + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 600f; + for (int num475 = 0; num475 < 200; num475++) + { + NPC npc = Main.npc[num475]; + if (npc.CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, npc.Center, 1, 1) && !CalamityPlayer.areThereAnyDamnBosses) + { + float npcCenterX = npc.position.X + (float)(npc.width / 2); + float npcCenterY = npc.position.Y + (float)(npc.height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - npcCenterX) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - npcCenterY); + if (num478 < num474) + { + if (npc.position.X < num472) + { + npc.velocity.X += 0.1f; + } + else + { + npc.velocity.X -= 0.1f; + } + if (npc.position.Y < num473) + { + npc.velocity.Y += 0.1f; + } + else + { + npc.velocity.Y -= 0.1f; + } + } + } + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/Projectiles/Typeless/BlazingSun.png b/Projectiles/Typeless/BlazingSun.png new file mode 100644 index 0000000000..17502907d8 Binary files /dev/null and b/Projectiles/Typeless/BlazingSun.png differ diff --git a/Projectiles/Typeless/BlazingSun2.cs b/Projectiles/Typeless/BlazingSun2.cs new file mode 100644 index 0000000000..dc995153eb --- /dev/null +++ b/Projectiles/Typeless/BlazingSun2.cs @@ -0,0 +1,50 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class BlazingSun2 : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blazing Sun"); + } + + public override void SetDefaults() + { + projectile.width = 130; + projectile.height = 130; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + projectile.alpha = 255; + projectile.timeLeft = 600; + projectile.penetrate = -1; + } + + public override void AI() + { + //Alpha + if (projectile.timeLeft > 50) + { + if (projectile.alpha > 50) + projectile.alpha -= 5; + if (projectile.alpha < 50) + projectile.alpha = 50; + } + else + { + if (projectile.alpha < 255) + projectile.alpha += 5; + if (projectile.alpha > 255) + projectile.alpha = 255; + } + //Rotation + projectile.rotation -= 0.025f; + + } + } +} diff --git a/Projectiles/Typeless/BlazingSun2.png b/Projectiles/Typeless/BlazingSun2.png new file mode 100644 index 0000000000..66e59a5f0a Binary files /dev/null and b/Projectiles/Typeless/BlazingSun2.png differ