Concealed the identity of a certain someone

This commit is contained in:
Altixal committed 2023-02-20 23:10:36 +07:00
1 parent 4b58acb9e6
commit 126b8fa8fc
7 files changed
+4 -260

No files matched your search

+1 -1
View File
@@ -694,7 +694,7 @@ namespace CalamityMod
{ new Tuple<int, int>(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 184, 200, 270 } }, // 150 in non-rev master mode
{ new Tuple<int, int>(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 248, 348 } }, // 300 in non-rev master mode
{ new Tuple<int, int>(ModContent.NPCType<RavagerBody>(), ModContent.ProjectileType<RavagerBlaster>()), new int[] { 90, 144, 172, 188, 258 } },
// { new Tuple<int, int>(ModContent.NPCType<RavagerBody>(), ModContent.ProjectileType<RavagerBlaster>()), new int[] { 90, 144, 172, 188, 258 } },
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead>(), ModContent.ProjectileType<ScavengerNuke>()), new int[] { 120, 180, 208, 224, 312 } },
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead2>(), ModContent.ProjectileType<ScavengerLaser>()), new int[] { 90, 144, 172, 188, 258 } },
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead2>(), ModContent.ProjectileType<ScavengerNuke>()), new int[] { 120, 180, 208, 224, 312 } },
+2 -2
View File
@@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.Ravager
}
}
if (CalamityWorld.getFixedBoi)
/*if (CalamityWorld.getFixedBoi)
{
bool finalStand = lifeRatio < 0.1f; //At 10% body health, does the funny final attack
NPC.localAI[1]++;
@@ -335,7 +335,7 @@ namespace CalamityMod.NPCs.Ravager
Projectile.NewProjectile(NPC.GetSource_FromAI(), position, velocity, laser, damage, 0f, Main.myPlayer, 1f, (float)movement);
NPC.localAI[1] = 0f;
}
}
}*/
if (!headActive)
{
-183
View File
@@ -1,183 +0,0 @@
using CalamityMod.Projectiles.BaseProjectiles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using System;
using System.IO;
using System.Linq;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class RavagerBlast : BaseLaserbeamProjectile
{
//Modified clone of Seraphim's Laser
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public int OwnerIndex
{
get => (int)Projectile.ai[1];
set => Projectile.ai[1] = value;
}
public bool blue => Projectile.ai[1] < 0f;
public override float MaxScale => Projectile.ai[0];
public override float MaxLaserLength => blue ? 4800f : 2400f;
public override float Lifetime => blue ? 200 : 50;
public override Color LaserOverlayColor
{
get
{
Color c1 = blue ? Color.MediumTurquoise : Color.Gray;
Color c2 = blue ? Color.Cyan : Color.White;
Color color = Color.Lerp(c1, c2, Projectile.identity % 5f / 5f) * 1.1f;
color.A = 0;
return color;
}
}
public override Color LightCastColor => Color.Transparent;
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SeraphimBeamLarge", AssetRequestMode.ImmediateLoad).Value;
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeMiddle", AssetRequestMode.ImmediateLoad).Value;
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeEnd", AssetRequestMode.ImmediateLoad).Value;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ravaging Laser");
Main.projFrames[Projectile.type] = 10;
}
public override void SetDefaults()
{
Projectile.width = Projectile.height = 30;
Projectile.hostile = true;
Projectile.alpha = 255;
Projectile.penetrate = -1;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.timeLeft = 200;
Projectile.Calamity().DealsDefenseDamage = true;
CooldownSlot = ImmunityCooldownID.Bosses;
}
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(Projectile.localAI[0]);
writer.Write(Projectile.localAI[1]);
writer.Write(Projectile.scale);
}
public override void ReceiveExtraAI(BinaryReader reader)
{
Projectile.localAI[0] = reader.ReadSingle();
Projectile.localAI[1] = reader.ReadSingle();
Projectile.scale = reader.ReadSingle();
}
public override void AttachToSomething() { }
public override void UpdateLaserMotion()
{
// Update the direction and rotation of the laser.
Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY);
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
if (blue)
{
float speed = 8f + 8f * Utils.GetLerpValue(Lifetime, 0f, Projectile.timeLeft);
switch (OwnerIndex)
{
case -1: //go right
Projectile.position.X += speed;
break;
case -2: //go left
Projectile.position.X -= speed;
break;
case -3: //go down
Projectile.position.Y += speed;
break;
default: //go up
Projectile.position.Y -= speed;
break;
}
}
}
public override float DetermineLaserLength() => MaxLaserLength;
public override void PostAI()
{
// Determine frames.
Projectile.frameCounter++;
if (Projectile.frameCounter % 5f == 4f)
Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type];
}
// Can hit if white (regardless of condition) or blue only if the player is (close to) still
public override bool CanHitPlayer(Player target) => (!blue || target.velocity.Length() <= 0.25f) && Projectile.scale >= 0.5f;
public override bool PreDraw(ref Color lightColor)
{
// This should never happen, but just in case-
if (Projectile.velocity == Vector2.Zero)
return false;
Color beamColor = LaserOverlayColor;
Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
// Start texture drawing.
Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f;
Main.EntitySpriteDraw(LaserBeginTexture,
centerOnLaser - Main.screenPosition,
startFrameArea,
beamColor,
Projectile.rotation,
LaserBeginTexture.Size() / 2f,
Projectile.scale,
SpriteEffects.None,
0);
// Prepare things for body drawing.
float laserBodyLength = LaserLength + middleFrameArea.Height;
// Body drawing.
if (laserBodyLength > 0f)
{
float laserOffset = middleFrameArea.Height * Projectile.scale;
float incrementalBodyLength = 0f;
while (incrementalBodyLength + 1f < laserBodyLength)
{
centerOnLaser += Projectile.velocity * laserOffset;
incrementalBodyLength += laserOffset;
Main.EntitySpriteDraw(LaserMiddleTexture,
centerOnLaser - Main.screenPosition,
middleFrameArea,
beamColor,
Projectile.rotation,
LaserMiddleTexture.Size() * 0.5f,
Projectile.scale,
SpriteEffects.None,
0);
}
}
Vector2 laserEndCenter = centerOnLaser + Projectile.velocity * endFrameArea.Height * Projectile.scale - Main.screenPosition;
Main.EntitySpriteDraw(LaserEndTexture,
laserEndCenter,
endFrameArea,
beamColor,
Projectile.rotation,
LaserEndTexture.Size() * 0.5f,
Projectile.scale,
SpriteEffects.None,
0);
return false;
}
}
}
-73
View File
@@ -1,73 +0,0 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Boss
{
public class RavagerBlaster : ModProjectile
{
public override string Texture => "CalamityMod/NPCs/Ravager/RavagerHead";
public static readonly SoundStyle SANSCharge = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterCharge");
public static readonly SoundStyle SANSFire = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterFire");
public Vector2 storedVelocity;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ravager Blaster");
}
public override void SetDefaults()
{
Projectile.width = Projectile.height = 80;
Projectile.hostile = true;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.timeLeft = 180;
CooldownSlot = ImmunityCooldownID.Bosses;
}
public override void AI()
{
//ai0 = timer, ai1 = laser size
if (Projectile.ai[0] < 90f) //Before the laser
{
Projectile.ai[0]++;
if (storedVelocity == Vector2.Zero)
{
storedVelocity = Projectile.SafeDirectionTo(Projectile.velocity);
Projectile.velocity = Vector2.Zero;
Projectile.netUpdate = true;
Projectile.rotation = (float)Math.Atan2(storedVelocity.Y, storedVelocity.X) - MathHelper.PiOver2;
SoundEngine.PlaySound(SANSCharge, Projectile.Center); //Funny Gaster Blaster sounds
}
else if (Projectile.ai[0] >= 55f)
{
Projectile.ai[0] = 90f;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<RavagerBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
SoundEngine.PlaySound(SANSFire, Projectile.Center); //Funny Gaster Blaster sounds #2
}
}
else //Move out and despawn
{
//Start moving
if (Projectile.velocity == Vector2.Zero)
Projectile.velocity = storedVelocity * -1f;
else
Projectile.velocity *= 1.01f;
//Fade out and die
Projectile.alpha += 3;
if (Projectile.alpha >= 255)
Projectile.Kill();
}
}
// Does no contact damage
public override bool? CanDamage() => false;
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override bool? CanHitNPC(NPC target)
{
if (Target == target.whoAmI)
if (Projectile.ai[1] == target.whoAmI)
return null;
return (bool?)false;
}
Binary file not shown.
Binary file not shown.