Resprites + Eclipse's Fall changes
- Resprited Accel Round, Night's Ray, Storm Ruler beam - Added an explosion sprite to Umbraphile armor - Visually tweaked EF to look better with its sprite - Also did some balancing for EF
No files matched your search
@@ -19,8 +19,8 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 8;
|
||||
Item.height = 8;
|
||||
Item.width = 10;
|
||||
Item.height = 16;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.knockBack = 1.25f;
|
||||
|
||||
|
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 269 B |
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.staff[Item.type] = true;
|
||||
Item.staff[Item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.damage = 24;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 10;
|
||||
Item.width = 50;
|
||||
Item.height = 50;
|
||||
Item.width = 58;
|
||||
Item.height = 54;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -34,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shoot = ModContent.ProjectileType<NightsRayBeam>();
|
||||
Item.shootSpeed = 6f;
|
||||
}
|
||||
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 954 B |
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 564;
|
||||
Item.damage = 540;
|
||||
Item.knockBack = 3.5f;
|
||||
Item.useAnimation = Item.useTime = 21;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -91,6 +91,7 @@ EclipseMirrorBurst.DisplayName: Eclipse Mirror Flash
|
||||
EclipsesFallMain.DisplayName: Eclipse's Fall
|
||||
EclipsesSmol.DisplayName: Eclipse's Small
|
||||
EclipsesStealth.DisplayName: Eclipse's Fall
|
||||
EclipseStealthBoom.DisplayName: Eclipse Blast
|
||||
EGloveSpark.DisplayName: Spark
|
||||
ElementalDiskProj.DisplayName: Elemental Disk
|
||||
ElementalDiskSplit.DisplayName: Elemental Disk
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
Projectile.height = 10;
|
||||
Projectile.width = Projectile.height = 28;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = 1;
|
||||
@@ -49,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.localAI[0] = 0f;
|
||||
}
|
||||
}
|
||||
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation();
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
|
||||
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 675 B |
@@ -0,0 +1,39 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
public class EclipseStealthBoom : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
|
||||
public const int Lifetime = 35; // 7 animation frames, 12 FPS
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 7;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 102;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = Lifetime;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.frameCounter++;
|
||||
Projectile.frame = Projectile.frameCounter / 5;
|
||||
|
||||
if (Projectile.frameCounter > Lifetime)
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,6 +11,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall";
|
||||
|
||||
// these also affect KB
|
||||
public const float RainDamageMultMin = 0.4f;
|
||||
public const float RainDamageMultMax = 0.5f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6;
|
||||
@@ -20,44 +25,42 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Projectile.width = Projectile.height = 40;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates;
|
||||
Projectile.timeLeft = 150 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 138, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
|
||||
}
|
||||
Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f);
|
||||
float trailScale = Main.rand.NextFloat(0.8f, 1.2f);
|
||||
Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange;
|
||||
Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor);
|
||||
GeneralParticleHandler.SpawnParticle(eclipseTrail);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
SpawnSpears(target.Center);
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => SpawnSpears(target.Center);
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
SpawnSpears(target.Center);
|
||||
}
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => SpawnSpears(target.Center);
|
||||
|
||||
private void SpawnSpears(Vector2 targetPos)
|
||||
{
|
||||
int spearAmt = Main.rand.Next(3, 6); //3 to 5 spears
|
||||
int spearAmt = Main.rand.Next(3, 5 + 1); // 3 to 5 spears
|
||||
var source = Projectile.GetSource_FromThis();
|
||||
for (int n = 0; n < spearAmt; n++)
|
||||
{
|
||||
float dmgMult = 0.08f * Main.rand.NextFloat(4f, 7f);
|
||||
float kBMult = 0.1f * Main.rand.NextFloat(7f, 10f);
|
||||
CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<EclipsesSmol>(), (int)(Projectile.damage * dmgMult), Projectile.knockBack * kBMult, Projectile.owner);
|
||||
float dmgMult = Main.rand.NextFloat(RainDamageMultMin, RainDamageMultMax);
|
||||
CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType<EclipsesSmol>(), (int)(Projectile.damage * dmgMult), Projectile.knockBack * dmgMult, Projectile.owner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
public class EclipsesSmol : ModProjectile, ILocalizedModType
|
||||
@@ -15,38 +14,16 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.friendly = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.timeLeft = 150;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.timeLeft = 75 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.5f, 0.4f, 0.15f);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 12f, 20f);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int dustInt = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 138, 0f, 0f, 100, default, 1.2f);
|
||||
Main.dust[dustInt].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[dustInt].scale = 0.5f;
|
||||
Main.dust[dustInt].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
int moreDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 138, 0f, 0f, 100, default, 1.7f);
|
||||
Main.dust[moreDust].noGravity = true;
|
||||
Main.dust[moreDust].velocity *= 5f;
|
||||
moreDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 138, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[moreDust].velocity *= 2f;
|
||||
}
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 16f, 20f);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -10,6 +12,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall";
|
||||
|
||||
// these also affect KB
|
||||
public const float RainDamageMult = 0.25f;
|
||||
public const float ExplosionDamageMult = 0.5f;
|
||||
|
||||
// For more consistent DPS, always alternates between spawning 1 and 2 spears instead of picking randomly
|
||||
private bool spawnTwoSpears = true;
|
||||
private bool changedTimeLeft = false;
|
||||
@@ -22,30 +28,35 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 25;
|
||||
Projectile.height = 25;
|
||||
Projectile.width = Projectile.height = 40;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.timeLeft = 150 * Projectile.MaxUpdates;
|
||||
}
|
||||
|
||||
// Uses localAI[1] to decide how many frames until the next spear drops.
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f);
|
||||
// Behavior when not sticking to anything
|
||||
if (Projectile.ai[0] == 0f)
|
||||
{
|
||||
// Keep the spear oriented in the correct direction
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||
|
||||
// Spawn dust while flying
|
||||
if (Main.rand.NextBool(8))
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 138, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f);
|
||||
float trailScale = Main.rand.NextFloat(0.8f, 1.2f);
|
||||
Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange;
|
||||
Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor);
|
||||
GeneralParticleHandler.SpawnParticle(eclipseTrail);
|
||||
}
|
||||
}
|
||||
|
||||
// Behavior when having impaled a target
|
||||
@@ -54,12 +65,12 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
// Eclipse's Fall is guaranteed to impale for 10 seconds, no more, no less
|
||||
if (!changedTimeLeft)
|
||||
{
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.timeLeft = 600 * Projectile.MaxUpdates;
|
||||
changedTimeLeft = true;
|
||||
}
|
||||
|
||||
// Spawn spears. As this uses local AI, it's done client-side only.
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
if (Projectile.owner == Main.myPlayer && Projectile.FinalExtraUpdate())
|
||||
{
|
||||
Projectile.localAI[1] -= 1f;
|
||||
|
||||
@@ -67,16 +78,14 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
if (Projectile.localAI[1] <= 0f)
|
||||
{
|
||||
// Set up the spear counter for next time. Used to be every 5 frames there was a 50% chance; now it's more reliable but slower.
|
||||
Projectile.localAI[1] = Main.rand.Next(8, 14); // 8 to 13 frames between each spearfall
|
||||
Projectile.localAI[1] = Main.rand.Next(8, 13); // 8 to 12 frames between each spearfall
|
||||
|
||||
int type = ModContent.ProjectileType<EclipsesSmol>();
|
||||
int smolDamage = (int)(Projectile.damage * 0.22f);
|
||||
float smolKB = 3f;
|
||||
// Used to be a 50% chance each spearfall for 1 or 2. Now is consistent.
|
||||
int numSpears = spawnTwoSpears ? 2 : 1;
|
||||
spawnTwoSpears = !spawnTwoSpears;
|
||||
for (int i = 0; i < numSpears; ++i)
|
||||
CalamityUtils.ProjectileRain(source, Projectile.Center, 400f, 100f, 500f, 800f, 29f, type, smolDamage, smolKB, Projectile.owner);
|
||||
CalamityUtils.ProjectileRain(source, Projectile.Center, 400f, 100f, 500f, 800f, 29f, type, (int)(Projectile.damage * RainDamageMult), Projectile.knockBack * RainDamageMult, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,15 +111,15 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool? CanHitNPC(NPC target)
|
||||
{
|
||||
if (Projectile.ai[0] == 1f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public override bool? CanHitNPC(NPC target) => Projectile.ai[0] == 1f ? false : base.CanHitNPC(target);
|
||||
|
||||
public override bool CanHitPvp(Player target) => Projectile.ai[0] != 1f;
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<EclipseStealthBoom>(), (int)(Projectile.damage * ExplosionDamageMult), Projectile.knockBack * ExplosionDamageMult, Projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,36 +8,33 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public class UmbraphileBoom : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public const int Lifetime = 35; // 7 animation frames, 12 FPS
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 7;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 60;
|
||||
Projectile.height = 60;
|
||||
Projectile.width = Projectile.height = 58;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 5;
|
||||
Projectile.timeLeft = Lifetime;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
public override void AI()
|
||||
{
|
||||
for (int s = 0; s < 20; s++)
|
||||
{
|
||||
int dustType = Main.rand.NextBool() ? 246 : 176;
|
||||
float dustSpeed = Main.rand.NextFloat(3f, 9f);
|
||||
Vector2 dustVel = CalamityUtils.RandomVelocity(10f, dustSpeed, dustSpeed, 1f);
|
||||
int boom = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f);
|
||||
Dust dust = Main.dust[boom];
|
||||
dust.noGravity = true;
|
||||
dust.position = Projectile.Center;
|
||||
dust.position.X += (float)Main.rand.Next(-10, 11);
|
||||
dust.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
dust.velocity = dustVel;
|
||||
}
|
||||
Projectile.frameCounter++;
|
||||
Projectile.frame = Projectile.frameCounter / 5;
|
||||
|
||||
if (Projectile.frameCounter > Lifetime)
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
|
||||
|
After Width: | Height: | Size: 1.0 KiB |