Even More Small Fixes
Added Hellborn shot counter fixed Earth swing direction getting accidentally reversed fixed Hellkite gfb tooltip being outdated
This commit is contained in:
1 parent
ba23534d13
commit
a7d3582a98
10 files changed
+111
-19
No files matched your search
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class HellbornShots : CooldownHandler
|
||||
{
|
||||
public float CompletionPercentage => MathF.Round(instance.Completion * 100);
|
||||
private bool IsEmpty => CompletionPercentage == 100;
|
||||
private float TextXOffset => -5.4f;
|
||||
private Vector2 TextPosition => new(TextXOffset, 15);
|
||||
private Color TextColor => Color.Gold;
|
||||
private Color TextBorderColor = Color.DarkRed;
|
||||
|
||||
public static new string ID => "HellbornShots";
|
||||
public override bool CanTickDown => false;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override bool ShouldDisplay => instance.player.HeldItem.type == ItemType<Hellborn>();
|
||||
public override string Texture => "CalamityMod/Cooldowns/" + ID;
|
||||
|
||||
public override Color CooldownStartColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.Red, Color.SlateGray, instance.Completion);
|
||||
public override Color CooldownEndColor => IsEmpty ? Color.DimGray : Color.Lerp(Color.Gold, Color.SlateGray, instance.Completion);
|
||||
|
||||
public override void DrawExpanded(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawExpanded(spriteBatch, position, opacity, scale);
|
||||
|
||||
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.player.Calamity().hellbornShots.ToString(), position + TextPosition, TextColor, TextBorderColor);
|
||||
}
|
||||
|
||||
public override void DrawCompact(SpriteBatch spriteBatch, Vector2 position, float opacity, float scale)
|
||||
{
|
||||
base.DrawCompact(spriteBatch, position, opacity, scale);
|
||||
|
||||
CalamityUtils.DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, instance.player.Calamity().hellbornShots.ToString(), position + TextPosition, TextColor, TextBorderColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 348 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -21,10 +21,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 164;
|
||||
Item.height = 164;
|
||||
Item.damage = 1980;
|
||||
Item.damage = 4004;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = 38;
|
||||
Item.useTime = 38;
|
||||
Item.useAnimation = 42;
|
||||
Item.useTime = 42;
|
||||
Item.useTurn = true;
|
||||
Item.knockBack = 15f;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Linq;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -45,6 +47,16 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
|
||||
|
||||
if (player.Calamity().cooldowns.TryGetValue(HellbornShots.ID, out var cooldown))
|
||||
{
|
||||
cooldown.timeLeft = 8 - player.Calamity().hellbornShots;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AddCooldown(HellbornShots.ID, 8);
|
||||
}
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -423,7 +423,7 @@ Earth: {
|
||||
A beautiful prismatic blade with unrivaled close combat proficiency
|
||||
Heals you greatly on hit
|
||||
Every other swing will summon three Gaia meteors to fall upon nearby enemies
|
||||
'All its spawn shall know the beauty and wrath of their creator'
|
||||
'All Its spawn shall know the beauty and wrath of their creator'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ Hellkite: {
|
||||
'''
|
||||
An ancient blade created during the Draconic Era by Azafure's finest forgemaster
|
||||
Swings a slow and heavy blade with powerful knockback
|
||||
Holding <right> while swinging will begin charging a strengthened swing
|
||||
Holding <right> will begin charging a strengthened swing
|
||||
Releasing <right> while fully charged will unleash a devastating slash
|
||||
[c/0C507F:'My beloved <3' -Xyk]
|
||||
'''
|
||||
|
||||
@@ -94,6 +94,7 @@ Cooldowns: {
|
||||
GaelsRage: Gael's Greatsword Rage Cooldown
|
||||
GlobalDodge: Dodge Cooldown
|
||||
GodSlayerDash: God Slayer Dash Cooldown
|
||||
HellbornShots: Hellborn Shots
|
||||
InkBomb: Ink Bomb Cooldown
|
||||
LifeSteal: Life Steal Cooldown
|
||||
LionHeartShield: Energy Shell Cooldown
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public bool spawnBoom = true;
|
||||
public Color mainColor = Color.OrangeRed;
|
||||
public bool finalFlip = false;
|
||||
public int pause = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
base.SetDefaults();
|
||||
@@ -47,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
Projectile.knockBack = 0;
|
||||
Projectile.scale = 1;
|
||||
Projectile.ai[1] = -1;
|
||||
Projectile.ai[1] = 1;
|
||||
base.OnSpawn(source);
|
||||
mousePos = Owner.Calamity().mouseWorld;
|
||||
aimVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65;
|
||||
@@ -61,6 +62,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void UseStyle()
|
||||
{
|
||||
if (pause > 0)
|
||||
{
|
||||
pause--;
|
||||
Animation--;
|
||||
return;
|
||||
}
|
||||
|
||||
AnimationProgress = Animation % useAnim;
|
||||
DrawUnconditionally = false;
|
||||
|
||||
@@ -223,9 +231,26 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.ai[1] == -1 && spawnBoom)
|
||||
{
|
||||
Vector2 spawnSpot = target.Center + new Vector2(Main.rand.NextFloat(-450, 450), Main.rand.NextFloat(-450, -650));
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType<EarthMeteor>(), Projectile.damage * 2, Projectile.knockBack, Projectile.owner, 0, 0, 2);
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType<EarthMeteor>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 0, 2);
|
||||
spawnBoom = false;
|
||||
}
|
||||
if (Projectile.numHits == 0)
|
||||
{
|
||||
pause = 6;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
Particle spark = new GlowSparkParticle(target.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (-25), false, 12, 0.12f - i * 0.025f, mainColor, new Vector2(3.75f, 0.9f), true, false, 1.15f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
float power = Main.rand.NextFloat(0, 0.6f);
|
||||
Particle sparker = new CustomSpark(target.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY).RotatedByRandom(power) * (-Main.rand.NextFloat(18.5f, 50) * (1 - power)), "CalamityMod/Particles/Sparkle", false, 38, Main.rand.NextFloat(2.2f, 4.8f), mainColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
}
|
||||
SoundStyle hit2 = new("CalamityMod/Sounds/Item/FinalDawnSlash");
|
||||
SoundEngine.PlaySound(hit2 with { Volume = 0.85f, Pitch = Main.rand.NextFloat(0.2f, 0.3f) }, Projectile.Center);
|
||||
}
|
||||
|
||||
SoundStyle fire = new("CalamityMod/Sounds/NPCHit/ThanatosHitOpen1");
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.75f, Pitch = 0.2f }, Projectile.Center);
|
||||
@@ -265,10 +290,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++)
|
||||
{
|
||||
Particle mini = new CustomPulse(target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.1f, 1f), mainColor, "CalamityMod/Particles/HealingPlus", Vector2.One, Main.rand.NextFloat(-10, 10), Main.rand.NextFloat(0.8f, 1.4f) * scaleFactor, 0.2f * scaleFactor, 35, true);
|
||||
GeneralParticleHandler.SpawnParticle(mini);
|
||||
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, 278, new Vector2(12, 12).RotatedByRandom(100) * Main.rand.NextFloat(0.05f, 0.7f));
|
||||
float power = Main.rand.NextFloat(0.2f, 0.8f);
|
||||
Dust dust2 = Dust.NewDustPerfect(target.Center, 278, (Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld)).RotatedByRandom(power) * (Main.rand.NextFloat(10f, 35f) * ( 1 - power)));
|
||||
dust2.scale = Main.rand.NextFloat(0.55f, 0.85f) * scaleFactor;
|
||||
dust2.noGravity = true;
|
||||
dust2.color = Color.Lerp(Color.White, mainColor, 0.5f);
|
||||
|
||||
@@ -10,6 +10,7 @@ using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using CalamityMod.Particles;
|
||||
using Terraria.Graphics.Renderers;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
@@ -154,8 +155,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.numHits <= 0)
|
||||
{
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
Owner.Calamity().GeneralScreenShakePower = 4f;
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<EarthBoom>(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner);
|
||||
Owner.Calamity().GeneralScreenShakePower = 4.5f;
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<EarthBoom>(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
randomColor = Main.rand.Next(3) switch
|
||||
@@ -168,14 +169,20 @@ namespace CalamityMod.Projectiles.Melee
|
||||
dust2.scale = Main.rand.NextFloat(0.85f, 1.15f);
|
||||
dust2.noGravity = false;
|
||||
dust2.color = Color.Lerp(Color.White, randomColor, 0.5f);
|
||||
|
||||
Particle sparker = new CustomSpark(target.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(5.5f, 20), "CalamityMod/Particles/Sparkle", false, 38, Main.rand.NextFloat(2.2f, 4.8f), randomColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
}
|
||||
|
||||
Particle bolt2 = new CustomPulse(target.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.5f, 19);
|
||||
GeneralParticleHandler.SpawnParticle(bolt2);
|
||||
Particle bolt3 = new CustomPulse(target.Center, Vector2.Zero, Color.MediumTurquoise, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.35f, 17);
|
||||
GeneralParticleHandler.SpawnParticle(bolt3);
|
||||
Particle bolt4 = new CustomPulse(target.Center, Vector2.Zero, Color.LawnGreen, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.2f, 15);
|
||||
GeneralParticleHandler.SpawnParticle(bolt4);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Particle bolt2 = new CustomPulse(target.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.5f - i * 0.05f, 19 - i * 4);
|
||||
GeneralParticleHandler.SpawnParticle(bolt2);
|
||||
Particle bolt3 = new CustomPulse(target.Center, Vector2.Zero, Color.MediumTurquoise, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.35f - i * 0.05f, 17 - i * 4);
|
||||
GeneralParticleHandler.SpawnParticle(bolt3);
|
||||
Particle bolt4 = new CustomPulse(target.Center, Vector2.Zero, Color.LawnGreen, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.2f - i * 0.05f, 15 - i * 4);
|
||||
GeneralParticleHandler.SpawnParticle(bolt4);
|
||||
}
|
||||
|
||||
SoundStyle fire2 = new("CalamityMod/Sounds/Item/EarthMeteor");
|
||||
SoundEngine.PlaySound(fire2 with { Volume = 0.9f }, target.Center);
|
||||
|
||||
Reference in new issue
Block a user