Tau Cannon balance
This commit is contained in:
1 parent
2eac758497
commit
098259ed5e
4 files changed
+21
-24
No files matched your search
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 592;
|
||||
Item.damage = 620;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = Item.useAnimation = 180;
|
||||
Item.shoot = ModContent.ProjectileType<TauCannonHoldout>();
|
||||
@@ -39,14 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool AltFunctionUse(Player player) => false;
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
if (player.ownedProjectileCounts[Item.shoot] == 0 && modItem.Charge > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0 && Item.Calamity().Charge > 0;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public new string LocalizationCategory => "Projectiles.Ranged";
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public Color color1 = Color.MediumTurquoise;
|
||||
public Color color2 = Color.Coral;
|
||||
public Color turquoiseColor = Color.MediumTurquoise;
|
||||
public Color coralColor = Color.Coral;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -42,14 +42,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Dust trailDust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, 278, Scale: Main.rand.NextFloat(0.5f, 0.8f));
|
||||
trailDust.noGravity = true;
|
||||
trailDust.color = Main.rand.NextBool(3) ? color2 : color1;
|
||||
trailDust.color = Main.rand.NextBool(3) ? coralColor : turquoiseColor;
|
||||
}
|
||||
|
||||
Particle orb = new CustomSpark(Projectile.Center, Projectile.velocity, "CalamityMod/Projectiles/StarProj",false, 2, 1f, Color.Lerp(color1, Color.White, 0.7f), new Vector2(1f, 1f));
|
||||
Particle orb = new CustomSpark(Projectile.Center, Projectile.velocity, "CalamityMod/Projectiles/StarProj",false, 2, 1f, Color.Lerp(turquoiseColor, Color.White, 0.7f), new Vector2(1f, 1f));
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
|
||||
if (Projectile.ai[2] == 5)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 500f, 12, 70f);
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 500f, 15f, 50f);
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Dust boomDust = Dust.NewDustPerfect(Projectile.Center, 278, (MathHelper.TwoPi / dustAmount * i).ToRotationVector2() * Main.rand.NextFloat(5f, 8f), Scale: Main.rand.NextFloat(0.6f, 1f));
|
||||
boomDust.noGravity = true;
|
||||
boomDust.color = Main.rand.NextBool(3) ? color2 : color1;
|
||||
boomDust.color = Main.rand.NextBool(3) ? coralColor : turquoiseColor;
|
||||
}
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
private float WidthFunction(float completionRatio) => Projectile.scale * 32f * CalamityUtils.Convert01To010(completionRatio);
|
||||
|
||||
private Color ColorFunction(float completionRatio) => Color.Lerp(color1, Color.Transparent, completionRatio) * Utils.GetLerpValue(0f, 30f, Projectile.timeLeft, true);
|
||||
private Color ColorFunction(float completionRatio) => Color.Lerp(turquoiseColor, Color.Transparent, completionRatio) * Utils.GetLerpValue(0f, 30f, Projectile.timeLeft, true);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -83,6 +83,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// If the holdout hasn't reached any charge and the player's isn't holding the weapon anymore: kill it.
|
||||
if (State == AIState.Level0 && Owner.CantUseHoldout())
|
||||
Projectile.Kill();
|
||||
|
||||
// At all times, don't allow the holdout to persist if the player dies or is no longer active.
|
||||
if (!Owner.active || Owner.dead)
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public override void HoldoutAI()
|
||||
@@ -135,7 +139,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
GunTipPosition,
|
||||
Projectile.velocity,
|
||||
ProjectileType<TauCannonBeam>(),
|
||||
(int)(Projectile.damage * 8f),
|
||||
(int)(Projectile.damage * 13f),
|
||||
Projectile.knockBack * 3,
|
||||
Projectile.owner,
|
||||
ai1: Projectile.whoAmI);
|
||||
@@ -161,13 +165,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
GunTipPosition + Projectile.velocity * 25f,
|
||||
Projectile.velocity,
|
||||
ProjectileType<TauCannonBeam>(),
|
||||
(int)(Projectile.damage * 0.5f),
|
||||
(int)(Projectile.damage * 0.7f),
|
||||
Projectile.knockBack * 5,
|
||||
Projectile.owner,
|
||||
ai1: Projectile.whoAmI,
|
||||
ai2: 1f);
|
||||
|
||||
int randomPortalAmount = Main.rand.Next(4, 7);
|
||||
int randomPortalAmount = Main.rand.Next(4, 5+1);
|
||||
for (int i = 0; i < randomPortalAmount; i++)
|
||||
{
|
||||
Projectile.NewProjectileDirect(
|
||||
@@ -181,7 +185,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
}
|
||||
|
||||
modItem.Charge -= 3.5f;
|
||||
modItem.Charge -= 2.5f;
|
||||
|
||||
HasShotBeam = true;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
Vector2 moveTotarget = (Owner.Center - Projectile.Center).SafeNormalize(Vector2.UnitX);
|
||||
if (Projectile.velocity.Length() < 25)
|
||||
if (Projectile.velocity.Length() < 15)
|
||||
Projectile.velocity += moveTotarget * 0.05f;
|
||||
else
|
||||
Projectile.velocity *= 0.98f;
|
||||
@@ -69,18 +69,18 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
int randomBoltAmount = Main.rand.Next(8, 13);
|
||||
int randomBoltAmount = Main.rand.Next(9, 12+1);
|
||||
float starterAngle = Main.rand.NextFloat(MathHelper.TwoPi);
|
||||
for (int i = 0; i < randomBoltAmount; i++)
|
||||
{
|
||||
float angle = starterAngle + (MathHelper.TwoPi / randomBoltAmount * i);
|
||||
Vector2 velocity = angle.ToRotationVector2() * 15f;
|
||||
Vector2 velocity = angle.ToRotationVector2() * 14f;
|
||||
Projectile.NewProjectileDirect(
|
||||
Projectile.GetSource_FromThis(),
|
||||
Projectile.Center,
|
||||
velocity,
|
||||
ModContent.ProjectileType<TauCannonBolt>(),
|
||||
Projectile.damage,
|
||||
(int)(Projectile.damage * 0.65f),
|
||||
Projectile.knockBack,
|
||||
Projectile.owner, 0, 0, 5);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user