1 - Ravager free head always targets the same player as the body.
2 - Ravager free head can fire nukes, but at less frequency than the original head.
This commit is contained in:
1 parent
ac81bb5919
commit
9e06c9633f
4 files changed
+15
-16
No files matched your search
@@ -2,7 +2,6 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
||||
using CalamityMod.Items.TreasureBags;
|
||||
@@ -89,7 +88,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (npc.justHit || npc.life <= npc.lifeMax * 0.99 || BossRushEvent.BossRushActive)
|
||||
if (npc.justHit || npc.life <= npc.lifeMax * 0.999 || BossRushEvent.BossRushActive)
|
||||
music = CalamityMod.Instance.GetMusicFromMusicMod("AquaticScourge") ?? MusicID.Boss2;
|
||||
|
||||
CalamityAI.AquaticScourgeAI(npc, mod, true);
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs
|
||||
bool death = CalamityWorld.death || malice;
|
||||
|
||||
// Adjust hostility and stats
|
||||
if (npc.justHit || npc.life <= npc.lifeMax * 0.99 || BossRushEvent.BossRushActive)
|
||||
if (npc.justHit || npc.life <= npc.lifeMax * 0.999 || BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (calamityGlobalNPC.newAI[0] == 0f)
|
||||
{
|
||||
|
||||
@@ -186,6 +186,11 @@ namespace CalamityMod.NPCs
|
||||
public const int slowingDebuffResistanceMin = 1800;
|
||||
public int debuffResistanceTimer = 0;
|
||||
|
||||
// If a boss is affected by knockback and a timer for how long that boss is immune to knockback after being knocked back
|
||||
public bool bossCanBeKnockedBack = false;
|
||||
public const int knockbackResistanceMin = 180;
|
||||
public int knockbackResistanceTimer = 0;
|
||||
|
||||
// Debuffs
|
||||
public int vaporfied = 0;
|
||||
public int timeSlow = 0;
|
||||
@@ -3800,6 +3805,8 @@ namespace CalamityMod.NPCs
|
||||
// Debuff decrements
|
||||
if (debuffResistanceTimer > 0)
|
||||
debuffResistanceTimer--;
|
||||
if (knockbackResistanceTimer > 0)
|
||||
knockbackResistanceTimer--;
|
||||
|
||||
if (timeSlow > 0)
|
||||
timeSlow--;
|
||||
|
||||
@@ -57,6 +57,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.scavenger].target];
|
||||
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
|
||||
@@ -64,17 +66,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (npc.timeLeft < 1800)
|
||||
npc.timeLeft = 1800;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Target variable
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
// Rotation
|
||||
float num801 = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2);
|
||||
float num802 = npc.position.Y + npc.height - 59f - player.position.Y - (player.height / 2);
|
||||
@@ -124,8 +115,10 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item33, npc.position);
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Normalize(player.Center - npc.Center) * projectileVelocity, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, -1f);
|
||||
Main.PlaySound(SoundID.Item62, npc.position);
|
||||
type = ModContent.ProjectileType<ScavengerNuke>();
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Normalize(player.Center - npc.Center) * projectileVelocity * 0.25f, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, Main.npc[CalamityGlobalNPC.scavenger].target, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user