Finished and removed placeholder assets
This commit is contained in:
1 parent
a6eb28dc16
commit
abb5b6dbc7
11 files changed
+45
-60
No files matched your search
@@ -23,14 +23,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
private int time = 0;
|
||||
private Color mainColor;
|
||||
private int swordDirection;
|
||||
private int useTime = 15;
|
||||
private int useTime = 18;
|
||||
private int opacityAdjust = 0;
|
||||
private float smearOpacity = 0;
|
||||
private bool smearGrowth = true;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = Item.height = 108;
|
||||
Item.damage = 160;
|
||||
Item.damage = 210;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useTime = Item.useAnimation = useTime;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 targetPos = Main.MouseWorld;
|
||||
NPC target = Main.MouseWorld.ClosestNPCAt(350);
|
||||
NPC target = Main.MouseWorld.ClosestNPCAt(650);
|
||||
if (target != null)
|
||||
targetPos = target.Center + target.velocity * 14;
|
||||
|
||||
|
||||
@@ -910,8 +910,8 @@ Orderbringer: {
|
||||
DisplayName: Orderbringer
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a piercing energy wave along with two blades from the sky and four homing stars that are created near your cursor
|
||||
Energy waves deal more damage as they pierce enemies
|
||||
Fires a piercing energy wave along with two blades from the sky and four homing stars that are created near your cursor
|
||||
Energy waves deal more damage as they pierce enemies
|
||||
'No matter where you may be you are never alone'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ Orbacle.DisplayName: Auric Orb
|
||||
OrderbringerAura.DisplayName: Aura
|
||||
OrderbringerBeam.DisplayName: Orderbringer Beam
|
||||
OrderbringerRain.DisplayName: Rain
|
||||
OrderbringerWaveProj.DisplayName: Orderbringer Wave Proj
|
||||
OrderbringerWhiteOrb.DisplayName: Orderbringer Orb
|
||||
PhoenixsPride.DisplayName: Phoenix's Pride
|
||||
PhosphorescentGauntletPunches.DisplayName: Gauntlet Punch
|
||||
@@ -240,6 +241,7 @@ SpineOfThanatosProjectile.DisplayName: Spine of Thanatos
|
||||
StarburstBeam.DisplayName: Star Shiv
|
||||
StarburstSHIV.DisplayName: SHIV
|
||||
StarnightBeam.DisplayName: Starnight Beam
|
||||
StarofJudgement.DisplayName: Star of Judgement
|
||||
StellarContemptBlast.DisplayName: Stellar Blast
|
||||
StellarContemptEcho.DisplayName: Echoes of Contempt
|
||||
StellarContemptHammer.DisplayName: Stellar Contempt
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Particles
|
||||
public bool RotateToVelocity;
|
||||
public Vector2 Squish;
|
||||
public bool ProduceLight;
|
||||
public SemiCircularSmearFade(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, Vector2 squish, int lifetime, bool playerCentered = false, bool rotateToVelocity = false, bool produceLight = true)
|
||||
public int Direction = 1;
|
||||
public SemiCircularSmearFade(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, Vector2 squish, int lifetime, bool playerCentered = false, bool rotateToVelocity = false, bool produceLight = true, int direction = 1)
|
||||
{
|
||||
Position = position;
|
||||
Velocity = velocity;
|
||||
@@ -31,7 +32,7 @@ namespace CalamityMod.Particles
|
||||
PlayerCentered = playerCentered;
|
||||
RotateToVelocity = rotateToVelocity;
|
||||
ProduceLight = produceLight;
|
||||
|
||||
Direction = direction;
|
||||
}
|
||||
public override void Update()
|
||||
{
|
||||
@@ -53,7 +54,7 @@ namespace CalamityMod.Particles
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() * 0.5f, Scale * Squish, 0, 0f);
|
||||
spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() * 0.5f, Scale * Squish, Direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,19 @@ using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.ComponentModel;
|
||||
using Terraria.Utilities.Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class JudgementProj : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/Melee/JudgementProj";
|
||||
public ref float time => ref Projectile.ai[0];
|
||||
public float hitboxSize = 10;
|
||||
public Color mainColor;
|
||||
public float fade = 1;
|
||||
public float fadeOut = 1;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 336;
|
||||
@@ -35,8 +38,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 157;
|
||||
Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 157;
|
||||
Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 137;
|
||||
Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 137;
|
||||
|
||||
if (time == 0)
|
||||
{
|
||||
@@ -97,22 +100,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
}
|
||||
}
|
||||
|
||||
fadeOut = Utils.GetLerpValue(0, 180, Projectile.timeLeft, true);
|
||||
time++;
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
Color color = Color.White;
|
||||
color.A = (byte)(color.A * fade);
|
||||
return color;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Main.spriteBatch.EnterShaderRegion(BlendState.NonPremultiplied);
|
||||
|
||||
Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.ExitShaderRegion();
|
||||
float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft);
|
||||
Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade), 1 + (0.45f * waveFade)) * Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 22 KiB |
@@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public class OrderbringerBeam : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/Melee/OrderbringerBeam";
|
||||
private int whiteLightTimer = 5;
|
||||
public int time = 0;
|
||||
public Color mainColor = Color.White;
|
||||
@@ -23,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 74;
|
||||
Projectile.height = 74;
|
||||
Projectile.width = 100;
|
||||
Projectile.height = 100;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
@@ -45,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||
|
||||
Player Owner = Main.player[Projectile.owner];
|
||||
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles
|
||||
float targetDist = Vector2.Distance(Owner.Center, Projectile.Center);
|
||||
if (Projectile.timeLeft % 3 == 0 && targetDist < 1400f)
|
||||
{
|
||||
Particle spark = new SparkParticle(Projectile.Center - Projectile.velocity * 3, -Projectile.velocity * 0.05f, false, 17, 1.5f, mainColor * 0.7f);
|
||||
@@ -53,22 +54,14 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
time++;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return Color.White;
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.5f), 1, null, true, true);
|
||||
return true;
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.3f) with { A = 0 }, 1, null, true, true);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/WulfrumKnifeTileHit", 2);
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.7f, Pitch = 0.4f }, Projectile.Center);
|
||||
if (Projectile.numHits < 1)
|
||||
{
|
||||
Particle orb = new GlowSparkParticle(target.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY), false, 12, 0.07f, mainColor, new Vector2(1.5f, 0.8f), true);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public Color mainColor;
|
||||
public float fade = 1;
|
||||
public float damageMult = 1;
|
||||
public float fadeOut = 1;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 336;
|
||||
@@ -78,37 +79,33 @@ namespace CalamityMod.Projectiles.Melee
|
||||
trailDust.noGravity = true;
|
||||
}
|
||||
|
||||
if (time % 12 == 0)
|
||||
if (time % 9 == 0)
|
||||
{
|
||||
Particle orb = new GlowSparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), false, 11, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false);
|
||||
Particle orb = new GlowSparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
Particle orb2 = new GlowSparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), false, 11, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false);
|
||||
Particle orb2 = new GlowSparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f);
|
||||
GeneralParticleHandler.SpawnParticle(orb2);
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
GlowOrbParticle orb3 = new GlowOrbParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(20f, 40f), false, 17, Main.rand.NextFloat(0.8f, 1.25f), mainColor, true, true);
|
||||
GeneralParticleHandler.SpawnParticle(orb3);
|
||||
GlowOrbParticle orb4 = new GlowOrbParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(20f, 40f), false, 17, Main.rand.NextFloat(0.8f, 1.25f), mainColor, true, true);
|
||||
GeneralParticleHandler.SpawnParticle(orb4);
|
||||
}
|
||||
}
|
||||
if (Main.rand.NextBool(12))
|
||||
{
|
||||
Particle orb3 = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor);
|
||||
GeneralParticleHandler.SpawnParticle(orb3);
|
||||
Particle orb4 = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor);
|
||||
GeneralParticleHandler.SpawnParticle(orb4);
|
||||
}
|
||||
}
|
||||
|
||||
fadeOut = Utils.GetLerpValue(0, 180, Projectile.timeLeft, true);
|
||||
|
||||
time++;
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
Color color = Color.White;
|
||||
color.A = (byte)(color.A * fade);
|
||||
return color;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Main.spriteBatch.EnterShaderRegion(BlendState.NonPremultiplied);
|
||||
|
||||
Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.spriteBatch.ExitShaderRegion();
|
||||
|
||||
float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft);
|
||||
for (int i = 1; i < 6; i++) // Weird for loop because of squash code
|
||||
Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (i * 0.2f * waveFade), 1 + (i * 0.35f * waveFade)) * Projectile.scale * 1.1f, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public class StarofJudgement : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override string Texture => "CalamityMod/Projectiles/Melee/StarofJudgement";
|
||||
public ref float time => ref Projectile.ai[0];
|
||||
public Color mainColor;
|
||||
public override void SetStaticDefaults()
|
||||
@@ -71,19 +72,15 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
time++;
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return lightColor;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/StarofJudgement").Value;
|
||||
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Color drawColor = Color.White;
|
||||
Color drawColor = Color.Lerp(mainColor, Color.White, 0.2f) with { A = 0 };
|
||||
float drawRotation = Projectile.rotation;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.3f) * 0.4f, 1, texture, true, true);
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor * 0.5f, 1, texture, true, true);
|
||||
Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.8 KiB |
Reference in new issue
Block a user