Xyk gets his grubby hands on it
Flak Kraken touch ups, visuals and use time adjustments Adds a tooltip for the weapons
This commit is contained in:
1 parent
07c6d07be9
commit
68b63b25fd
5 files changed
+63
-29
No files matched your search
@@ -15,29 +15,29 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
|
||||
#region Other Stats
|
||||
public static float TimeBetweenShots = 20f;
|
||||
public static float TimeBetweenShots = 21;
|
||||
public static float ProjectilesPerBurst = 2f;
|
||||
|
||||
public static float OwnerKnockbackStrength = 5f;
|
||||
public static float OwnerKnockbackStrength = 3.5f;
|
||||
|
||||
public static float ProjectileGravityStrength = 0.15f;
|
||||
public static float ProjectileShootSpeed = 20f;
|
||||
public static float ProjectileGravityStrength = 0.22f;
|
||||
public static float ProjectileShootSpeed = 25f;
|
||||
|
||||
public static float InitialShotDamageMultiplier = 0.5f;
|
||||
public static float InitialShotHitShrapnelDamageMultiplier = 0.75f;
|
||||
|
||||
public static int ShrapnelAmount = 12;
|
||||
public static int ShrapnelAmount = 7;
|
||||
public static float ShrapnelAngleOffset = MathHelper.PiOver4;
|
||||
|
||||
public static int ClusterShrapnelAmount = 20;
|
||||
public static float ClusterShrapnelAngleOffset = MathHelper.PiOver2 + MathHelper.ToRadians(10f);
|
||||
public static int ClusterShrapnelAmount = 13;
|
||||
public static float ClusterShrapnelAngleOffset = MathHelper.PiOver2 + MathHelper.ToRadians(50f);
|
||||
#endregion
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 88; // Here you're modifying the shrapnel's damage.
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = Item.useAnimation = 180;
|
||||
Item.useTime = Item.useAnimation = 63;
|
||||
Item.shoot = ModContent.ProjectileType<FlakKrakenHoldout>();
|
||||
Item.shootSpeed = 15f;
|
||||
|
||||
|
||||
@@ -485,7 +485,12 @@ FirestormCannon: {
|
||||
|
||||
FlakKraken: {
|
||||
DisplayName: Flak Kraken
|
||||
Tooltip: Fires an energy reticle that becomes more powerful over time
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a burst of two large shots that explode at the cursor
|
||||
Large shots burst into a wide cone of ink shrapnel
|
||||
Hitting enemies directly causes the large shots and its shrapnel deal decreased damage
|
||||
'''
|
||||
}
|
||||
|
||||
FlakToxicannon: {
|
||||
|
||||
@@ -243,3 +243,4 @@ WaterSpout.DisplayName: Spout
|
||||
WulfrumScrapBullet.DisplayName: High Speed Scrap
|
||||
DragonsBreathFlames.DisplayName: Draconic Flames
|
||||
DragonsBreathMag.DisplayName: Dragons Breath Cartridge
|
||||
FlakKrakenProjectile.DisplayName: Flak Kraken Projectile
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// Every X frames it'll shoot a projectile.
|
||||
if (ShootingTimer % TimeBetweenShots == 0f)
|
||||
{
|
||||
// We use the velocity of this projectie as its direction vector.
|
||||
// We use the velocity of this projectile as its direction vector.
|
||||
Vector2 direction = Projectile.velocity.SafeNormalize(Vector2.Zero);
|
||||
|
||||
// The position of the tip of the gun.
|
||||
@@ -77,8 +77,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
switch (rocketTypeShot)
|
||||
{
|
||||
case ItemID.WetRocket:
|
||||
DustEffectsID = DustID.Water;
|
||||
EffectsColor = Color.Blue;
|
||||
DustEffectsID = 45;
|
||||
EffectsColor = Color.RoyalBlue;
|
||||
break;
|
||||
case ItemID.LavaRocket:
|
||||
DustEffectsID = DustID.Torch;
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// By decreasing the offset length of the gun from the arms, we give an effect of recoil.
|
||||
OffsetLengthScalar = 10f;
|
||||
|
||||
Owner.Calamity().GeneralScreenShakePower = 5f;
|
||||
Owner.Calamity().GeneralScreenShakePower = 3.5f;
|
||||
|
||||
Particle shootPulse = new DirectionalPulseRing(nuzzlePosition,
|
||||
Vector2.Zero,
|
||||
@@ -131,13 +131,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
int smokeAmount = Main.rand.Next(12, 16 + 1);
|
||||
for (int i = 0; i < smokeAmount; i++)
|
||||
{
|
||||
Particle smoke = new MediumMistParticleAlphaBlend(
|
||||
Particle smoke = new HeavySmokeParticle(
|
||||
nuzzlePosition,
|
||||
direction.RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(2f, 30f),
|
||||
EffectsColor * 0.1f,
|
||||
Color.Transparent,
|
||||
Main.rand.NextFloat(0.5f, 1.2f),
|
||||
Main.rand.NextFloat(300f, 400f));
|
||||
Main.rand.Next(45, 61),
|
||||
Main.rand.NextFloat(.6f, 1.3f),
|
||||
Main.rand.NextFloat(0.2f, 0.35f));
|
||||
GeneralParticleHandler.SpawnParticle(smoke);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Main.projFrames[Type] = 5;
|
||||
ProjectileID.Sets.TrailingMode[Type] = 2;
|
||||
ProjectileID.Sets.TrailCacheLength[Type] = 4;
|
||||
ProjectileID.Sets.TrailCacheLength[Type] = 12;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -62,8 +62,17 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void AI()
|
||||
{
|
||||
// Enforces the gravity.
|
||||
if (Projectile.velocity.Y < 25f)
|
||||
Projectile.velocity.Y += ProjectileGravityStrength;
|
||||
if (IsShrapnel)
|
||||
{
|
||||
if (Projectile.velocity.Y < 25f)
|
||||
Projectile.velocity.Y += ProjectileGravityStrength;
|
||||
}
|
||||
// Scale for non Shrapnel
|
||||
if (!IsShrapnel)
|
||||
{
|
||||
Projectile.scale = 1.5f;
|
||||
Projectile.extraUpdates = 3;
|
||||
}
|
||||
|
||||
// Rotates towards its velocity.
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
|
||||
@@ -88,6 +97,24 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// The projectile will fade away as its time alive is ending.
|
||||
Projectile.alpha = (int)Utils.Remap(Projectile.timeLeft, 30f, 0f, 0f, 255f);
|
||||
|
||||
// Shrapnel trail
|
||||
if (IsShrapnel)
|
||||
{
|
||||
if (Projectile.timeLeft % 2 == 0 && Projectile.timeLeft <= 590)
|
||||
{
|
||||
AltSparkParticle spark = new AltSparkParticle(Projectile.Center - Projectile.velocity * 1.5f, Projectile.velocity * 0.01f, false, 8, 1.3f, EffectsColor * 0.135f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 dustPos = Projectile.Center - Projectile.velocity * 3 + Main.rand.NextVector2Circular(12, 12);
|
||||
Dust dust = Dust.NewDustPerfect(dustPos, Main.rand.NextBool(4) ? 191 : DustEffectsID);
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(1.4f, 1.65f);
|
||||
dust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.1f, 0.7f);
|
||||
}
|
||||
|
||||
Dust trailDust = Dust.NewDustDirect(Projectile.position,
|
||||
Projectile.width,
|
||||
Projectile.height,
|
||||
@@ -145,7 +172,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile shrapnel = Projectile.NewProjectileDirect(
|
||||
Projectile.GetSource_FromThis(),
|
||||
Projectile.Center,
|
||||
Projectile.velocity.SafeNormalize(-Vector2.UnitY).RotatedByRandom(usedClusterRockets ? ClusterShrapnelAngleOffset : ShrapnelAngleOffset) * ProjectileShootSpeed,
|
||||
Projectile.velocity.SafeNormalize(-Vector2.UnitY).RotatedByRandom(usedClusterRockets ? ClusterShrapnelAngleOffset : ShrapnelAngleOffset) * ProjectileShootSpeed * Main.rand.NextFloat(0.45f, 0.85f),
|
||||
ProjectileType<FlakKrakenProjectile>(),
|
||||
(int)(Projectile.damage * (HasHitEnemyWithInitialShot ? InitialShotHitShrapnelDamageMultiplier : 1f)),
|
||||
Projectile.knockBack,
|
||||
@@ -206,13 +233,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
for (int mistIndex = 0; mistIndex < mistAmount; mistIndex++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / mistAmount * mistIndex;
|
||||
Vector2 velocity = angle.ToRotationVector2() * Main.rand.NextFloat(5f, 15f);
|
||||
Particle boomMist = new MediumMistParticleAlphaBlend(Projectile.Center,
|
||||
Vector2 velocity = angle.ToRotationVector2() * Main.rand.NextFloat(2f, 7f);
|
||||
Particle boomMist = new HeavySmokeParticle(Projectile.Center,
|
||||
velocity,
|
||||
EffectsColor * Main.rand.NextFloat(0.1f, 0.3f),
|
||||
Color.Transparent,
|
||||
Main.rand.NextFloat(.6f, 1.4f),
|
||||
Main.rand.NextFloat(200f, 400f));
|
||||
EffectsColor * Main.rand.NextFloat(0.15f, 0.25f),
|
||||
Main.rand.Next(45, 61),
|
||||
Main.rand.NextFloat(.4f, 1.1f),
|
||||
Main.rand.NextFloat(0.2f, 0.35f));
|
||||
GeneralParticleHandler.SpawnParticle(boomMist);
|
||||
}
|
||||
}
|
||||
@@ -223,10 +250,11 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Texture2D texture = Request<Texture2D>(Texture).Value;
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
Color drawColor = Projectile.GetAlpha(lightColor);
|
||||
Color drawColor = IsShrapnel ? Projectile.GetAlpha(lightColor) : Color.Black;
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor);
|
||||
if (!IsShrapnel)
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor);
|
||||
|
||||
Main.EntitySpriteDraw(texture, drawPosition, frame, drawColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None);
|
||||
|
||||
|
||||
Reference in new issue
Block a user