Stygian Shield changes changes
This commit is contained in:
1 parent
dd61c6ee06
commit
7b3bb077d5
3 files changed
+15
-14
No files matched your search
@@ -22,6 +22,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HeldDefense, (DisableDashDuration / 60D).ToString("N1"));
|
||||
|
||||
public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 74;
|
||||
@@ -30,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
Item.damage = 222;
|
||||
Item.damage = 180;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.useAnimation = Item.useTime = 40; // This is only for the "Very slow" tooltip. The real use time should be faster
|
||||
Item.shoot = ModContent.ProjectileType<StygianShieldAttack>();
|
||||
@@ -42,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.UseSound = null;
|
||||
}
|
||||
|
||||
// Can only throw a shield if none is active
|
||||
// Can only throw a shield if there's two or less
|
||||
public override bool AltFunctionUse(Player player) => player.ownedProjectileCounts[ThrownShieldID] <= 1;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
@@ -19,12 +19,11 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
// Bull Rush stats
|
||||
public const float MinChargeTime = 15f;
|
||||
public const float MaxChargeTime = 50f;
|
||||
public const float MaxChargeDistance = 800f; // 50 blocks
|
||||
public const float MaxChargeDamageMult = 4.5f;
|
||||
public const float MaxChargeTime = 45f;
|
||||
public const float MaxChargeDistance = 720f; // 45 blocks
|
||||
public const float MaxChargeDamageMult = 6f;
|
||||
public const float PiercingDamageMult = 0.6f;
|
||||
public const float DashDuration = 21f;
|
||||
public const int IFrameAmount = 12;
|
||||
|
||||
public Player Owner => Main.player[Projectile.owner];
|
||||
public ref float Charge => ref Projectile.ai[0];
|
||||
@@ -122,6 +121,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
SoundEngine.PlaySound(DashSound, Owner.Center);
|
||||
|
||||
// Give immunity frames
|
||||
Owner.immune = true;
|
||||
Owner.immuneNoBlink = true;
|
||||
Owner.immuneTime = (int)DashDuration;
|
||||
for (int k = 0; k < Owner.hurtCooldowns.Length; k++)
|
||||
Owner.hurtCooldowns[k] = Owner.immuneTime;
|
||||
|
||||
// Reset the trail
|
||||
for (int i = 0; i < Projectile.oldPos.Length; i++)
|
||||
{
|
||||
@@ -172,13 +178,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float rotation = Projectile.velocity.ToRotation() - MathHelper.Pi;
|
||||
Particle redSlash = new SlashThrough(Color.Red * 0.9f, Owner.Center, rotation, 15, target);
|
||||
GeneralParticleHandler.SpawnParticle(redSlash);
|
||||
|
||||
// Give immunity frames
|
||||
Owner.immune = true;
|
||||
Owner.immuneNoBlink = true;
|
||||
Owner.immuneTime = IFrameAmount;
|
||||
for (int k = 0; k < Owner.hurtCooldowns.Length; k++)
|
||||
Owner.hurtCooldowns[k] = Owner.immuneTime;
|
||||
}
|
||||
|
||||
internal Color ColorFunction(float completionRatio)
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.tileCollide = false;
|
||||
|
||||
// Swiftly move back towards the player
|
||||
Projectile.velocity = Projectile.SafeDirectionTo(Owner.Center) * 15f;
|
||||
Projectile.velocity = Projectile.SafeDirectionTo(Owner.Center) * 20f;
|
||||
|
||||
// Delete the projectile if it touches its owner or too far away.
|
||||
if (Projectile.Hitbox.Intersects(Owner.Hitbox) || Vector2.Distance(Projectile.Center, Owner.Center) >= 3000f)
|
||||
|
||||
Reference in new issue
Block a user