Merge branch 'master' of https://github.com/CalamityTeam/CalamityMod
This commit is contained in:
commit
e36faecb8e
9 files changed
+128
-19
No files matched your search
@@ -169,6 +169,11 @@ namespace CalamityMod.Balancing
|
||||
|
||||
#endregion Astrum Deus
|
||||
|
||||
#region Moon Lord
|
||||
// 30% resist to the shockwave attunement from the True biome blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.3f, ProjectileType<MercurialTides>(), ProjectileType<MercurialTidesMonolith>(), ProjectileType<MercurialTidesBlast>()))));
|
||||
#endregion
|
||||
|
||||
#region Ceaseless Void / Dark Energies
|
||||
|
||||
// 50% resist to true melee.
|
||||
@@ -249,8 +254,8 @@ namespace CalamityMod.Balancing
|
||||
|
||||
#region Thanatos
|
||||
|
||||
// 83.75% resist to Seraphim lasers.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.1625f, ProjectileType<SeraphimBeamLarge>()))));
|
||||
// 95% resist to Seraphim lasers (what the actual fuck?).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.05f, ProjectileType<SeraphimBeamLarge>()))));
|
||||
|
||||
// 75% resist to Celestus.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<CelestusBoomerang>(), ProjectileType<Celestus2>()))));
|
||||
|
||||
@@ -53,10 +53,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public static float PolarisAttunement_ShotDamageBoost = 0.8f; //The shots fired if the dash connects
|
||||
public static float PolarisAttunement_ShredChargeupGain = 1.1f; //How much charge is gainted per second.
|
||||
|
||||
public static int AndromedaAttunement_BaseDamage = 2100;
|
||||
public static int AndromedaAttunement_DashHitIFrames = 30;
|
||||
public static float AndromedaAttunement_FullChargeBoost = 4f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage.
|
||||
public static float AndromedaAttunement_MonolithDamageBoost = 1.75f;
|
||||
public static int AndromedaAttunement_BaseDamage = 2200;
|
||||
public static int AndromedaAttunement_DashHitIFrames = 20;
|
||||
public static float AndromedaAttunement_FullChargeBoost = 3.5f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage.
|
||||
public static float AndromedaAttunement_MonolithDamageBoost = 1.2f;
|
||||
public static float AndromedaAttunement_BoltsDamageReduction = 0.2f; //The shots fired as it charges
|
||||
|
||||
public static int AriesAttunement_BaseDamage = 950;
|
||||
|
||||
@@ -56,12 +56,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public static int SuperPogoAttunement_PassiveLifeSteal = 10;
|
||||
|
||||
|
||||
public static int ShockwaveAttunement_BaseDamage = 720;
|
||||
public static int ShockwaveAttunement_DashHitIFrames = 30;
|
||||
public static float ShockwaveAttunement_FullChargeBoost = 4f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage.
|
||||
public static float ShockwaveAttunement_MonolithDamageBoost = 1.25f;
|
||||
public static float ShockwaveAttunement_MonolithDamageFalloff = 0.6f; //Damage multiplier for all subsequent hits after the first one.
|
||||
public static float ShockwaveAttunement_BlastDamageReduction = 0.6f;
|
||||
public static int ShockwaveAttunement_BaseDamage = 550;
|
||||
public static int ShockwaveAttunement_DashHitIFrames = 20;
|
||||
public static float ShockwaveAttunement_FullChargeBoost = 2.5f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage.
|
||||
public static float ShockwaveAttunement_MonolithDamageBoost = 1.1f;
|
||||
public static float ShockwaveAttunement_MonolithDamageFalloff = 0.15f; //Damage multiplier for all subsequent hits after the first one.
|
||||
public static float ShockwaveAttunement_BlastDamageReduction = 0.8f;
|
||||
|
||||
public static int ShockwaveAttunement_PassiveBaseDamage = 200;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public class Seraphim : RogueWeapon
|
||||
{
|
||||
public const int SplitDaggerCount = 6;
|
||||
public const int StealthStrikeLightCount = 9;
|
||||
public const int StealthStrikeLightCount = 7;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Seraphim");
|
||||
@@ -25,11 +25,11 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
item.width = 82;
|
||||
item.height = 82;
|
||||
item.damage = 332;
|
||||
item.damage = 300;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 12;
|
||||
item.useTime = 12;
|
||||
item.useAnimation = 13;
|
||||
item.useTime = 13;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.knockBack = 6f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
|
||||
@@ -287,6 +287,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
else if (npc.ai[0] == 2f)
|
||||
{
|
||||
npc.dontTakeDamage = true;
|
||||
npc.Calamity().ShouldCloseHPBar = true;
|
||||
Vector2 value6 = new Vector2(npc.direction, -0.5f);
|
||||
npc.velocity = Vector2.Lerp(npc.velocity, value6, 0.98f);
|
||||
|
||||
|
||||
@@ -167,6 +167,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.velocity == Vector2.Zero)
|
||||
return false;
|
||||
|
||||
// Don't draw the laser if its scale is too low, as that could lead to an infinite loop and out of memory crash.
|
||||
// This has happened in multiplayer historically, so this check is important.
|
||||
if (projectile.scale < 0.001f)
|
||||
return false;
|
||||
|
||||
Color beamColor = LaserOverlayColor;
|
||||
Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
|
||||
@@ -2,11 +2,13 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Damageable;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
// TODO -- Make this one projectile with multiple frames instead of multiple projectiles with one frame.
|
||||
public class ArtifactOfResilienceShard1 : ModProjectile
|
||||
{
|
||||
public int Timer = 0;
|
||||
@@ -34,6 +36,19 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 20;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
|
||||
public static void ArtifactOfResilienceShardAI(Projectile projectile, ref Vector2 StartingPosition, ref int Timer)
|
||||
{
|
||||
// Spinning
|
||||
@@ -42,6 +57,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
StartingPosition = projectile.Center;
|
||||
projectile.netUpdate = true;
|
||||
projectile.localAI[0] = 1f;
|
||||
}
|
||||
Timer++;
|
||||
@@ -145,6 +161,19 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 40;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
public override void AI() => ArtifactOfResilienceShard1.ArtifactOfResilienceShardAI(projectile, ref StartingPosition, ref Timer);
|
||||
}
|
||||
@@ -171,6 +200,18 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 40;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
public override void AI() => ArtifactOfResilienceShard1.ArtifactOfResilienceShardAI(projectile, ref StartingPosition, ref Timer);
|
||||
}
|
||||
@@ -197,6 +238,18 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 40;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
public override void AI() => ArtifactOfResilienceShard1.ArtifactOfResilienceShardAI(projectile, ref StartingPosition, ref Timer);
|
||||
}
|
||||
@@ -223,6 +276,18 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 40;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
public override void AI() => ArtifactOfResilienceShard1.ArtifactOfResilienceShardAI(projectile, ref StartingPosition, ref Timer);
|
||||
}
|
||||
@@ -249,6 +314,18 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 40;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.frameCounter);
|
||||
writer.WriteVector2(StartingPosition);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.frameCounter = reader.ReadInt32();
|
||||
StartingPosition = reader.ReadVector2();
|
||||
}
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
public override void AI() => ArtifactOfResilienceShard1.ArtifactOfResilienceShardAI(projectile, ref StartingPosition, ref Timer);
|
||||
}
|
||||
|
||||
@@ -165,8 +165,9 @@ namespace CalamityMod.Tiles
|
||||
}
|
||||
|
||||
Player player = Main.LocalPlayer;
|
||||
if (player is null)
|
||||
if (player is null || !player.active)
|
||||
return;
|
||||
|
||||
if (player.Calamity().reaverExplore && !fail)
|
||||
{
|
||||
player.breath += 20;
|
||||
|
||||
@@ -147,8 +147,6 @@ namespace CalamityMod.UI
|
||||
OneToMany[NPCID.PirateShipCannon] = Ship;
|
||||
|
||||
int[] MoonLord = new int[] { NPCID.MoonLordHead, NPCID.MoonLordHand, NPCID.MoonLordCore };
|
||||
OneToMany[NPCID.MoonLordHead] = MoonLord;
|
||||
OneToMany[NPCID.MoonLordHand] = MoonLord;
|
||||
OneToMany[NPCID.MoonLordCore] = MoonLord;
|
||||
|
||||
int[] Void = new int[] { NPCType<CeaselessVoid>(), NPCType<DarkEnergy>() };
|
||||
@@ -319,6 +317,28 @@ namespace CalamityMod.UI
|
||||
|
||||
return life;
|
||||
});
|
||||
|
||||
SpecialHPRequirements.Add(npc => npc.type == NPCID.MoonLordCore, (npc, checkingForMaxLife) =>
|
||||
{
|
||||
long life = checkingForMaxLife ? npc.lifeMax : npc.life;
|
||||
if (npc.ai[0] == 2f)
|
||||
life = 0L;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
bool isMoonLordPiece = Main.npc[i].type == NPCID.MoonLordHand || Main.npc[i].type == NPCID.MoonLordHead;
|
||||
if (!Main.npc[i].active || !isMoonLordPiece || Main.npc[i].ai[3] != npc.whoAmI)
|
||||
continue;
|
||||
|
||||
// Don't count HP towards the total if the NPC is in its dead state.
|
||||
if (Main.npc[i].Calamity().newAI[0] == 1f)
|
||||
continue;
|
||||
|
||||
life += checkingForMaxLife ? Main.npc[i].lifeMax : Main.npc[i].life;
|
||||
}
|
||||
|
||||
return life;
|
||||
});
|
||||
}
|
||||
#pragma warning restore IDE0028 // Simplify collection initialization
|
||||
|
||||
|
||||
Reference in new issue
Block a user