Merge branch 'master' into draedon-summoner
No files matched your search
@@ -278,7 +278,14 @@ namespace CalamityMod
|
||||
RipperUI.Load();
|
||||
AstralArcanumUI.Load(this);
|
||||
|
||||
Apollo.LoadHeadIcons();
|
||||
Artemis.LoadHeadIcons();
|
||||
Polterghast.LoadHeadIcons();
|
||||
SupremeCalamitas.LoadHeadIcons();
|
||||
ThanatosHead.LoadHeadIcons();
|
||||
ThanatosBody1.LoadHeadIcons();
|
||||
ThanatosBody2.LoadHeadIcons();
|
||||
ThanatosTail.LoadHeadIcons();
|
||||
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<AdrenalineHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<RageHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax))));
|
||||
|
||||
@@ -55,7 +55,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<IceStar>(), 200);
|
||||
recipe.AddIngredient(ItemID.FrozenKey);
|
||||
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<Avalanche>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<BittercoldStaff>(), 2);
|
||||
|
||||
@@ -586,7 +586,7 @@ namespace CalamityMod
|
||||
List<int> bosses = new List<int>() { NPCType<Apollo>(), NPCType<AresBody>(), NPCType<Artemis>(), NPCType<ThanatosHead>() };
|
||||
List<int> loot = new List<int>() { ItemType<DraedonTreasureBag>(), ItemType<SpineOfThanatos>(), ItemType<PhotonRipper>(), ItemType<SurgeDriver>(), ItemType<TheJailor>(), ItemType<RefractionRotor>(), ItemType<TheAtomSplitter>(), ItemType<DraedonsHeart>() };
|
||||
//List<int> collection = new List<int>() { ItemType<AresTrophy>(), ItemType<ThanatosTrophy>(), ItemType<ArtemisTrophy>(), ItemType<ApolloTrophy>(), ItemType<AresMask>(), ItemType<ThanatosMask>(), ItemType<ArtemisMask>(), ItemType<ApolloMask>(), ItemType<KnowledgeExoMechs>() };
|
||||
string instructions = "By using a high-tech computer thing";
|
||||
string instructions = "By using a high-tech computer";
|
||||
string despawn = CalamityUtils.ColorMessage("An imperfection after all...what a shame.", new Color(0x7F, 0xFF, 0xD4));
|
||||
//string bossLogTex = "CalamityMod/NPCs/ExoMechs/ExoMechs_BossChecklist";
|
||||
//AddBoss(bossChecklist, calamity, "ExoMechs", order, bosses, DownedExoMechs, null, loot, collection, instructions, despawn, bossLogTex);
|
||||
|
||||
@@ -146,6 +146,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
npc.HitEffect(0, 10.0);
|
||||
npc.checkDead();
|
||||
npc.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Set vulnerable to false by default
|
||||
@@ -431,41 +432,40 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target];
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num191 = player.position.X + (player.width / 2);
|
||||
float num192 = player.position.Y + (player.height / 2);
|
||||
num191 = (int)(num191 / 16f) * 16;
|
||||
num192 = (int)(num192 / 16f) * 16;
|
||||
vector18.X = (int)(vector18.X / 16f) * 16;
|
||||
vector18.Y = (int)(vector18.Y / 16f) * 16;
|
||||
num191 -= vector18.X;
|
||||
num192 -= vector18.Y;
|
||||
Vector2 npcCenter = npc.Center;
|
||||
float targetCenterX = player.Center.X;
|
||||
float targetCenterY = player.Center.Y;
|
||||
targetCenterX = (int)(targetCenterX / 16f) * 16;
|
||||
targetCenterY = (int)(targetCenterY / 16f) * 16;
|
||||
npcCenter.X = (int)(npcCenter.X / 16f) * 16;
|
||||
npcCenter.Y = (int)(npcCenter.Y / 16f) * 16;
|
||||
targetCenterX -= npcCenter.X;
|
||||
targetCenterY -= npcCenter.Y;
|
||||
|
||||
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
float distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
{
|
||||
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
|
||||
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
|
||||
npcCenter = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
targetCenterX = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - npcCenter.X;
|
||||
targetCenterY = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - npcCenter.Y;
|
||||
} catch
|
||||
{
|
||||
}
|
||||
|
||||
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
|
||||
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
int num194 = npc.width;
|
||||
num193 = (num193 - num194) / num193;
|
||||
num191 *= num193;
|
||||
num192 *= num193;
|
||||
npc.rotation = (float)Math.Atan2(targetCenterY, targetCenterX) + MathHelper.PiOver2;
|
||||
distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
distanceFromTarget = (distanceFromTarget - npc.width) / distanceFromTarget;
|
||||
targetCenterX *= distanceFromTarget;
|
||||
targetCenterY *= distanceFromTarget;
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + num191;
|
||||
npc.position.Y = npc.position.Y + num192;
|
||||
npc.position.X = npc.position.X + targetCenterX;
|
||||
npc.position.Y = npc.position.Y + targetCenterY;
|
||||
|
||||
if (num191 < 0f)
|
||||
if (targetCenterX < 0f)
|
||||
npc.spriteDirection = -1;
|
||||
else if (num191 > 0f)
|
||||
else if (targetCenterX > 0f)
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
npc.HitEffect(0, 10.0);
|
||||
npc.checkDead();
|
||||
npc.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Set vulnerable to false by default
|
||||
@@ -431,44 +432,44 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target];
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num191 = player.position.X + (player.width / 2);
|
||||
float num192 = player.position.Y + (player.height / 2);
|
||||
num191 = (int)(num191 / 16f) * 16;
|
||||
num192 = (int)(num192 / 16f) * 16;
|
||||
vector18.X = (int)(vector18.X / 16f) * 16;
|
||||
vector18.Y = (int)(vector18.Y / 16f) * 16;
|
||||
num191 -= vector18.X;
|
||||
num192 -= vector18.Y;
|
||||
Vector2 npcCenter = npc.Center;
|
||||
float targetCenterX = player.Center.X;
|
||||
float targetCenterY = player.Center.Y;
|
||||
targetCenterX = (int)(targetCenterX / 16f) * 16;
|
||||
targetCenterY = (int)(targetCenterY / 16f) * 16;
|
||||
npcCenter.X = (int)(npcCenter.X / 16f) * 16;
|
||||
npcCenter.Y = (int)(npcCenter.Y / 16f) * 16;
|
||||
targetCenterX -= npcCenter.X;
|
||||
targetCenterY -= npcCenter.Y;
|
||||
|
||||
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
{
|
||||
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
|
||||
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
|
||||
} catch
|
||||
{
|
||||
}
|
||||
float distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
{
|
||||
npcCenter = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
targetCenterX = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - npcCenter.X;
|
||||
targetCenterY = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - npcCenter.Y;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
|
||||
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
int num194 = npc.width;
|
||||
num193 = (num193 - num194) / num193;
|
||||
num191 *= num193;
|
||||
num192 *= num193;
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + num191;
|
||||
npc.position.Y = npc.position.Y + num192;
|
||||
npc.rotation = (float)Math.Atan2(targetCenterY, targetCenterX) + MathHelper.PiOver2;
|
||||
distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
distanceFromTarget = (distanceFromTarget - npc.width) / distanceFromTarget;
|
||||
targetCenterX *= distanceFromTarget;
|
||||
targetCenterY *= distanceFromTarget;
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + targetCenterX;
|
||||
npc.position.Y = npc.position.Y + targetCenterY;
|
||||
|
||||
if (num191 < 0f)
|
||||
npc.spriteDirection = -1;
|
||||
else if (num191 > 0f)
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
if (targetCenterX < 0f)
|
||||
npc.spriteDirection = -1;
|
||||
else if (targetCenterX > 0f)
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 414 B |
@@ -145,6 +145,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
npc.HitEffect(0, 10.0);
|
||||
npc.checkDead();
|
||||
npc.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Set vulnerable to false by default
|
||||
@@ -430,44 +431,44 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechWorm].target];
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num191 = player.position.X + (player.width / 2);
|
||||
float num192 = player.position.Y + (player.height / 2);
|
||||
num191 = (int)(num191 / 16f) * 16;
|
||||
num192 = (int)(num192 / 16f) * 16;
|
||||
vector18.X = (int)(vector18.X / 16f) * 16;
|
||||
vector18.Y = (int)(vector18.Y / 16f) * 16;
|
||||
num191 -= vector18.X;
|
||||
num192 -= vector18.Y;
|
||||
Vector2 npcCenter = npc.Center;
|
||||
float targetCenterX = player.Center.X;
|
||||
float targetCenterY = player.Center.Y;
|
||||
targetCenterX = (int)(targetCenterX / 16f) * 16;
|
||||
targetCenterY = (int)(targetCenterY / 16f) * 16;
|
||||
npcCenter.X = (int)(npcCenter.X / 16f) * 16;
|
||||
npcCenter.Y = (int)(npcCenter.Y / 16f) * 16;
|
||||
targetCenterX -= npcCenter.X;
|
||||
targetCenterY -= npcCenter.Y;
|
||||
|
||||
float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
{
|
||||
vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X;
|
||||
num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y;
|
||||
} catch
|
||||
{
|
||||
}
|
||||
float distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
{
|
||||
npcCenter = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
targetCenterX = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - npcCenter.X;
|
||||
targetCenterY = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - npcCenter.Y;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2;
|
||||
num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192);
|
||||
int num194 = npc.width;
|
||||
num193 = (num193 - num194) / num193;
|
||||
num191 *= num193;
|
||||
num192 *= num193;
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + num191;
|
||||
npc.position.Y = npc.position.Y + num192;
|
||||
npc.rotation = (float)Math.Atan2(targetCenterY, targetCenterX) + MathHelper.PiOver2;
|
||||
distanceFromTarget = (float)Math.Sqrt(targetCenterX * targetCenterX + targetCenterY * targetCenterY);
|
||||
distanceFromTarget = (distanceFromTarget - npc.width) / distanceFromTarget;
|
||||
targetCenterX *= distanceFromTarget;
|
||||
targetCenterY *= distanceFromTarget;
|
||||
npc.velocity = Vector2.Zero;
|
||||
npc.position.X = npc.position.X + targetCenterX;
|
||||
npc.position.Y = npc.position.Y + targetCenterY;
|
||||
|
||||
if (num191 < 0f)
|
||||
npc.spriteDirection = -1;
|
||||
else if (num191 > 0f)
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
if (targetCenterX < 0f)
|
||||
npc.spriteDirection = -1;
|
||||
else if (targetCenterX > 0f)
|
||||
npc.spriteDirection = 1;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 384 B |
@@ -467,10 +467,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.noTileCollide = true;
|
||||
else if ((npc.velocity.Y > 0f && npc.Bottom.Y > Main.player[npc.target].Top.Y) || (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height)))
|
||||
npc.noTileCollide = false;
|
||||
|
||||
// Prevent falling forever in second phase
|
||||
if (npc.ai[0] == 2f && npc.velocity.Y > 0f && npc.Top.Y > Main.player[npc.target].Bottom.Y + 16f && !Collision.SolidCollision(npc.position, npc.width, npc.height))
|
||||
npc.noTileCollide = false;
|
||||
}
|
||||
|
||||
Vector2 targetVector = player.position;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -145,9 +146,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return;
|
||||
}
|
||||
|
||||
// If the Ares Laser Cannon is the owner
|
||||
// If the Ares Laser Cannon is the owner.
|
||||
bool aresLaserIsOwner = ThingToAttachTo.type == ModContent.NPCType<AresLaserCannon>();
|
||||
|
||||
// If Artemis is the owner.
|
||||
bool artemisIsOwner = ThingToAttachTo.type == ModContent.NPCType<Artemis>();
|
||||
|
||||
// Fade in after telegraphs have faded.
|
||||
if (TelegraphDelay > TelegraphTotalTime)
|
||||
{
|
||||
@@ -187,6 +191,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (aresLaserIsOwner)
|
||||
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f;
|
||||
else if (artemisIsOwner)
|
||||
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
|
||||
|
||||
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
|
||||
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
|
||||
@@ -215,6 +221,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (aresLaserIsOwner)
|
||||
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f;
|
||||
else if (artemisIsOwner)
|
||||
projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f;
|
||||
|
||||
// Calculate and store the velocity that will be used for laser telegraph rotation and beam firing.
|
||||
Vector2 projectileDestination = Destination - ThingToAttachTo.Center;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 16;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = 1;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
int projAmt = Main.rand.Next(2, 4);
|
||||
int projAmt = Main.rand.Next(1, 3);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < projAmt; i++)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 16;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = 1;
|
||||
|
||||