1 - Artemis and Apollo laser and fireball projectile resprites.

This commit is contained in:
Andrew Marheine committed 2021-10-11 16:28:16 -05:00
1 parent ecedcdf523
commit 3e96c291f1
12 files changed
+475 -39

No files matched your search

+3 -3
View File
@@ -735,12 +735,12 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
pickNewLocation = true;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int type = ModContent.ProjectileType<AresPlasmaFireball>();
int type = ModContent.ProjectileType<ApolloFireball>();
int damage = npc.GetProjectileDamage(type);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaCasterFire"), npc.Center);
Vector2 plasmaVelocity = Vector2.Normalize(aimedVector) * projectileVelocity;
Vector2 offset = Vector2.Normalize(plasmaVelocity) * 70f;
Projectile.NewProjectile(npc.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, -1f);
Projectile.NewProjectile(npc.Center + offset, plasmaVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
}
}
}
@@ -931,7 +931,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
int totalProjectiles = CalamityWorld.malice ? 12 : 8;
float radians = MathHelper.TwoPi / totalProjectiles;
int type = ModContent.ProjectileType<AresPlasmaBolt>();
int damage = (int)(npc.GetProjectileDamage(ModContent.ProjectileType<AresPlasmaFireball>()) * 0.8);
int damage = (int)(npc.GetProjectileDamage(ModContent.ProjectileType<ApolloFireball>()) * 0.8);
float velocity = 12f;
double angleA = radians * 0.5;
double angleB = MathHelper.ToRadians(90f) - angleA;
+1 -1
View File
@@ -367,7 +367,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
Vector2 offset = Vector2.Normalize(plasmaBoltVelocity) * 40f + Vector2.UnitY * 16f;
if (boltsSplitLess)
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -2f);
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, -1f);
else
Projectile.NewProjectile(npc.Center + offset, plasmaBoltVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y);
}
+3 -3
View File
@@ -735,7 +735,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
// Fire a spread of projectiles in the direction of the charge
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int type = ModContent.ProjectileType<ThanatosLaser>();
int type = ModContent.ProjectileType<ArtemisLaser>();
int damage = npc.GetProjectileDamage(type);
Vector2 laserVelocity = chargeVelocityNormalized * 10f;
int numLasersPerSpread = 6;
@@ -782,7 +782,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
pickNewLocation = true;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int type = ModContent.ProjectileType<ThanatosLaser>();
int type = ModContent.ProjectileType<ArtemisLaser>();
int damage = npc.GetProjectileDamage(type);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center);
Vector2 laserVelocity = Vector2.Normalize(aimedVector);
@@ -903,7 +903,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
pickNewLocation = true;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int type = ModContent.ProjectileType<ThanatosLaser>();
int type = ModContent.ProjectileType<ArtemisLaser>();
int damage = npc.GetProjectileDamage(type);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center);
+229
View File
@@ -0,0 +1,229 @@
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class ApolloFireball : ModProjectile
{
private const int timeLeft = 60;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Volatile Plasma Blast");
Main.projFrames[projectile.type] = 6;
ProjectileID.Sets.TrailCacheLength[projectile.type] = 4;
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
}
public override void SetDefaults()
{
projectile.Calamity().canBreakPlayerDefense = true;
projectile.width = 48;
projectile.height = 48;
projectile.hostile = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.penetrate = -1;
projectile.Opacity = 0f;
cooldownSlot = 1;
projectile.timeLeft = timeLeft;
projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true;
}
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(projectile.localAI[0]);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
projectile.localAI[0] = reader.ReadSingle();
}
public override void AI()
{
Vector2 targetLocation = new Vector2(projectile.ai[0], projectile.ai[1]);
if (Vector2.Distance(targetLocation, projectile.Center) < 80f)
projectile.tileCollide = true;
int fadeInTime = 3;
projectile.Opacity = MathHelper.Clamp(1f - ((projectile.timeLeft - (timeLeft - fadeInTime)) / (float)fadeInTime), 0f, 1f);
Lighting.AddLight(projectile.Center, 0f, 0.6f * projectile.Opacity, 0f);
projectile.frameCounter++;
if (projectile.frameCounter > 4)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 5)
projectile.frame = 0;
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) - MathHelper.PiOver2;
if (projectile.localAI[0] == 0f)
{
projectile.localAI[0] = 1f;
float speed1 = 1.8f;
float speed2 = 2.8f;
float angleRandom = 0.35f;
for (int num53 = 0; num53 < 40; num53++)
{
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(projectile.velocity.ToRotation());
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool(2) ? 107 : 110;
int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 200, default, 1.7f);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * projectile.width / 2f;
Main.dust[num54].noGravity = true;
Dust dust = Main.dust[num54];
dust.velocity *= 3f;
dust = Main.dust[num54];
num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 100, default, 0.8f);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * projectile.width / 2f;
dust = Main.dust[num54];
dust.velocity *= 2f;
Main.dust[num54].noGravity = true;
Main.dust[num54].fadeIn = 1f;
Main.dust[num54].color = Color.Green * 0.5f;
dust = Main.dust[num54];
}
for (int num55 = 0; num55 < 20; num55++)
{
float dustSpeed = Main.rand.NextFloat(speed1, speed2);
Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(projectile.velocity.ToRotation());
dustVel = dustVel.RotatedBy(-angleRandom);
dustVel = dustVel.RotatedByRandom(2.0f * angleRandom);
int randomDustType = Main.rand.NextBool(2) ? 107 : 110;
int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, randomDustType, dustVel.X, dustVel.Y, 0, default, 2f);
Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(projectile.velocity.ToRotation()) * projectile.width / 3f;
Main.dust[num56].noGravity = true;
Dust dust = Main.dust[num56];
dust.velocity *= 0.5f;
dust = Main.dust[num56];
}
}
}
public override bool CanHitPlayer(Player target) => projectile.Opacity == 1f;
public override void OnHitPlayer(Player target, int damage, bool crit)
{
if (projectile.Opacity != 1f)
return;
target.AddBuff(BuffID.OnFire, 360);
target.AddBuff(BuffID.CursedInferno, 180);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
lightColor.R = (byte)(255 * projectile.Opacity);
lightColor.G = (byte)(255 * projectile.Opacity);
lightColor.B = (byte)(255 * projectile.Opacity);
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
return false;
}
public override void Kill(int timeLeft)
{
int height = 90;
projectile.position = projectile.Center;
projectile.width = projectile.height = height;
projectile.Center = projectile.position;
projectile.Damage();
Main.PlaySound(SoundID.Item93, projectile.Center);
if (Main.myPlayer == projectile.owner)
{
// Plasma bolts
int totalProjectiles = CalamityWorld.malice ? 6 : 4;
float radians = MathHelper.TwoPi / totalProjectiles;
int type = ModContent.ProjectileType<AresPlasmaBolt>();
float velocity = projectile.velocity.Length();
double angleA = radians * 0.5;
double angleB = MathHelper.ToRadians(90f) - angleA;
float velocityX2 = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB));
Vector2 spinningPoint = Main.rand.NextBool() ? new Vector2(0f, -velocity) : new Vector2(-velocityX2, -velocity);
for (int k = 0; k < totalProjectiles; k++)
{
Vector2 velocity2 = spinningPoint.RotatedBy(radians * k);
Projectile.NewProjectile(projectile.Center, velocity2, type, (int)(projectile.damage * 0.8), 0f, Main.myPlayer);
}
}
for (int num640 = 0; num640 < 200; num640++)
{
float num641 = 16f;
if (num640 < 150)
num641 = 12f;
if (num640 < 100)
num641 = 8f;
if (num640 < 50)
num641 = 4f;
int num643 = Dust.NewDust(projectile.Center, 6, 6, Main.rand.NextBool(2) ? 107 : 110, 0f, 0f, 100, default, 1f);
float num644 = Main.dust[num643].velocity.X;
float num645 = Main.dust[num643].velocity.Y;
if (num644 == 0f && num645 == 0f)
num644 = 1f;
float num646 = (float)Math.Sqrt(num644 * num644 + num645 * num645);
num646 = num641 / num646;
num644 *= num646;
num645 *= num646;
float scale = 1f;
switch ((int)num641)
{
case 4:
scale = 1.2f;
break;
case 8:
scale = 1.1f;
break;
case 12:
scale = 1f;
break;
case 16:
scale = 0.9f;
break;
default:
break;
}
Dust dust = Main.dust[num643];
dust.velocity *= 0.5f;
dust.velocity.X = dust.velocity.X + num644;
dust.velocity.Y = dust.velocity.Y + num645;
dust.scale = scale;
dust.noGravity = true;
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

+1 -1
View File
@@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Boss
Texture2D beamEnd = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd");
float drawLength = projectile.localAI[1];
Color color = new Color(250, 100, 100, 0);
Color color = new Color(250, 250, 250, 100);
if (projectile.localAI[0] % 5f == 0f)
{
+6 -14
View File
@@ -48,19 +48,11 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
if (projectile.ai[0] != -2f)
if (projectile.ai[0] != -1f)
{
if (projectile.ai[0] != -1f)
{
Vector2 targetLocation = new Vector2(projectile.ai[0], projectile.ai[1]);
if (Vector2.Distance(targetLocation, projectile.Center) < 80f)
projectile.tileCollide = true;
}
else
{
if (projectile.timeLeft < timeLeft / 2)
projectile.Kill();
}
Vector2 targetLocation = new Vector2(projectile.ai[0], projectile.ai[1]);
if (Vector2.Distance(targetLocation, projectile.Center) < 80f)
projectile.tileCollide = true;
}
int fadeInTime = 3;
@@ -169,8 +161,8 @@ namespace CalamityMod.Projectiles.Boss
// Plasma bolts
int totalProjectiles = CalamityWorld.malice ? 12 : 8;
// Reduce the total amount of projectiles by half if Apollo is shooting them or Ares Plasma Arm is shooting them and in deathray phase and not the last mech
if (projectile.ai[0] == -1f || projectile.ai[0] == -2f)
// Reduce the total amount of projectiles by half if Ares Plasma Arm is shooting them and in deathray phase and not the last mech
if (projectile.ai[0] == -1f)
totalProjectiles /= 2;
float radians = MathHelper.TwoPi / totalProjectiles;
+226
View File
@@ -0,0 +1,226 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.NPCs.ExoMechs.Ares;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.IO;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class ArtemisLaser : ModProjectile
{
public float TelegraphDelay
{
get => projectile.ai[0];
set => projectile.ai[0] = value;
}
public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[1]) ? Main.npc[(int)projectile.ai[1]] : null;
public Vector2 Destination;
public Vector2 Velocity;
public const float TelegraphTotalTime = 30f;
public const float TelegraphFadeTime = 15f;
public const float TelegraphWidth = 4200f;
public const float LaserVelocity = 10f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Exo Pulse Laser");
Main.projFrames[projectile.type] = 4;
}
public override void SetDefaults()
{
projectile.Calamity().canBreakPlayerDefense = true;
projectile.width = 22;
projectile.height = 22;
projectile.hostile = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.alpha = 255;
projectile.penetrate = -1;
projectile.extraUpdates = 1;
projectile.timeLeft = 600;
cooldownSlot = 1;
}
public override void SendExtraAI(BinaryWriter writer)
{
writer.WriteVector2(Destination);
writer.WriteVector2(Velocity);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
Destination = reader.ReadVector2();
Velocity = reader.ReadVector2();
}
public override void AI()
{
// Determine the relative opacities for each player based on their distance.
// This has a lower bound of 0.35 to prevent the laser from going completely invisible and players getting hit by cheap shots.
if (projectile.localAI[0] == 0f)
{
projectile.localAI[0] = 1f;
projectile.netUpdate = true;
}
projectile.frameCounter++;
if (projectile.frameCounter > 12)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
projectile.frame = 0;
Lighting.AddLight(projectile.Center, 0.6f, 0f, 0f);
// Die if the thing to attach to disappears.
if (ThingToAttachTo is null || !ThingToAttachTo.active)
{
projectile.Kill();
return;
}
// Fade in after telegraphs have faded.
if (TelegraphDelay > TelegraphTotalTime)
{
if (projectile.alpha > 0)
projectile.alpha -= 25;
if (projectile.alpha < 0)
projectile.alpha = 0;
// If a velocity is in reserve, set the true velocity to it and make it as "taken" by setting it to <0,0>
if (Velocity != Vector2.Zero)
{
projectile.extraUpdates = 3;
projectile.velocity = Velocity * (CalamityWorld.malice ? 1.25f : 1f);
Velocity = Vector2.Zero;
projectile.netUpdate = true;
}
// Direction and rotation.
if (projectile.velocity.X < 0f)
{
projectile.spriteDirection = -1;
projectile.rotation = (float)Math.Atan2((double)-(double)projectile.velocity.Y, (double)-(double)projectile.velocity.X);
}
else
{
projectile.spriteDirection = 1;
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X);
}
}
else if (Destination == Vector2.Zero)
{
// Set start of telegraph to the npc center.
projectile.Center = ThingToAttachTo.Center;
// Set destination of the laser, the target's center.
Destination = projectile.velocity;
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
Velocity = Vector2.Normalize(projectileDestination) * LaserVelocity;
// Set velocity to zero.
projectile.velocity = Vector2.Zero;
projectile.netUpdate = true;
// Direction and rotation.
if (projectile.velocity.X < 0f)
{
projectile.spriteDirection = -1;
projectile.rotation = (float)Math.Atan2((double)-(double)Velocity.Y, (double)-(double)Velocity.X);
}
else
{
projectile.spriteDirection = 1;
projectile.rotation = (float)Math.Atan2((double)Velocity.Y, (double)Velocity.X);
}
}
else
{
// Set start of telegraph to the npc center.
projectile.Center = ThingToAttachTo.Center;
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
Velocity = Vector2.Normalize(projectileDestination) * LaserVelocity;
// Direction and rotation.
if (projectile.velocity.X < 0f)
{
projectile.spriteDirection = -1;
projectile.rotation = (float)Math.Atan2((double)-(double)Velocity.Y, (double)-(double)Velocity.X);
}
else
{
projectile.spriteDirection = 1;
projectile.rotation = (float)Math.Atan2((double)Velocity.Y, (double)Velocity.X);
}
}
TelegraphDelay++;
}
public override bool CanHitPlayer(Player target) => TelegraphDelay > TelegraphTotalTime;
public override void OnHitPlayer(Player target, int damage, bool crit)
{
if (TelegraphDelay > TelegraphTotalTime)
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (TelegraphDelay >= TelegraphTotalTime)
{
lightColor.R = (byte)(255 * projectile.Opacity);
lightColor.G = (byte)(255 * projectile.Opacity);
lightColor.B = (byte)(255 * projectile.Opacity);
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
return false;
}
Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam");
float yScale = 2f;
if (TelegraphDelay < TelegraphFadeTime)
yScale = MathHelper.Lerp(0f, 2f, TelegraphDelay / 15f);
if (TelegraphDelay > TelegraphTotalTime - TelegraphFadeTime)
yScale = MathHelper.Lerp(2f, 0f, (TelegraphDelay - (TelegraphTotalTime - TelegraphFadeTime)) / 15f);
Vector2 scaleInner = new Vector2(TelegraphWidth / laserTelegraph.Width, yScale);
Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f);
Vector2 scaleOuter = scaleInner * new Vector2(1f, 2.2f);
Color colorOuter = Color.Lerp(Color.Orange, Color.OrangeRed, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through orange and dark orange once and then flash.
Color colorInner = Color.Lerp(colorOuter, Color.White, 0.75f);
colorOuter *= 0.6f;
colorInner *= 0.6f;
spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, Velocity.ToRotation(), origin, scaleInner, SpriteEffects.None, 0f);
spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, Velocity.ToRotation(), origin, scaleOuter, SpriteEffects.None, 0f);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

+1 -1
View File
@@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Boss
Texture2D beamEnd = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/ThanatosBeamEnd");
float drawLength = LengthOfLaser;
Color color = new Color(250, 100, 100, 0);
Color color = new Color(250, 250, 250, 100);
if (Time % 5 == 0)
{
+3 -14
View File
@@ -1,6 +1,5 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.NPCs.ExoMechs.Ares;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -149,9 +148,6 @@ namespace CalamityMod.Projectiles.Boss
// If the Ares Laser Cannon is the owner.
bool aresLaserIsOwner = ThingToAttachTo.type == ModContent.NPCType<AresLaserCannon>();
// If Artemis is the owner.
bool artemisIsOwner = ThingToAttachTo.type == ModContent.NPCType<Artemis>();
// Fade in after telegraphs have faded.
if (TelegraphDelay > TelegraphTotalTime)
{
@@ -191,8 +187,6 @@ namespace CalamityMod.Projectiles.Boss
if (aresLaserIsOwner)
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f;
else if (artemisIsOwner)
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
@@ -221,8 +215,6 @@ namespace CalamityMod.Projectiles.Boss
if (aresLaserIsOwner)
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f;
else if (artemisIsOwner)
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
@@ -259,14 +251,11 @@ namespace CalamityMod.Projectiles.Boss
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
// If Artemis is the owner.
bool artemisIsOwner = projectile.ai[1] == -1f ? false : ThingToAttachTo.type == ModContent.NPCType<Artemis>();
if (TelegraphDelay >= TelegraphTotalTime)
{
lightColor.R = (byte)(255 * projectile.Opacity);
lightColor.G = (byte)((artemisIsOwner ? 180 : 255) * projectile.Opacity);
lightColor.B = (byte)((artemisIsOwner ? 100 : 255) * projectile.Opacity);
lightColor.G = (byte)(255 * projectile.Opacity);
lightColor.B = (byte)(255 * projectile.Opacity);
CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1);
return false;
}
@@ -283,7 +272,7 @@ namespace CalamityMod.Projectiles.Boss
Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f);
Vector2 scaleOuter = scaleInner * new Vector2(1f, 2.2f);
Color colorOuter = Color.Lerp(artemisIsOwner ? Color.Orange : Color.Red, artemisIsOwner ? Color.OrangeRed : Color.Crimson, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through crimson and red once and then flash.
Color colorOuter = Color.Lerp(Color.Red, Color.Crimson, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through crimson and red once and then flash.
Color colorInner = Color.Lerp(colorOuter, Color.White, 0.75f);
colorOuter *= 0.6f;
+2 -2
View File
@@ -807,8 +807,8 @@ namespace CalamityMod
{ new Tuple<int, int>(ModContent.NPCType<SupremeCatastrophe>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 350, 528, 556, 572, 834 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisLaserBeamStart>()), new int[] { 450, 676, 712, 732, 1068 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ThanatosLaser>()), new int[] { 350, 528, 556, 572, 834 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<AresPlasmaFireball>()), new int[] { 400, 600, 632, 648, 948 } },
{ new Tuple<int, int>(ModContent.NPCType<Artemis>(), ModContent.ProjectileType<ArtemisLaser>()), new int[] { 350, 528, 556, 572, 834 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloFireball>()), new int[] { 400, 600, 632, 648, 948 } },
{ new Tuple<int, int>(ModContent.NPCType<Apollo>(), ModContent.ProjectileType<ApolloRocket>()), new int[] { 450, 676, 712, 732, 1068 } },
{ new Tuple<int, int>(ModContent.NPCType<ThanatosHead>(), ModContent.ProjectileType<ThanatosBeamStart>()), new int[] { 500, 752, 788, 808, 1182 } },