Projectile source definitions for all spears
This commit is contained in:
1 parent
25ce6b7209
commit
7b8a0ef2a3
21 files changed
+52
-49
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.75f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y, Projectile.velocity.X * 0.8f, Projectile.velocity.Y * 0.8f, ModContent.ProjectileType<AmidiasWhirlpool>(), Projectile.damage, Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity * 0.8f, ModContent.ProjectileType<AmidiasWhirlpool>(), Projectile.damage, Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
@@ -56,7 +56,6 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
star.ai[0] = 3f;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -36,7 +36,8 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float TravelSpeed => 22f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center + Projectile.velocity * 0.5f,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(),
|
||||
Projectile.Center + Projectile.velocity * 0.5f,
|
||||
Projectile.velocity * 0.8f, ModContent.ProjectileType<BansheeHookScythe>(),
|
||||
Projectile.damage, Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
@@ -90,7 +91,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt") : ModContent.Request<Texture2D>(Texture).Value;
|
||||
Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt").Value : ModContent.Request<Texture2D>(Texture).Value;
|
||||
Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f);
|
||||
Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null,
|
||||
new Color(255, 255, 255, 127), Projectile.rotation,
|
||||
@@ -101,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition;
|
||||
Texture2D texture = Projectile.spriteDirection == -1 ? ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookAltGlow") : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookGlow");
|
||||
Texture2D texture = Projectile.spriteDirection == -1 ? ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookAltGlow").Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Spears/BansheeHookGlow").Value;
|
||||
Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? texture.Width - -8f : -8f, -8f); //-8 -8
|
||||
Main.EntitySpriteDraw(texture, drawPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
@@ -125,7 +126,8 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(),
|
||||
target.Center, Vector2.Zero,
|
||||
ModContent.ProjectileType<BansheeHookBoom>(), (int)(damage * 0.25),
|
||||
10f, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -46,11 +46,11 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
target.immune[Projectile.owner] = 7;
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<BrimlanceHellfireExplosion>(), (int)(Projectile.damage * 0.65), knockback, Main.myPlayer);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<BrimlanceHellfireExplosion>(), (int)(Projectile.damage * 0.65), knockback, Main.myPlayer);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 fireVelocity = new Vector2(0f, Main.rand.NextFloat(7f, 10f)).RotatedByRandom(MathHelper.TwoPi);
|
||||
Projectile.NewProjectile(target.Center, fireVelocity, ModContent.ProjectileType<BrimlanceStandingFire>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), target.Center, fireVelocity, ModContent.ProjectileType<BrimlanceStandingFire>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(Projectile.Center, Projectile.velocity * 0.5f, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity * 0.5f, ModContent.ProjectileType<PlagueSeeker>(), (int)(Projectile.damage * 0.75), Projectile.knockBack, Projectile.owner);
|
||||
Main.projectile[proj].extraUpdates += i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
float velocityY = Projectile.velocity.Y * 1.25f;
|
||||
if (velocityY < 0.1f)
|
||||
velocityY = 0.1f;
|
||||
int proj = Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
int proj = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X * 1.25f, velocityY, ModContent.ProjectileType<FossilShard>(), (int)(Projectile.damage * 0.5), 0f, Projectile.owner, 0f, 0f);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int boom = Projectile.NewProjectile(Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
int boom = Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (boom.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[boom].Calamity().forceMelee = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
@@ -37,10 +37,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
Projectile.localAI[0] = 0f;
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<Feather>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, ModContent.ProjectileType<Feather>(), (int)(Projectile.damage * 0.4), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y, Projectile.velocity.X * 2.4f, Projectile.velocity.Y * 2.4f, ModContent.ProjectileType<HellionSpike>(), (int)(Projectile.damage * 0.65), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity * 2.4f, ModContent.ProjectileType<HellionSpike>(), (int)(Projectile.damage * 0.65), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -35,8 +35,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X * 3.5f, Projectile.velocity.Y * 3.5f, ModContent.ProjectileType<InsidiousHarpoon>(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity * 3.5f, ModContent.ProjectileType<InsidiousHarpoon>(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.85f, Projectile.owner);
|
||||
};
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
public class MarniteSpearProjectile : BaseSpearProjectile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
Vector2 projPos = Projectile.Center + Projectile.velocity;
|
||||
Vector2 projVel = Projectile.velocity * 0.75f;
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.NewProjectile(projPos, projVel, ModContent.ProjectileType<VoidEssence>(), damage, kb, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), projPos, projVel, ModContent.ProjectileType<VoidEssence>(), damage, kb, Projectile.owner, 0f, 0f);
|
||||
|
||||
// Play a screaming soul sound effect (unused Shadowflame Hex Doll noise)
|
||||
SoundEngine.PlaySound(SoundID.Item104, Projectile.Center);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center, Projectile.velocity * 1.2f, ModContent.ProjectileType<Blood2>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Projectile.velocity * 1.2f, ModContent.ProjectileType<Blood2>(), Projectile.damage / 2, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -36,8 +36,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.6f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X, Projectile.velocity.Y, ModContent.ProjectileType<SpatialSpear>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity, ModContent.ProjectileType<SpatialSpear>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
};
|
||||
public override void ExtraBehavior()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X * 2.4f, Projectile.velocity.Y * 2.4f, ModContent.ProjectileType<StarnightBeam>(), (int)(Projectile.damage * 0.8), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
public override void ExtraBehavior()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public void DrawPortal(SpriteBatch spriteBatch, Vector2 drawPosition, float opacity)
|
||||
public void DrawPortal(Vector2 drawPosition, float opacity)
|
||||
{
|
||||
Texture2D portalTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/StreamGougePortal").Value;
|
||||
Vector2 origin = portalTexture.Size() * 0.5f;
|
||||
@@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
Main.spriteBatch.ExitShaderRegion();
|
||||
|
||||
// Draw the portal once ready.
|
||||
DrawPortal(Main.spriteBatch, portalDrawPosition, portalOpacity);
|
||||
DrawPortal(portalDrawPosition, portalOpacity);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -36,7 +36,8 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y, Projectile.velocity.X * 2.4f, Projectile.velocity.Y * 2.4f, ModContent.ProjectileType<TenebreusTidesWaterProjectile>(), (int)(Projectile.damage * 0.65), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y, Projectile.velocity.X * 2.4f, Projectile.velocity.Y * 2.4f,
|
||||
ModContent.ProjectileType<TenebreusTidesWaterProjectile>(), (int)(Projectile.damage * 0.65), Projectile.knockBack * 0.85f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
public override void ExtraBehavior()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X * 1.4f, Projectile.velocity.Y * 1.4f, ModContent.ProjectileType<TerraSpear>(), (int)(Projectile.damage * 0.7), Projectile.knockBack * 0.7f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
public override void ExtraBehavior()
|
||||
@@ -40,6 +40,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 107, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
|
||||
}
|
||||
|
||||
// TODO -- Use proper immunity variables to achieve this instead.
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.immune[Projectile.owner] = 5;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override float ForwardSpeed => 0.95f;
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X + Projectile.velocity.X, Projectile.Center.Y + Projectile.velocity.Y,
|
||||
Projectile.velocity.X * 1.6f, Projectile.velocity.Y * 1.6f, ModContent.ProjectileType<UrchinSpikeFugu>(), Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner, 0f, 0f);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee.Spears
|
||||
{
|
||||
public class YateveoBloomSpear : BaseSpearProjectile
|
||||
|
||||
Reference in new issue
Block a user