Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
25504a7350
10 files changed
+54
-42
No files matched your search
@@ -280,7 +280,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// If Revengeance Mode is not active, then set rippers to zero
|
||||
else if(player.whoAmI == Main.myPlayer)
|
||||
else if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
modPlayer.rage = 0;
|
||||
modPlayer.adrenaline = 0;
|
||||
@@ -578,7 +578,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat());
|
||||
|
||||
if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3))
|
||||
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 1f, 0f);
|
||||
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 2f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -167,12 +167,9 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
npc.rotation = npc.velocity.X * 0.1f;
|
||||
}
|
||||
|
||||
if (!Main.raining && !CalamityWorld.bossRushActive)
|
||||
{
|
||||
CalamityUtils.StartRain();
|
||||
}
|
||||
CalamityMod.StopRain();
|
||||
|
||||
if (!player.active || player.dead)
|
||||
if (!player.active || player.dead)
|
||||
{
|
||||
npc.TargetClosest(false);
|
||||
player = Main.player[npc.target];
|
||||
|
||||
@@ -37,12 +37,12 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
npc.alpha -= 3;
|
||||
npc.alpha -= 3;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
|
||||
npc.rotation += 0.15f;
|
||||
|
||||
if (npc.type == ModContent.NPCType<CryogenIce>())
|
||||
{
|
||||
int num989 = (int)npc.ai[0];
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
npc.position = Main.npc[num989].Center;
|
||||
npc.position.X = npc.position.X - (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
|
||||
npc.gfxOffY = Main.npc[num989].gfxOffY;
|
||||
npc.gfxOffY = Main.npc[num989].gfxOffY + 14;
|
||||
return;
|
||||
}
|
||||
npc.life = 0;
|
||||
|
||||
@@ -610,7 +610,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
if (bulletHellCounter2 % 240 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
bulletHellCounter += 1;
|
||||
if (bulletHellCounter > (enraged ? 9 : 11))
|
||||
@@ -679,7 +679,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
if (bulletHellCounter2 % 240 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (bulletHellCounter2 % 225 == 0) //giant homing fireballs
|
||||
{
|
||||
@@ -753,7 +753,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
if (bulletHellCounter2 % 360 == 0) //fireblasts from above
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType<BrimstoneFireblast>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern
|
||||
{
|
||||
@@ -2241,7 +2241,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
return !CalamityUtils.AntiButcher(npc, ref damage, 0.1f);
|
||||
return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f);
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
|
||||
@@ -3072,7 +3072,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
#region StrikeNPC
|
||||
public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
|
||||
{
|
||||
if (CalamityUtils.AntiButcher(npc, ref damage, 0.1f))
|
||||
if (CalamityUtils.AntiButcher(npc, ref damage, 0.5f))
|
||||
return false;
|
||||
|
||||
// Safeguard to prevent damage which would allow skipping phase 2.
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.height = 50;
|
||||
projectile.hostile = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = 1;
|
||||
projectile.alpha = 120;
|
||||
cooldownSlot = 1;
|
||||
@@ -29,10 +28,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 4)
|
||||
{
|
||||
@@ -48,7 +43,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, 0f, 0f);
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
if (projectile.ai[1] == 0f)
|
||||
{
|
||||
|
||||
@@ -134,24 +134,24 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
|
||||
// Fly away from other brimstone monsters
|
||||
float num1247 = 0.5f;
|
||||
for (int num1248 = 0; num1248 < Main.maxProjectiles; num1248++)
|
||||
float velocity = 0.1f;
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[num1248].active)
|
||||
if (Main.projectile[i].active)
|
||||
{
|
||||
if (num1248 != projectile.whoAmI && Main.projectile[num1248].type == projectile.type)
|
||||
if (i != projectile.whoAmI && Main.projectile[i].type == projectile.type)
|
||||
{
|
||||
if (Vector2.Distance(projectile.Center, Main.projectile[num1248].Center) < 320f)
|
||||
if (Vector2.Distance(projectile.Center, Main.projectile[i].Center) < 320f)
|
||||
{
|
||||
if (projectile.position.X < Main.projectile[num1248].position.X)
|
||||
projectile.velocity.X -= num1247;
|
||||
if (projectile.position.X < Main.projectile[i].position.X)
|
||||
projectile.velocity.X -= velocity;
|
||||
else
|
||||
projectile.velocity.X += num1247;
|
||||
projectile.velocity.X += velocity;
|
||||
|
||||
if (projectile.position.Y < Main.projectile[num1248].position.Y)
|
||||
projectile.velocity.Y -= num1247;
|
||||
if (projectile.position.Y < Main.projectile[i].position.Y)
|
||||
projectile.velocity.Y -= velocity;
|
||||
else
|
||||
projectile.velocity.Y += num1247;
|
||||
projectile.velocity.Y += velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.aiStyle = 1;
|
||||
projectile.width = 12;
|
||||
projectile.height = 12;
|
||||
projectile.hostile = true;
|
||||
@@ -35,10 +35,25 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.01f, 0.25f, 0.25f);
|
||||
if (projectile.ai[0] == 0f)
|
||||
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
|
||||
|
||||
if (projectile.localAI[0] == 0f || projectile.localAI[0] == 2f)
|
||||
if (projectile.ai[0] != 2f)
|
||||
projectile.aiStyle = 1;
|
||||
|
||||
if (projectile.ai[0] == 0f)
|
||||
{
|
||||
projectile.velocity.Y += 0.2f;
|
||||
}
|
||||
else if (projectile.ai[0] == 2f)
|
||||
{
|
||||
projectile.velocity.Y += 0.1f;
|
||||
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
|
||||
|
||||
if (projectile.velocity.Y > 6f)
|
||||
projectile.velocity.Y = 6f;
|
||||
}
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.scale += 0.01f;
|
||||
projectile.alpha -= 50;
|
||||
@@ -48,13 +63,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
}
|
||||
else if (projectile.localAI[0] == 1f)
|
||||
else
|
||||
{
|
||||
projectile.scale -= 0.01f;
|
||||
projectile.alpha += 50;
|
||||
if (projectile.alpha >= 255)
|
||||
{
|
||||
projectile.localAI[0] = 2f;
|
||||
projectile.localAI[0] = 0f;
|
||||
projectile.alpha = 255;
|
||||
}
|
||||
}
|
||||
@@ -68,7 +83,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 27, 0.25f);
|
||||
//Main.PlaySound(SoundID.Item27, projectile.position);
|
||||
for (int num373 = 0; num373 < 3; num373++)
|
||||
{
|
||||
int num374 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 76, 0f, 0f, 0, default, 1f);
|
||||
|
||||
@@ -1043,7 +1043,7 @@ namespace CalamityMod.Projectiles
|
||||
if (player.ghostHeal)
|
||||
{
|
||||
float num = 0.1f;
|
||||
num -= projectile.numHits * 0.05f;
|
||||
num -= projectile.numHits * 0.025f;
|
||||
if (num < 0f)
|
||||
num = 0f;
|
||||
|
||||
@@ -1122,7 +1122,7 @@ namespace CalamityMod.Projectiles
|
||||
if (!CanSpawnLifeStealProjectile(projectile, healMult, heal))
|
||||
goto OTHEREFFECTS;
|
||||
|
||||
Main.player[Main.myPlayer].lifeSteal -= heal * 3f;
|
||||
Main.player[Main.myPlayer].lifeSteal -= heal * 6f;
|
||||
int healAmount = (int)heal;
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -85,6 +85,12 @@ namespace CalamityMod.Projectiles.Environment
|
||||
projectile.velocity.Y = 16f;
|
||||
}
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough)
|
||||
{
|
||||
fallThrough = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user