the most unnecessary merge ever
This commit is contained in:
commit
e6e70903d6
6 files changed
+26
-26
No files matched your search
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Thanatos Deathray");
|
||||
DisplayName.SetDefault("T Hanos Deathray");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Thanatos Beam");
|
||||
DisplayName.SetDefault("T Hanos Beam");
|
||||
Main.projFrames[projectile.type] = 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,16 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public ref float SwordItemID => ref projectile.ai[1];
|
||||
public ref float VerticalOffset => ref projectile.localAI[0];
|
||||
public ref float Time => ref projectile.localAI[1];
|
||||
public float AttackCompletionRatio => 1f - Owner.itemAnimation / (float)Owner.itemAnimationMax;
|
||||
public float AttackCompletionRatio
|
||||
{
|
||||
get
|
||||
{
|
||||
float completionRatio = 1f - Owner.itemAnimation / (float)Owner.itemAnimationMax;
|
||||
if (float.IsNaN(completionRatio) || float.IsInfinity(completionRatio))
|
||||
completionRatio = 0f;
|
||||
return completionRatio;
|
||||
}
|
||||
}
|
||||
public Player Owner => Main.player[projectile.owner];
|
||||
public int Variant => (int)projectile.ai[0] % 2;
|
||||
|
||||
@@ -124,6 +133,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
return;
|
||||
}
|
||||
|
||||
if (Owner.itemAnimationMax == 0)
|
||||
Owner.itemAnimationMax = (int)(Owner.ActiveItem().useAnimation * Owner.meleeSpeed);
|
||||
|
||||
float swingOffsetAngle = MathHelper.SmoothStep(-1.87f, 3.79f, AttackCompletionRatio);
|
||||
|
||||
// Offset a little bit angularly if the secondary variant to prevent complete overlap.
|
||||
|
||||
@@ -158,9 +158,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
ReleaseHitDust(target.Center - projectile.velocity * 3f);
|
||||
HitTargetIndex = target.whoAmI;
|
||||
projectile.timeLeft = projectile.Calamity().stealthStrike ? 100 : 60;
|
||||
projectile.netUpdate = true;
|
||||
if (!Main.npc.IndexInRange((int)HitTargetIndex))
|
||||
{
|
||||
HitTargetIndex = target.whoAmI;
|
||||
projectile.timeLeft = projectile.Calamity().stealthStrike ? 100 : 60;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,12 +70,12 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.scale = MathHelper.Lerp(LaserSize, 0f, 1f - (projectile.timeLeft / (float)TotalFadeoutTime));
|
||||
}
|
||||
|
||||
Vector2 samplingPoint = projectile.Center;
|
||||
Vector2 samplingPoint = projectile.Top;
|
||||
|
||||
float[] samples = new float[3];
|
||||
float[] samples = new float[12];
|
||||
|
||||
float determinedLength = 0f;
|
||||
Collision.LaserScan(samplingPoint, projectile.velocity, projectile.width * projectile.scale, MaximumLength + 72f, samples);
|
||||
Collision.LaserScan(samplingPoint, projectile.velocity, projectile.width * projectile.scale, MaximumLength, samples);
|
||||
for (int i = 0; i < samples.Length; i++)
|
||||
{
|
||||
determinedLength += samples[i];
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
determinedLength = MathHelper.Clamp(determinedLength, MaximumLength * 0.3f, MaximumLength);
|
||||
|
||||
float lerpDelta = 0.5f;
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], determinedLength, lerpDelta);
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], determinedLength - 20f, lerpDelta);
|
||||
if (projectile.localAI[0] < 30f)
|
||||
{
|
||||
projectile.localAI[1] = MathHelper.Lerp(72f, projectile.localAI[1], projectile.localAI[0] / 30f);
|
||||
|
||||
@@ -87,22 +87,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.scale = MathHelper.Lerp(3.25f, 0.01f, (projectile.localAI[0] - (TimeLeft - 15f)) / 15f);
|
||||
}
|
||||
|
||||
Vector2 samplingPoint = projectile.Center;
|
||||
|
||||
float[] samples = new float[3];
|
||||
|
||||
float determinedLength = 0f;
|
||||
Collision.LaserScan(samplingPoint, projectile.velocity, projectile.width * projectile.scale, MaximumLength, samples);
|
||||
for (int i = 0; i < samples.Length; i++)
|
||||
{
|
||||
determinedLength += samples[i];
|
||||
}
|
||||
determinedLength /= samples.Length;
|
||||
|
||||
determinedLength = MathHelper.Clamp(determinedLength, MaximumLength * 0.5f, MaximumLength);
|
||||
|
||||
float lerpDelta = 0.5f;
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], determinedLength, lerpDelta);
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], MaximumLength, 0.5f);
|
||||
Vector2 beamEndPosiiton = projectile.Center + projectile.velocity * (projectile.localAI[1] - 6f);
|
||||
|
||||
// Draw white light across the laser
|
||||
|
||||
Reference in new issue
Block a user