Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
c7e53ea029
8 files changed
+52
-34
No files matched your search
@@ -276,6 +276,9 @@ namespace CalamityMod.Balancing
|
||||
// 15% resist to Enforcer projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<EssenceFlame2>()))));
|
||||
|
||||
//55% resist to Dynamic Pursuer
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
#endregion Ares
|
||||
|
||||
#region Artemis and Apollo
|
||||
@@ -292,8 +295,8 @@ namespace CalamityMod.Balancing
|
||||
|
||||
#region Thanatos
|
||||
|
||||
// 85% resist to Dynamic Pursuer (the whole thing lol).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.15f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
// 50% resist to Dynamic Pursuer (the whole thing lol).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
// 65% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new TrueMeleeResistBalancingRule(0.35f))));
|
||||
@@ -316,8 +319,8 @@ namespace CalamityMod.Balancing
|
||||
// 40% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 40% resist to Wrathwing stealth strike.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<WrathwingCinder>()))));
|
||||
// 50% resist to Wrathwing stealth strike.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<WrathwingCinder>()))));
|
||||
|
||||
// 40% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
@@ -5193,7 +5193,7 @@ namespace CalamityMod.CalPlayer
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.08), knockBack * 0.5f, Player.whoAmI);
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.075), knockBack * 0.5f, Player.whoAmI);
|
||||
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].DamageType = DamageClass.Generic; //in case melee/rogue variants bug out
|
||||
|
||||
@@ -492,6 +492,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int astralOreID = ModContent.TileType<AstralOre>();
|
||||
int auricOreID = ModContent.TileType<AuricOre>();
|
||||
int chaotiOreID = ModContent.TileType<ChaoticOre>();
|
||||
|
||||
int auricRejectionDamage = 300;
|
||||
float auricRejectionKB = Player.noKnockback ? 20f : 40f;
|
||||
@@ -506,6 +507,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (tile.TileType == astralOreID)
|
||||
Player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 2);
|
||||
|
||||
// You will need to set each resistant item here for burning as it gets bypassed for somereason
|
||||
if (tile.TileType == chaotiOreID)
|
||||
Player.AddBuff(BuffID.Burning, 2);
|
||||
|
||||
// Auric Ore causes an Auric Rejection unless you are wearing Auric Armor
|
||||
// Auric Rejection causes an electrical explosion that yeets the player a considerable distance
|
||||
else if (tile.TileType == auricOreID && !auricSet)
|
||||
|
||||
@@ -991,7 +991,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
}
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(200);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(180);
|
||||
int projectileIndex = Projectile.NewProjectile(spawnSource, projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType<InfernadoFriendly>(), damage, 15f, Main.myPlayer, 16f, 16f);
|
||||
if (projectileIndex.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.damage = 3300;
|
||||
Item.damage = 2550;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
|
||||
Item.width = 30;
|
||||
@@ -49,10 +49,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<DynamicPursuerProjectile>();
|
||||
Item.shootSpeed = 25f;
|
||||
Item.shootSpeed = 28f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 320f; // Tesla Cannon = 250f
|
||||
modItem.MaxCharge = 300f; // Tesla Cannon = 250f
|
||||
modItem.ChargePerUse = 0.5f; // Tesla Cannon = 0.9f
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,10 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
internal PrimitiveTrail LightningDrawer;
|
||||
|
||||
public const int MaximumBranchingIterations = 5;
|
||||
public const int MaximumBranchingIterations = 3;
|
||||
public const float LightningTurnRandomnessFactor = 1.7f;
|
||||
public const int Lifetime = 60;
|
||||
public ref float InitialVelocityAngle => ref Projectile.ai[0];
|
||||
// Technically not a ratio, and more of a seed, but it is used in a 0-2pi squash
|
||||
// Technically not a ratio, and more of a seed, but its used in a 0-2pi squash
|
||||
// later in the code to get an arbitrary unit vector (which is then checked).
|
||||
public ref float BaseTurnAngleRatio => ref Projectile.ai[1];
|
||||
public ref float AccumulatedXMovementSpeeds => ref Projectile.localAI[0];
|
||||
@@ -36,16 +35,18 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 28;
|
||||
Projectile.height = 28;
|
||||
Projectile.width = 30;
|
||||
Projectile.height = 30;
|
||||
Projectile.friendly = true;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = 2;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.extraUpdates = 10;
|
||||
Projectile.timeLeft = Lifetime * Projectile.extraUpdates;
|
||||
Projectile.timeLeft = 60 * Projectile.extraUpdates;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 3600; //Adjusted to take note of the extra updates
|
||||
|
||||
// Readjust the velocity magnitude the moment this projectile is created
|
||||
// to make velocity setting outside the scope of this projectile less irritating
|
||||
@@ -60,8 +61,9 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Projectile.frameCounter++;
|
||||
float adjustedTimeLife = Projectile.timeLeft / Projectile.MaxUpdates;
|
||||
Projectile.Opacity = Utils.GetLerpValue(0f, 9f, adjustedTimeLife, true) * Utils.GetLerpValue(Lifetime, Lifetime - 3f, adjustedTimeLife, true);
|
||||
Projectile.scale = Projectile.Opacity;
|
||||
Projectile.scale = (float)Math.Sin(MathHelper.Pi * Projectile.timeLeft / (45f * (Projectile.MaxUpdates - 1))) * 4f;
|
||||
if (Projectile.scale > 1f)
|
||||
Projectile.scale = 1f;
|
||||
|
||||
Lighting.AddLight(Projectile.Center, Color.Blue.ToVector3());
|
||||
if (Projectile.frameCounter >= Projectile.extraUpdates * 2)
|
||||
@@ -114,16 +116,6 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Projectile.ExpandHitboxBy(60);
|
||||
Projectile.maxPenetrate = -1;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 20;
|
||||
Projectile.Damage();
|
||||
}
|
||||
|
||||
internal float WidthFunction(float completionRatio)
|
||||
{
|
||||
float baseWidth = MathHelper.Lerp(2f, 6f, (float)Math.Sin(MathHelper.Pi * 4f * completionRatio) * 0.5f + 0.5f) * Projectile.scale;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
public const float MaxTargetSearchDistance = 480f;
|
||||
public float ReturnAcceleration = 0.5f;
|
||||
public float ReturnMaxSpeed = 18f;
|
||||
public float ReturnMaxSpeed = 24f;
|
||||
public float ElectricVelocityCharge = 0f;
|
||||
public float LaserVelocityCharge = 0f;
|
||||
public bool Ricochet = false;
|
||||
@@ -48,6 +48,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 360;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -77,13 +79,13 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
else if (Ricochet)
|
||||
{
|
||||
if (nextTarget != null)
|
||||
Projectile.velocity = (float)Math.Pow(Math.E, Time / 100)*(nextTarget.Center - Projectile.Center).SafeNormalize(Vector2.One);
|
||||
Projectile.velocity = (float)Math.Pow(Math.E, Time / 250)*(nextTarget.Center - Projectile.Center).SafeNormalize(Vector2.One);
|
||||
|
||||
ElectricVelocityCharge += Projectile.velocity.Length();
|
||||
|
||||
if (ElectricVelocityCharge >= 300f)
|
||||
{
|
||||
ElectricVelocityCharge -= 300f;
|
||||
ElectricVelocityCharge = 0f;
|
||||
AttemptToFireElectricity((int)(Projectile.damage * 0.25));
|
||||
}
|
||||
}
|
||||
@@ -167,7 +169,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<MassivePlasmaExplosion>(), Projectile.damage, Projectile.knockBack * 2f, Projectile.owner);
|
||||
if (!Main.dedServ)
|
||||
|
||||
{
|
||||
for (int i = 0; i < 220; i++)
|
||||
{
|
||||
@@ -192,7 +194,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
//Retarget
|
||||
Ricochet = true;
|
||||
NPC newTarget = null;
|
||||
float closestNPCDistance = 10000f;
|
||||
float closestNPCDistance = 3000f;
|
||||
float targettingDistance = 1000f;
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.PlayerDrawLayer;
|
||||
|
||||
namespace CalamityMod.Tiles.Ores
|
||||
{
|
||||
public class ChaoticOre : ModTile
|
||||
@@ -34,6 +36,21 @@ namespace CalamityMod.Tiles.Ores
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
if (closer && Main.rand.NextBool(30) && !up.HasTile && !up2.HasTile)
|
||||
{
|
||||
Dust dust;
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, 127, 0f, -10f, 47, new Color(255, 255, 255), 1.0465117f)];
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1.2209302f;
|
||||
|
||||
dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 16, 16, 31, 0f, -1.9069767f, 195, new Color(255, 255, 255), 1f)];
|
||||
dust.noGravity = false;
|
||||
dust.fadeIn = 1.4209302f;
|
||||
|
||||
}
|
||||
if (!closer && j < Main.maxTilesY - 205)
|
||||
{
|
||||
if (Main.tile[i, j].LiquidAmount <= 0)
|
||||
@@ -71,8 +88,7 @@ namespace CalamityMod.Tiles.Ores
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
{
|
||||
r = 0.04f;
|
||||
g = 0.00f;
|
||||
|
||||
Reference in new issue
Block a user