When the tides are mercurial
Also i made the strong lunge thing better
This commit is contained in:
1 parent
be7ea5bdf0
commit
7b9e752323
11 files changed
+1111
-36
No files matched your search
@@ -136,6 +136,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool GivenBrimstoneLocus = false;
|
||||
public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount];
|
||||
public float SmoothenedMinecartRotation;
|
||||
public bool LungingDown = false;
|
||||
#endregion
|
||||
|
||||
#region IL Editing Constants
|
||||
@@ -2562,6 +2563,7 @@ namespace CalamityMod.CalPlayer
|
||||
potionTimer = 0;
|
||||
bloodflareCoreLostDefense = 0;
|
||||
persecutedEnchantSummonTimer = 0;
|
||||
LungingDown = false;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
|
||||
@@ -1094,15 +1094,16 @@ namespace CalamityMod.CalPlayer
|
||||
player.maxFallSpeed = 15f;
|
||||
if (gSabatonFall > 0 || player.PortalPhysicsEnabled)
|
||||
player.maxFallSpeed = 20f;
|
||||
if (player.HeldItem.modItem is TrueBiomeBlade blade)
|
||||
{
|
||||
if (blade.strongLunge)
|
||||
{
|
||||
player.maxFallSpeed = 80f;
|
||||
player.noFallDmg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LungingDown)
|
||||
{
|
||||
player.maxFallSpeed = 80f;
|
||||
player.noFallDmg = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Omega Blue Armor bonus
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public Attunement? mainAttunement = null;
|
||||
public Attunement? secondaryAttunement = null;
|
||||
public int Combo = 0;
|
||||
public bool strongLunge = false;
|
||||
public int UseTimer = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AttunementInfo.name = "Swordsmith's Pride";
|
||||
AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Extra ghostly swords are summoned during the spin";
|
||||
AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out. Ghostly swords will home onto enemies hit by the sword throw";
|
||||
AttunementInfo.function_passive = "IDK";
|
||||
AttunementInfo.function_passive = "While attacking, extra ghost swords have a chance to be shot out";
|
||||
AttunementInfo.color = new Color(188, 155, 185);
|
||||
AttunementInfo.color2 = new Color(204, 184, 144);
|
||||
break;
|
||||
@@ -112,7 +112,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AttunementInfo.name = "Sanguine Fury";
|
||||
AttunementInfo.function_description = "Conjures molten blades in front of you that get larger and stronger the more you hit enemies. The blades can also be used to bounce off tiles when in the air";
|
||||
AttunementInfo.function_extra = "Releasing LMB sends the charged blades flying in a wheel. Using LMB right after the throw makes the player perform dash towards the blade wheel, shredding anything inbetween";
|
||||
AttunementInfo.function_passive = "IDK";
|
||||
AttunementInfo.function_passive = "Successful strikes rarely grant lifesteal";
|
||||
AttunementInfo.color = new Color(216, 55, 22);
|
||||
AttunementInfo.color2 = new Color(216, 131, 22);
|
||||
break;
|
||||
@@ -120,7 +120,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AttunementInfo.name = "Mercurial Tides";
|
||||
AttunementInfo.function_description = "Hold LMB to charge up a heaven-shattering sword thrust, and release to unleash the devastating blow. Small shockwaves are released as you charge the sword";
|
||||
AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful, a shockwave of ancient monoliths will rise up and propagate through the ground";
|
||||
AttunementInfo.function_passive = "IDK";
|
||||
AttunementInfo.function_passive = "While attacking, release small shockwaves around you";
|
||||
AttunementInfo.color = new Color(132, 109, 233);
|
||||
AttunementInfo.color2 = new Color(122, 213, 233);
|
||||
break;
|
||||
@@ -128,7 +128,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AttunementInfo.name = "Lamentations of the Chained";
|
||||
AttunementInfo.function_description = "Throw out a flurry of chained blades in front of you. Striking enemies with the tip of the blades guarantees a critical hit.";
|
||||
AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets or onto the struck foe";
|
||||
AttunementInfo.function_passive = "IDK";
|
||||
AttunementInfo.function_passive = "Gain a magical chain hook. On enemy hits the hook quickly spins around you, freezing any struck foe"; //No way sentient meat hook
|
||||
AttunementInfo.color = new Color(127, 173, 168);
|
||||
AttunementInfo.color2 = new Color(203, 201, 168);
|
||||
break;
|
||||
@@ -246,9 +246,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
player.Calamity().rightClickListener = true;
|
||||
|
||||
UseTimer++;
|
||||
//Reset the strong lunge thing just in case it didnt get caught beofre.
|
||||
if (CanUseItem(player))
|
||||
strongLunge = false;
|
||||
{
|
||||
player.Calamity().LungingDown = false;
|
||||
UseTimer = 0;
|
||||
}
|
||||
|
||||
//Change the swords function based on its attunement
|
||||
switch (mainAttunement)
|
||||
@@ -275,7 +279,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.channel = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.shoot = ProjectileType<TrueBitingEmbrace>();
|
||||
item.shoot = ProjectileType<MercurialTides>();
|
||||
item.shootSpeed = 12f;
|
||||
item.UseSound = null;
|
||||
item.noMelee = true;
|
||||
@@ -298,6 +302,23 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
break;
|
||||
}
|
||||
|
||||
switch (secondaryAttunement)
|
||||
{
|
||||
case Attunement.Whirlwind:
|
||||
break;
|
||||
case Attunement.SuperPogo:
|
||||
break;
|
||||
case Attunement.Shockwave:
|
||||
if (UseTimer % 120 == 119)
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType<MercurialTidesBlast>(), (int)(item.damage * 0.6f), 10f, player.whoAmI, 1f);
|
||||
break;
|
||||
case Attunement.FlailBlade:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen)
|
||||
{
|
||||
//Don't shoot out a visual blade if you already have one out
|
||||
@@ -310,12 +331,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return true;
|
||||
//!Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
|
||||
//(n.type == ProjectileType<SwordsmithsPride>() ||
|
||||
// n.type == ProjectileType<MercurialTides>() ||
|
||||
return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI &&
|
||||
(n.type == ProjectileType<TrueAridGrandeur>() ||
|
||||
n.type == ProjectileType<MercurialTides>() //||
|
||||
// n.type == ProjectileType<SanguineFury>() ||
|
||||
// n.type == ProjectileType<LamentationsOfTheChained>()));
|
||||
// n.type == ProjectileType<LamentationsOfTheChained>()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public int Combo = 0;
|
||||
public int StoredLunges = 2;
|
||||
public int PowerLungeCounter = 0;
|
||||
public bool strongLunge = false;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Biome Blade");
|
||||
@@ -265,7 +264,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
//Reset the strong lunge thing just in case it didnt get caught beofre.
|
||||
if (CanUseItem(player))
|
||||
strongLunge = false;
|
||||
player.Calamity().LungingDown = false;
|
||||
|
||||
//Change the swords function based on its attunement
|
||||
switch (mainAttunement)
|
||||
@@ -404,8 +403,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
strongLunge = false;
|
||||
|
||||
if (mainAttunement == null)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class BloomRing : Particle
|
||||
{
|
||||
public override string Texture => "CalamityMod/Particles/BloomRing";
|
||||
public override bool UseAdditiveBlend => true;
|
||||
public override bool SetLifetime => true;
|
||||
|
||||
private float opacity;
|
||||
private Color BaseColor;
|
||||
|
||||
public BloomRing(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime)
|
||||
{
|
||||
Position = position;
|
||||
Velocity = velocity;
|
||||
BaseColor = color;
|
||||
Scale = scale;
|
||||
Lifetime = lifeTime;
|
||||
Rotation = Main.rand.NextFloat(MathHelper.TwoPi);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2);
|
||||
Color = BaseColor * opacity;
|
||||
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
|
||||
Velocity *= 0.95f;
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Texture2D tex = GeneralParticleHandler.GetTexture(Type);
|
||||
|
||||
spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -236,8 +236,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (dashTimer == maxDash)
|
||||
{
|
||||
Owner.velocity *= 0.1f; //Abrupt stop
|
||||
if (Owner.HeldItem.modItem is TrueBiomeBlade blade)
|
||||
blade.strongLunge = false;
|
||||
Owner.Calamity().LungingDown = true;
|
||||
|
||||
Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType<DecaysRetortDash>(), projectile.damage * 2, 0, Owner.whoAmI);
|
||||
if (proj.modProjectile is DecaysRetortDash dash)
|
||||
{
|
||||
@@ -275,8 +275,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public void PowerLunge()
|
||||
{
|
||||
if (Owner.HeldItem.modItem is TrueBiomeBlade blade)
|
||||
blade.strongLunge = true;
|
||||
Owner.Calamity().LungingDown = true;
|
||||
PowerLungeStart = Owner.Center;
|
||||
dashTimer = 1f;
|
||||
Owner.GiveIFrames(60);
|
||||
@@ -1940,10 +1939,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - projectile.timeLeft) / dashDuration) * 2f, 0f, 1f));
|
||||
Owner.fallStart = (int)(Owner.position.Y / 16f);
|
||||
|
||||
if (Owner.HeldItem.modItem is TrueBiomeBlade blade)
|
||||
{
|
||||
blade.strongLunge = true; //Needed for the downwards velocity uncap.
|
||||
}
|
||||
Owner.Calamity().LungingDown = true;
|
||||
|
||||
if (Collision.SolidCollision(Owner.Center + (direction * 120 * projectile.scale) - Vector2.One * 5f, 10, 10))
|
||||
{
|
||||
@@ -2096,10 +2092,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (State == 1f)
|
||||
Owner.velocity *= 0.33f;
|
||||
|
||||
if (Owner.HeldItem.modItem is TrueBiomeBlade blade)
|
||||
{
|
||||
blade.strongLunge = false; //Needed for the downwards velocity uncap.
|
||||
}
|
||||
Owner.Calamity().LungingDown = false;
|
||||
|
||||
projectile.active = false;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Reference in new issue
Block a user