Probe laser 1 second telegraph.
This commit is contained in:
1 parent
de609a51f9
commit
cae39de9d4
4 files changed
+34
-3
No files matched your search
@@ -108,6 +108,9 @@ namespace CalamityMod
|
||||
// Destroyer glowmasks
|
||||
public static Asset<Texture2D>[] DestroyerGlowmasks = new Asset<Texture2D>[3];
|
||||
|
||||
// Probe glowmask
|
||||
public static Asset<Texture2D> ProbeGlowmask;
|
||||
|
||||
// Wall of Flesh glowmasks
|
||||
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
|
||||
public static Asset<Texture2D> WallOfFleshDemonSickleTexture;
|
||||
@@ -286,6 +289,9 @@ namespace CalamityMod
|
||||
DestroyerGlowmasks[1] = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad);
|
||||
DestroyerGlowmasks[2] = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// Probe glowmask
|
||||
ProbeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/ProbeGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// Wall of Flesh glowmasks
|
||||
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
|
||||
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 594 B |
@@ -7328,6 +7328,25 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
// Laser telegraph
|
||||
else if (npc.type == NPCID.Probe)
|
||||
{
|
||||
float eyeTelegraphGateValue = (NPC.IsMechQueenUp ? DestroyerAI.ProbeLaserGateValue_Mechdusa : BossRushEvent.BossRushActive ? DestroyerAI.ProbeLaserGateValue_BossRush : revenge ? DestroyerAI.ProbeLaserGateValue_Rev : DestroyerAI.ProbeLaserGateValue) - DestroyerAI.ProbeLaserTelegraphTime;
|
||||
Texture2D glowTexture = CalamityConfig.Instance.NewVanillaTextures ? CalamityMod.ProbeGlowmask.Value : TextureAssets.Npc[npc.type].Value;
|
||||
Vector2 halfSize = npc.frame.Size() / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (npc.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
float colorScale = MathHelper.Clamp((npc.localAI[0] - eyeTelegraphGateValue) / DestroyerAI.ProbeLaserTelegraphTime, 0f, 1f);
|
||||
Color drawColor2 = Color.Lerp(new Color(150, 0, 0, 192), new Color(255, 100, 150, 192), colorScale);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
spriteBatch.Draw(glowTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame,
|
||||
drawColor2, npc.rotation, halfSize, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
// Create additional afterimages in the cardinal directions in Rev+
|
||||
|
||||
@@ -29,6 +29,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
public const float FlightTelegraphStartGateValue = FlightPhaseGateValue - PhaseTransitionTelegraphTime;
|
||||
private const int OneInXChanceToFireLaser = 200;
|
||||
|
||||
public const float ProbeLaserGateValue_Mechdusa = 360f;
|
||||
public const float ProbeLaserGateValue_Rev = 240f;
|
||||
public const float ProbeLaserGateValue_BossRush = 150f;
|
||||
public const float ProbeLaserGateValue = 120f;
|
||||
public const float ProbeLaserTelegraphTime = 60f;
|
||||
|
||||
public static bool BuffedDestroyerAI(NPC npc, Mod mod)
|
||||
{
|
||||
int mechdusaCurvedSpineSegmentIndex = 0;
|
||||
@@ -1894,7 +1900,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (npc.justHit && !masterMode)
|
||||
npc.localAI[0] = 0f;
|
||||
|
||||
float laserGateValue = NPC.IsMechQueenUp ? 360f : bossRush ? 150f : 240f;
|
||||
float laserGateValue = NPC.IsMechQueenUp ? ProbeLaserGateValue_Mechdusa : bossRush ? ProbeLaserGateValue_BossRush : ProbeLaserGateValue_Rev;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= laserGateValue)
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
@@ -2150,9 +2156,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (npc.justHit && !Main.masterMode)
|
||||
npc.localAI[0] = 0f;
|
||||
|
||||
float num10 = 120f;
|
||||
float num10 = ProbeLaserGateValue;
|
||||
if (NPC.IsMechQueenUp)
|
||||
num10 = 360f;
|
||||
num10 = ProbeLaserGateValue_Mechdusa;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= num10)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user