Added Blazing Core and balancing

This commit is contained in:
Shucks committed 2019-12-19 21:28:50 -06:00
1 parent 11acc2cb18
commit c07129552d
12 files changed
+226 -4

No files matched your search

+22
View File
@@ -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<GlacialState>();
@@ -9166,6 +9172,22 @@ namespace CalamityMod.CalPlayer
}
}
}
if (blazingCore)
{
if (player.ownedProjectileCounts[ModContent.ProjectileType<BlazingSun>()] < 1 && player.ownedProjectileCounts[ModContent.ProjectileType<BlazingSun2>()] < 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<BlazingSun>(), 1690, 0f, player.whoAmI, 0f, 0f);
Main.projectile[blazingSun].Center = player.Center;
int blazingSun2 = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BlazingSun2>(), 0, 0f, player.whoAmI, 0f, 0f);
Main.projectile[blazingSun2].Center = player.Center;
}
}
if (ataxiaBlaze && Main.rand.NextBool(5))
{
if (damage > 0)
+37
View File
@@ -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;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+1
View File
@@ -55,6 +55,7 @@ namespace CalamityMod.Items.TreasureBags
// Equipment
DropHelper.DropItemChance(player, ModContent.ItemType<SamuraiBadge>(), DropHelper.RareVariantDropRateInt);
DropHelper.DropItem(player, ModContent.ItemType<BlazingCore>());
// Vanity
DropHelper.DropItemChance(player, ModContent.ItemType<ProvidenceMask>(), 7);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+112
View File
@@ -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<HolyFlames>(), 180);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+50
View File
@@ -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;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB