1 - removed elemental accessory instakills
2 - slime god death mode changes
This commit is contained in:
1 parent
16365fcad7
commit
f945038cb7
11 files changed
+81
-105
No files matched your search
@@ -19,8 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"20% increased true melee damage\n" +
|
||||
"Increased invincibility after taking damage\n" +
|
||||
"Temporary immunity to lava\n" +
|
||||
"Increased melee knockback\n" +
|
||||
"Melee attacks have a chance to instantly kill normal enemies");
|
||||
"Increased melee knockback");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Elemental Quiver");
|
||||
Tooltip.SetDefault("Ranged projectiles have a chance to split\n" +
|
||||
"Ranged weapons have a chance to instantly kill normal enemies\n" +
|
||||
"10% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" +
|
||||
"5 increased defense, 2 increased life regen, and 15% increased pick speed\n" +
|
||||
"Greatly increases arrow speed and grants a 20% chance to not consume arrows");
|
||||
|
||||
@@ -15,8 +15,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("15% increased magic damage, 5% increased magic critical strike chance, and 10% decreased mana usage\n" +
|
||||
"+150 max mana and reveals treasure locations if visibility is on\n" +
|
||||
"Increases pickup range for mana stars and you restore mana when damaged\n" +
|
||||
"You automatically use mana potions when needed if visibility is on\n" +
|
||||
"Magic attacks have a chance to instantly kill normal enemies");
|
||||
"You automatically use mana potions when needed if visibility is on");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Rogue projectiles create nanoblades as they travel\n" +
|
||||
"Stealth strikes summon nanobeams and sparks on enemy hits\n" +
|
||||
"Stealth strikes have +20 armor penetration, deal 5% more damage, and heal for 1 HP\n" +
|
||||
"Rogue weapons have a chance to instantly kill normal enemies\n" +
|
||||
"12% increased rogue damage and 15% increased rogue velocity\n" +
|
||||
"Whenever you crit an enemy with a rogue weapon your rogue damage increases\n" +
|
||||
"This effect can stack up to 150 times\n" +
|
||||
|
||||
@@ -14,9 +14,8 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Increased max minions by 4 and 15% increased minion damage\n" +
|
||||
"Increased minion knockback\n" +
|
||||
"Minions inflict a variety of debuffs\n" +
|
||||
"Minions spawn damaging sparks on enemy hits\n" + //subject to change to be "cooler"
|
||||
"Minion attacks have a chance to instantly kill normal enemies");
|
||||
}
|
||||
"Minions spawn damaging sparks on enemy hits"); //subject to change to be "cooler"
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -3345,37 +3345,6 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (!projectile.npcProj && !projectile.trap)
|
||||
{
|
||||
if (ShouldAffectNPC(npc) && Main.rand.NextBool(15) && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
if (modPlayer.eGauntlet && projectile.melee)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.eTalisman && projectile.magic)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.nanotech && projectile.Calamity().rogue)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.eQuiver && projectile.ranged)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.nucleogenesis)
|
||||
{
|
||||
if (projectile.IsSummon())
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.ranged && modPlayer.plagueReaper && pFlames > 0)
|
||||
{
|
||||
damage = (int)(damage * 1.1);
|
||||
|
||||
+21
-18
@@ -67,6 +67,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || npc.localAI[1] == 1f;
|
||||
Vector2 vector = npc.Center;
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
@@ -108,7 +110,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float distanceSpeedBoost = Vector2.Distance(player.Center, vector) * 0.005f;
|
||||
|
||||
if (npc.life <= npc.lifeMax * 0.5 && Main.netMode != NetmodeID.MultiplayerClient && expertMode)
|
||||
if (lifeRatio <= 0.5f && Main.netMode != NetmodeID.MultiplayerClient && expertMode)
|
||||
{
|
||||
Main.PlaySound(SoundID.NPCDeath1, npc.position);
|
||||
Vector2 spawnAt = vector + new Vector2(0f, npc.height / 2f);
|
||||
@@ -146,7 +148,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.localAI[0] = 0f;
|
||||
if (expertMode && Main.rand.NextBool(2))
|
||||
{
|
||||
float num179 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
float num179 = BossRushEvent.BossRushActive ? 16f : 8f;
|
||||
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
float num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -175,7 +177,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
else
|
||||
{
|
||||
float num179 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
float num179 = BossRushEvent.BossRushActive ? 16f : 8f;
|
||||
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
float num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -226,11 +228,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.ai[1] += flag100 ? 1f : 2f;
|
||||
float num1879 = 60f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 12f : 3f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 12f : death ? 3.5f : revenge ? 3f : expertMode ? 2.5f : 2f;
|
||||
if (revenge)
|
||||
{
|
||||
float moveBoost = death ? 20f : 40f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float speedBoost = death ? 2f : 4f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float moveBoost = death ? 80f * (1f - lifeRatio) : 40f * (1f - lifeRatio);
|
||||
float speedBoost = death ? 8f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
|
||||
num1879 -= moveBoost;
|
||||
num1880 += speedBoost;
|
||||
}
|
||||
@@ -268,11 +270,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[2] += 1f;
|
||||
if (revenge)
|
||||
{
|
||||
npc.ai[2] += death ? 1f : 2f * (1f - npc.life / (float)npc.lifeMax);
|
||||
npc.ai[2] += death ? 4f * (1f - lifeRatio) : 2f * (1f - lifeRatio);
|
||||
}
|
||||
if (npc.ai[2] >= 420f && npc.velocity.Y == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
int random = Main.rand.Next(2) + (lifeRatio < 0.75f ? 1 : 0);
|
||||
switch (random)
|
||||
{
|
||||
case 0:
|
||||
npc.ai[0] = 2f;
|
||||
@@ -280,7 +283,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
case 1:
|
||||
npc.ai[0] = 3f;
|
||||
npc.noTileCollide = true;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -12f : -8f;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -16f : death ? -9f : revenge ? -8f : expertMode ? -7f : -6f;
|
||||
break;
|
||||
case 2:
|
||||
npc.ai[0] = 5f;
|
||||
@@ -326,8 +329,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[1] += 1f;
|
||||
vector272 = player.Center - vector;
|
||||
vector272.Normalize();
|
||||
vector272 *= BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
npc.velocity = (npc.velocity * 4f + vector272) / 5f;
|
||||
vector272 *= BossRushEvent.BossRushActive ? 16f : death ? 9f : revenge ? 8f : expertMode ? 7f : 6f;
|
||||
npc.velocity = (npc.velocity * 4f + vector272) / 5f;
|
||||
if (npc.ai[1] > 12f)
|
||||
{
|
||||
npc.ai[1] = 0f;
|
||||
@@ -345,7 +348,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
return;
|
||||
}
|
||||
vector272.Normalize();
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 18f : 10f) + distanceSpeedBoost;
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 18f : death ? 11f : revenge ? 10f : expertMode ? 9f : 8f) + distanceSpeedBoost;
|
||||
npc.velocity = (npc.velocity * 5f + vector272) / 6f;
|
||||
}
|
||||
}
|
||||
@@ -377,7 +380,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.noGravity = true;
|
||||
}
|
||||
npc.velocity.Y += 0.2f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 20f : 14f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 20f : death ? 15f : revenge ? 14f : expertMode ? 13f : 12f;
|
||||
if (npc.velocity.Y > velocityLimit)
|
||||
{
|
||||
npc.velocity.Y = velocityLimit;
|
||||
@@ -410,7 +413,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (value74.Length() > 100f)
|
||||
{
|
||||
value74.Normalize();
|
||||
value74 *= (BossRushEvent.BossRushActive ? 20f : 10f) + distanceSpeedBoost;
|
||||
value74 *= (BossRushEvent.BossRushActive ? 20f : death ? 11f : revenge ? 10f : expertMode ? 9f : 8f) + distanceSpeedBoost;
|
||||
}
|
||||
npc.velocity = (npc.velocity * 4f + value74) / 5f;
|
||||
return;
|
||||
@@ -454,14 +457,14 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
npc.velocity.Y -= 2f;
|
||||
}
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 20f : 10f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 20f : death ? 11f : revenge ? 10f : expertMode ? 9f : 8f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.ai[2] += 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : 6f) + distanceSpeedBoost;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : death ? 6.5f : revenge ? 6f : expertMode ? 5.5f : 5f) + distanceSpeedBoost;
|
||||
if (npc.direction < 0 && npc.velocity.X > -velocityLimit)
|
||||
{
|
||||
npc.velocity.X = -velocityLimit;
|
||||
@@ -501,12 +504,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
Main.dust[num244].velocity *= 0.5f;
|
||||
if (bossLife == 0f && npc.life > 0)
|
||||
{
|
||||
bossLife = (float)npc.lifeMax;
|
||||
bossLife = npc.lifeMax;
|
||||
}
|
||||
float num644 = 1f;
|
||||
if (npc.life > 0)
|
||||
{
|
||||
float num659 = (float)npc.life / (float)npc.lifeMax;
|
||||
float num659 = lifeRatio;
|
||||
num659 = num659 * 0.5f + 0.75f;
|
||||
num659 *= num644;
|
||||
if (num659 != npc.scale)
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
if (npc.position.Y > Main.worldSurface * 16.0)
|
||||
{
|
||||
for (int x = 0; x < 200; x++)
|
||||
for (int x = 0; x < Main.maxNPCs; x++)
|
||||
{
|
||||
if (Main.npc[x].type == ModContent.NPCType<SlimeGod>() || Main.npc[x].type == ModContent.NPCType<SlimeGodSplit>() ||
|
||||
Main.npc[x].type == ModContent.NPCType<SlimeGodRun>() || Main.npc[x].type == ModContent.NPCType<SlimeGodRunSplit>())
|
||||
@@ -365,7 +365,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[3] = 0f;
|
||||
npc.localAI[0] = 0f;
|
||||
npc.localAI[1] = 0f;
|
||||
float chargeVelocity = death ? 12f : 8f;
|
||||
float chargeVelocity = death ? 12f : 9f;
|
||||
npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeVelocity;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || npc.localAI[1] == 1f;
|
||||
Vector2 vector = npc.Center;
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
@@ -111,7 +113,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
float distanceSpeedBoost = Vector2.Distance(player.Center, vector) * 0.005f;
|
||||
|
||||
if (npc.life <= npc.lifeMax * 0.5 && Main.netMode != NetmodeID.MultiplayerClient && expertMode)
|
||||
if (lifeRatio <= 0.5f && Main.netMode != NetmodeID.MultiplayerClient && expertMode)
|
||||
{
|
||||
Main.PlaySound(SoundID.NPCDeath1, npc.position);
|
||||
Vector2 spawnAt = vector + new Vector2(0f, npc.height / 2f);
|
||||
@@ -239,11 +241,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.ai[1] += 1f;
|
||||
float num1879 = 50f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 16f : 4f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 16f : death ? 4.5f : revenge ? 4f : expertMode ? 3.5f : 3f;
|
||||
if (revenge)
|
||||
{
|
||||
float moveBoost = death ? 15f : 30f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float speedBoost = death ? 2f : 4f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float moveBoost = death ? 60f * (1f - lifeRatio) : 30f * (1f - lifeRatio);
|
||||
float speedBoost = death ? 8f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
|
||||
num1879 -= moveBoost;
|
||||
num1880 += speedBoost;
|
||||
}
|
||||
@@ -281,11 +283,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[2] += 1f;
|
||||
if (revenge)
|
||||
{
|
||||
npc.ai[2] += death ? 1f : 2f * (1f - npc.life / (float)npc.lifeMax);
|
||||
npc.ai[2] += death ? 4f * (1f - lifeRatio) : 2f * (1f - lifeRatio);
|
||||
}
|
||||
if (npc.ai[2] >= 360f && npc.velocity.Y == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
int random = Main.rand.Next(2) + (lifeRatio < 0.75f ? 1 : 0);
|
||||
switch (random)
|
||||
{
|
||||
case 0:
|
||||
npc.ai[0] = 2f;
|
||||
@@ -293,7 +296,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
case 1:
|
||||
npc.ai[0] = 3f;
|
||||
npc.noTileCollide = true;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -13f : -9f;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -18f : death ? -10f : revenge ? -9f : expertMode ? -8f : -7f;
|
||||
break;
|
||||
case 2:
|
||||
npc.ai[0] = 5f;
|
||||
@@ -338,7 +341,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[1] += 1f;
|
||||
vector272 = player.Center - vector;
|
||||
vector272.Normalize();
|
||||
vector272 *= BossRushEvent.BossRushActive ? 13f : 9f;
|
||||
vector272 *= BossRushEvent.BossRushActive ? 18f : death ? 10f : revenge ? 9f : expertMode ? 8f : 7f;
|
||||
npc.velocity = (npc.velocity * 4f + vector272) / 5f;
|
||||
if (npc.ai[1] > 12f)
|
||||
{
|
||||
@@ -357,7 +360,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
return;
|
||||
}
|
||||
vector272.Normalize();
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 20f : 11f) + distanceSpeedBoost;
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 20f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost;
|
||||
npc.velocity = (npc.velocity * 5f + vector272) / 6f;
|
||||
}
|
||||
}
|
||||
@@ -389,7 +392,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.noGravity = true;
|
||||
}
|
||||
npc.velocity.Y += 0.2f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 20f : 14f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 20f : death ? 15f : revenge ? 14f : expertMode ? 13f : 12f;
|
||||
if (npc.velocity.Y > velocityLimit)
|
||||
{
|
||||
npc.velocity.Y = velocityLimit;
|
||||
@@ -422,7 +425,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (value74.Length() > 100f)
|
||||
{
|
||||
value74.Normalize();
|
||||
value74 *= (BossRushEvent.BossRushActive ? 22f : 11f) + distanceSpeedBoost;
|
||||
value74 *= (BossRushEvent.BossRushActive ? 22f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost;
|
||||
}
|
||||
npc.velocity = (npc.velocity * 4f + value74) / 5f;
|
||||
return;
|
||||
@@ -466,14 +469,14 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
npc.velocity.Y -= 2f;
|
||||
}
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 22f : 11f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 22f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.ai[2] += 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : 6f) + distanceSpeedBoost;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : death ? 6.5f : revenge ? 6f : expertMode ? 5.5f : 5f) + distanceSpeedBoost;
|
||||
if (npc.direction < 0 && npc.velocity.X > -velocityLimit)
|
||||
{
|
||||
npc.velocity.X = -velocityLimit;
|
||||
@@ -513,12 +516,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
Main.dust[num658].velocity *= 0.5f;
|
||||
if (bossLife == 0f && npc.life > 0)
|
||||
{
|
||||
bossLife = (float)npc.lifeMax;
|
||||
bossLife = npc.lifeMax;
|
||||
}
|
||||
float num644 = 1f;
|
||||
if (npc.life > 0)
|
||||
{
|
||||
float num659 = (float)npc.life / (float)npc.lifeMax;
|
||||
float num659 = lifeRatio;
|
||||
num659 = num659 * 0.5f + 0.75f;
|
||||
num659 *= num644;
|
||||
if (num659 != npc.scale)
|
||||
|
||||
@@ -74,6 +74,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || npc.localAI[1] == 1f;
|
||||
Vector2 vector = npc.Center;
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
@@ -220,11 +222,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.ai[1] += 1f;
|
||||
float num1879 = 35f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 20f : 6f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 20f : death ? 5.5f : revenge ? 5f : expertMode ? 4.5f : 4f;
|
||||
if (revenge)
|
||||
{
|
||||
float moveBoost = death ? 7f : 7f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float speedBoost = death ? 2f : 2f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float moveBoost = death ? 14f * (1f - lifeRatio) : 7f * (1f - lifeRatio);
|
||||
float speedBoost = death ? 4f * (1f - lifeRatio) : 2f * (1f - lifeRatio);
|
||||
num1879 -= moveBoost;
|
||||
num1880 += speedBoost;
|
||||
}
|
||||
@@ -257,11 +259,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[2] += 1f;
|
||||
if (revenge)
|
||||
{
|
||||
npc.ai[2] += (death ? 0.5f : 0.5f * (1f - npc.life / (float)npc.lifeMax));
|
||||
npc.ai[2] += death ? 1f - lifeRatio : 0.5f * (1f - lifeRatio);
|
||||
}
|
||||
if (npc.ai[2] >= 180f && npc.velocity.Y == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
int random = Main.rand.Next(2) + (lifeRatio < 0.5f ? 1 : 0);
|
||||
switch (random)
|
||||
{
|
||||
case 0:
|
||||
npc.ai[0] = 2f;
|
||||
@@ -269,7 +272,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
case 1:
|
||||
npc.ai[0] = 3f;
|
||||
npc.noTileCollide = true;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -14f : -10f;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -20f : death ? -11f : revenge ? -10f : expertMode ? -9f : -8f;
|
||||
break;
|
||||
case 2:
|
||||
npc.ai[0] = 5f;
|
||||
@@ -314,7 +317,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[1] += 1f;
|
||||
vector272 = player.Center - vector;
|
||||
vector272.Normalize();
|
||||
vector272 *= BossRushEvent.BossRushActive ? 14f : 10f;
|
||||
vector272 *= BossRushEvent.BossRushActive ? 20f : death ? 11f : revenge ? 10f : expertMode ? 9f : 8f;
|
||||
npc.velocity = (npc.velocity * 4f + vector272) / 5f;
|
||||
if (npc.ai[1] > 12f)
|
||||
{
|
||||
@@ -333,7 +336,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
return;
|
||||
}
|
||||
vector272.Normalize();
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 22f : 12f) + distanceSpeedBoost;
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 22f : death ? 13f : revenge ? 12f : expertMode ? 11f : 10f) + distanceSpeedBoost;
|
||||
npc.velocity = (npc.velocity * 5f + vector272) / 6f;
|
||||
}
|
||||
}
|
||||
@@ -365,7 +368,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.noGravity = true;
|
||||
}
|
||||
npc.velocity.Y += 0.2f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 22f : 16f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 22f : death ? 16f : revenge ? 15f : expertMode ? 14f : 13f;
|
||||
if (npc.velocity.Y > velocityLimit)
|
||||
{
|
||||
npc.velocity.Y = velocityLimit;
|
||||
@@ -398,7 +401,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (value74.Length() > 50f)
|
||||
{
|
||||
value74.Normalize();
|
||||
value74 *= (BossRushEvent.BossRushActive ? 24f : 12f) + distanceSpeedBoost;
|
||||
value74 *= (BossRushEvent.BossRushActive ? 22f : death ? 13f : revenge ? 12f : expertMode ? 11f : 10f) + distanceSpeedBoost;
|
||||
}
|
||||
npc.velocity = (npc.velocity * 4f + value74) / 5f;
|
||||
return;
|
||||
@@ -442,14 +445,14 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
npc.velocity.Y -= 2f;
|
||||
}
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 22f : 11f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 22f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.ai[2] += 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : 6f) + distanceSpeedBoost;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : death ? 7f : revenge ? 6f : expertMode ? 5f : 4f) + distanceSpeedBoost;
|
||||
if (npc.direction < 0 && npc.velocity.X > -velocityLimit)
|
||||
{
|
||||
npc.velocity.X = -velocityLimit;
|
||||
@@ -489,12 +492,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
Main.dust[num658].velocity *= 0.5f;
|
||||
if (bossLife == 0f && npc.life > 0)
|
||||
{
|
||||
bossLife = (float)npc.lifeMax;
|
||||
bossLife = npc.lifeMax;
|
||||
}
|
||||
float num644 = 1f;
|
||||
if (npc.life > 0)
|
||||
{
|
||||
float num659 = (float)npc.life / (float)npc.lifeMax;
|
||||
float num659 = lifeRatio;
|
||||
num659 = num659 * 0.5f + 0.75f;
|
||||
num659 *= num644;
|
||||
if (num659 != npc.scale)
|
||||
|
||||
@@ -74,6 +74,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || npc.localAI[1] == 1f;
|
||||
Vector2 vector = npc.Center;
|
||||
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
npc.defense = npc.defDefense;
|
||||
npc.damage = npc.defDamage;
|
||||
if (npc.localAI[1] == 1f)
|
||||
@@ -136,7 +138,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.localAI[0] = 0f;
|
||||
if (expertMode && Main.rand.NextBool(2))
|
||||
{
|
||||
float num179 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
float num179 = BossRushEvent.BossRushActive ? 16f : 8f;
|
||||
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
float num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -162,7 +164,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
else
|
||||
{
|
||||
float num179 = BossRushEvent.BossRushActive ? 12f : 8f;
|
||||
float num179 = BossRushEvent.BossRushActive ? 16f : 8f;
|
||||
Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
float num180 = player.position.X + (float)player.width * 0.5f - value9.X;
|
||||
float num181 = Math.Abs(num180) * 0.1f;
|
||||
@@ -213,11 +215,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.velocity.X *= 0.8f;
|
||||
npc.ai[1] += flag100 ? 1f : 2f;
|
||||
float num1879 = 40f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 16f : 5f;
|
||||
float num1880 = BossRushEvent.BossRushActive ? 15f : death ? 5.5f : revenge ? 5f : expertMode ? 4.5f : 4f;
|
||||
if (revenge)
|
||||
{
|
||||
float moveBoost = death ? 10f : 10f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float speedBoost = death ? 2f : 2f * (1f - npc.life / (float)npc.lifeMax);
|
||||
float moveBoost = death ? 20f * (1f - lifeRatio) : 10f * (1f - lifeRatio);
|
||||
float speedBoost = death ? 4f * (1f - lifeRatio) : 2f * (1f - lifeRatio);
|
||||
num1879 -= moveBoost;
|
||||
num1880 += speedBoost;
|
||||
}
|
||||
@@ -250,11 +252,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[2] += 1f;
|
||||
if (revenge)
|
||||
{
|
||||
npc.ai[2] += death ? 0.5f : 0.5f * (1f - npc.life / (float)npc.lifeMax);
|
||||
npc.ai[2] += death ? 1f - lifeRatio : 0.5f * (1f - lifeRatio);
|
||||
}
|
||||
if (npc.ai[2] >= 210f && npc.velocity.Y == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
switch (Main.rand.Next(3))
|
||||
int random = Main.rand.Next(2) + (lifeRatio < 0.5f ? 1 : 0);
|
||||
switch (random)
|
||||
{
|
||||
case 0:
|
||||
npc.ai[0] = 2f;
|
||||
@@ -262,7 +265,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
case 1:
|
||||
npc.ai[0] = 3f;
|
||||
npc.noTileCollide = true;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -13f : -9f;
|
||||
npc.velocity.Y = BossRushEvent.BossRushActive ? -18f : death ? -10f : revenge ? -9f : expertMode ? -8f : -7f;
|
||||
break;
|
||||
case 2:
|
||||
npc.ai[0] = 5f;
|
||||
@@ -308,7 +311,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.ai[1] += 1f;
|
||||
vector272 = player.Center - vector;
|
||||
vector272.Normalize();
|
||||
vector272 *= BossRushEvent.BossRushActive ? 13f : 9f;
|
||||
vector272 *= BossRushEvent.BossRushActive ? 18f : death ? 10f : revenge ? 9f : expertMode ? 8f : 7f;
|
||||
npc.velocity = (npc.velocity * 4f + vector272) / 5f;
|
||||
if (npc.ai[1] > 12f)
|
||||
{
|
||||
@@ -327,7 +330,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
return;
|
||||
}
|
||||
vector272.Normalize();
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 19f : 11f) + distanceSpeedBoost;
|
||||
vector272 *= (BossRushEvent.BossRushActive ? 20f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost;
|
||||
npc.velocity = (npc.velocity * 5f + vector272) / 6f;
|
||||
}
|
||||
}
|
||||
@@ -359,7 +362,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.noGravity = true;
|
||||
}
|
||||
npc.velocity.Y += 0.2f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 22f : 16f;
|
||||
float velocityLimit = BossRushEvent.BossRushActive ? 20f : death ? 15f : revenge ? 14f : expertMode ? 13f : 12f;
|
||||
if (npc.velocity.Y > velocityLimit)
|
||||
{
|
||||
npc.velocity.Y = velocityLimit;
|
||||
@@ -392,7 +395,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (value74.Length() > 50f)
|
||||
{
|
||||
value74.Normalize();
|
||||
value74 *= (BossRushEvent.BossRushActive ? 22f : 11f) + distanceSpeedBoost;
|
||||
value74 *= (BossRushEvent.BossRushActive ? 22f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost;
|
||||
}
|
||||
npc.velocity = (npc.velocity * 4f + value74) / 5f;
|
||||
return;
|
||||
@@ -436,14 +439,14 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
{
|
||||
npc.velocity.Y -= 2f;
|
||||
}
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 20f : 10f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.velocity.X = ((BossRushEvent.BossRushActive ? 22f : death ? 12f : revenge ? 11f : expertMode ? 10f : 9f) + distanceSpeedBoost) * npc.direction;
|
||||
npc.ai[2] += 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X *= 0.98f;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : 6f) + distanceSpeedBoost;
|
||||
float velocityLimit = (BossRushEvent.BossRushActive ? 12f : death ? 6.5f : revenge ? 6f : expertMode ? 5.5f : 5f) + distanceSpeedBoost;
|
||||
if (npc.direction < 0 && npc.velocity.X > -velocityLimit)
|
||||
{
|
||||
npc.velocity.X = -velocityLimit;
|
||||
@@ -483,12 +486,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
Main.dust[num244].velocity *= 0.5f;
|
||||
if (bossLife == 0f && npc.life > 0)
|
||||
{
|
||||
bossLife = (float)npc.lifeMax;
|
||||
bossLife = npc.lifeMax;
|
||||
}
|
||||
float num644 = 1f;
|
||||
if (npc.life > 0)
|
||||
{
|
||||
float num659 = (float)npc.life / (float)npc.lifeMax;
|
||||
float num659 = lifeRatio;
|
||||
num659 = num659 * 0.5f + 0.75f;
|
||||
num659 *= num644;
|
||||
if (num659 != npc.scale)
|
||||
|
||||
Reference in new issue
Block a user