Mass fix batch #1
1 - Fixed Astral Ore oob error 2 - Fixed a grammatical error in Blast Barrel's tooltip 3 - Fixed Blood Boiler stating the wrong chance to consume HP 4 - Fixed brimstone darts having a larger hitbox than intended 4 - Fixed Brimstone Heart artery trails not appearing 5 - Fixed vanilla bug of Gold Chests being able to contain Meteorite Bars 6 - Fixed Jousting Lance damage formula 7 - Fixed Metastasis index oob error 8 - Fixed Obstructed effect not drawing when gravity is flipped 9 - Fixed exploit with Overloaded Blaster damage when piercing 10 - Fixed Statigel armor paladin minion framing 11 - Fixed SCal being able to deal contact damage on the first frame of spawning 12 - Fixed SCal being able to fire brimstone dart spreads during bros spawn animation 13 - Fixed SCal's brimstone flame skulls briefly being able to deal damage after the bullet hell ends 14 - Fixed Ultimus Cleaver being considered true melee 15 - Fixed Wulfrum Screwdriver not being considered true melee
This commit is contained in:
1 parent
15e967ee65
commit
cf793b05fc
17 files changed
+73
-28
No files matched your search
@@ -728,7 +728,7 @@ namespace CalamityMod.ILEditing
|
||||
private static void AdditiveDrawing(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new(il);
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCall<MoonlordDeathDrama>("DrawWhite")))
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCall<ScreenObstruction>("Draw")))
|
||||
return;
|
||||
|
||||
cursor.EmitDelegate<Action>(() =>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -26,8 +27,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.autoReuse = true;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.shoot = ModContent.ProjectileType<UltimusCleaverDust>(); // Dummy argument to ensure it doesn't get set to true melee
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) => false;
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire3, 360);
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 14;
|
||||
Item.height = 50;
|
||||
Item.damage = 12;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = DefaultTime + WulfrumScrewdriverProj.MaxTime;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = DefaultTime + WulfrumScrewdriverProj.MaxTime;
|
||||
|
||||
@@ -183,7 +183,7 @@ BloodBoiler: {
|
||||
'''
|
||||
Fires twin streams of life stealing bloodfire that returns to you
|
||||
Uses your health as ammo
|
||||
40% chance to save health
|
||||
60% chance to save health
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ BlastBarrel: {
|
||||
Tooltip:
|
||||
'''
|
||||
Throws a rolling barrel that explodes on wall collision
|
||||
Stealth strikes makes the barrel bounce twice before disappearing with varied effects after each bounce
|
||||
Stealth strikes make the barrel bounce twice before disappearing with varied effects after each bounce
|
||||
'Some people used to jump over these'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -115,16 +115,18 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (NPC.IsABestiaryIconDummy)
|
||||
return true;
|
||||
|
||||
spriteBatch.ExitShaderRegion();
|
||||
|
||||
for (int i = 0; i < ChainEndpoints.Count; i++)
|
||||
{
|
||||
List<Vector2> points = new List<Vector2>()
|
||||
{
|
||||
NPC.Center,
|
||||
ChainEndpoints[i] + NPC.DirectionTo(ChainEndpoints[i]) * 25f
|
||||
};
|
||||
float dist = NPC.Distance(ChainEndpoints[i]);
|
||||
List<Vector2> points = new List<Vector2>();
|
||||
for (int j = 0; j < 4; j++)
|
||||
points.Add(NPC.Center + NPC.DirectionTo(ChainEndpoints[i]) * dist * 0.25f * j);
|
||||
points.Add(ChainEndpoints[i] + NPC.DirectionTo(ChainEndpoints[i]) * 18f);
|
||||
|
||||
PrimitiveRenderer.RenderTrail(points, new(PrimitiveWidthFunction, PrimitiveColorFunction), 40);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2271,7 +2271,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && attackPause == 0)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, gigablastDamage, 0f, Main.myPlayer, 0f, 2f);
|
||||
NPC.netUpdate = true;
|
||||
@@ -2290,7 +2290,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && attackPause == 0)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, fireblastDamage, 0f, Main.myPlayer, 0f, 2f);
|
||||
NPC.netUpdate = true;
|
||||
@@ -2312,7 +2312,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && attackPause == 0)
|
||||
{
|
||||
float projectileVelocityToPass = projectileVelocity.Length() * 1.3f;
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, j / (float)(numProj - 1)));
|
||||
@@ -3556,7 +3556,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
float _ = 0f;
|
||||
bool collidingWithShield = Collision.CheckAABBvLineCollision(target.TopLeft, target.Size, shieldTop, shieldBottom, 64f, ref _) && shieldOpacity > 0.55f;
|
||||
return collidingWithShield || NPC.Hitbox.Intersects(target.Hitbox);
|
||||
// CIT 16MAY2025: SCal must have contact damage set on the first frame to preserve difficulty mode stat scaling, sometimes leading to people getting hit if on top of her.
|
||||
// Thus, also check if the arena has spawned, since that will not be true on the first frame.
|
||||
return (collidingWithShield || NPC.Hitbox.Intersects(target.Hitbox)) && spawnArena;
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -161,6 +161,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
|
||||
return false;
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 18 * Projectile.scale, targetHitbox);
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 10 * Projectile.scale, targetHitbox);
|
||||
}
|
||||
}
|
||||
@@ -62,10 +62,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.frame > 3)
|
||||
Projectile.frame = 0;
|
||||
|
||||
if (Projectile.timeLeft < 30)
|
||||
Projectile.Opacity = MathHelper.Clamp(Projectile.timeLeft / 30f, 0f, 1f);
|
||||
if (Projectile.timeLeft < 60)
|
||||
Projectile.Opacity = MathHelper.Clamp(Projectile.timeLeft / 60f, 0f, 1f);
|
||||
else
|
||||
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 1170) / 30f), 0f, 1f);
|
||||
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 1140) / 60f), 0f, 1f);
|
||||
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0f, 0f);
|
||||
|
||||
|
||||
@@ -4190,13 +4190,13 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
// The vanilla damage Jousting Lance multiplier is as follows. Calamity overrides this with a new formula.
|
||||
// damageScale = 0.1f + player.velocity.Length() / 7f * 0.9f
|
||||
if (projectile.type == ProjectileID.JoustingLance || projectile.type == ProjectileID.HallowJoustingLance || projectile.type == ProjectileID.ShadowJoustingLance)
|
||||
{
|
||||
// The vanilla damage Jousting Lance multiplier is as follows. Calamity overrides this with a new formula.
|
||||
float vanillaVelocityDamageMultiplier = 0.1f + player.velocity.Length() / 7f * 0.9f;
|
||||
float baseVelocityDamageMultiplier = 0.01f + player.velocity.Length() * 0.002f;
|
||||
float calamityVelocityDamageMultiplier = 100f * (1f - (1f / (1f + baseVelocityDamageMultiplier)));
|
||||
modifiers.SourceDamage *= calamityVelocityDamageMultiplier;
|
||||
modifiers.SourceDamage *= calamityVelocityDamageMultiplier / vanillaVelocityDamageMultiplier;
|
||||
}
|
||||
|
||||
// If applicable, use ricoshot bonus damage.
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Projectile.width = 14;
|
||||
Projectile.height = 50;
|
||||
Projectile.tileCollide = false;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (Time == EmpowerTime)
|
||||
{
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.damage = (int)((Projectile.damage / Math.Pow(DamageFalloff, Projectile.numHits)) * 1.6f); // 7/4
|
||||
Projectile.damage = (int)(Projectile.originalDamage * 1.6f);
|
||||
Projectile.velocity *= 0f;
|
||||
Projectile.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi);
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
@@ -9,11 +11,12 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class CorruptionSlimeGodMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/CorroslimeMinion";
|
||||
public float dust = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 2;
|
||||
Main.projFrames[Projectile.type] = 6;
|
||||
ProjectileID.Sets.MinionSacrificable[Projectile.type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true;
|
||||
}
|
||||
@@ -84,5 +87,13 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D slom = TextureAssets.Projectile[Type].Value;
|
||||
Rectangle frame = slom.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
Main.EntitySpriteDraw(slom, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
@@ -9,11 +11,12 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class CrimsonSlimeGodMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/CrimslimeMinion";
|
||||
public float dust = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 2;
|
||||
Main.projFrames[Projectile.type] = 6;
|
||||
ProjectileID.Sets.MinionSacrificable[Projectile.type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true;
|
||||
}
|
||||
@@ -84,5 +87,13 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D slom = TextureAssets.Projectile[Type].Value;
|
||||
Rectangle frame = slom.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
Main.EntitySpriteDraw(slom, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
#region Syncing
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
if (Arms is null || Arms[0] is null)
|
||||
if (Arms is null || Arms.Count == 0 || Arms[0] is null)
|
||||
Initialize();
|
||||
|
||||
writer.Write(IdleTimer);
|
||||
@@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
if (Arms is null || Arms[0] is null)
|
||||
if (Arms is null || Arms.Count == 0 || Arms[0] is null)
|
||||
Initialize();
|
||||
|
||||
IdleTimer = reader.ReadInt32();
|
||||
|
||||
@@ -408,6 +408,20 @@ namespace CalamityMod.Systems
|
||||
}
|
||||
}
|
||||
|
||||
// Fix vanilla's stupidity with Gold Chests being able to have Meteorite Bars in them near the Underworld
|
||||
if (isGoldChest)
|
||||
{
|
||||
for (int inventoryIndex = 0; inventoryIndex < 40; inventoryIndex++)
|
||||
{
|
||||
if (chest.item[inventoryIndex].type == ItemID.MeteoriteBar)
|
||||
{
|
||||
int oldStack = chest.item[inventoryIndex].stack;
|
||||
chest.item[inventoryIndex].SetDefaults(WorldGen.genRand.NextBool() ? ItemID.PlatinumBar : ItemID.GoldBar);
|
||||
chest.item[inventoryIndex].stack = oldStack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Give Dead Man's Chests better loot.
|
||||
if (isDeadManChest)
|
||||
{
|
||||
|
||||
@@ -42,6 +42,9 @@ namespace CalamityMod.Tiles.Ores
|
||||
}
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
if (j < 2)
|
||||
return;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
Tile up = Main.tile[i, j - 1];
|
||||
Tile up2 = Main.tile[i, j - 2];
|
||||
|
||||
Reference in new issue
Block a user