1 - Added noise when taking defense damage.

2 - Ravager Rock Pillars create gores when killed.
3 - Adjusted Chlorophyte spawn rate and spawn limits to make it a bit more common.
4 - Increased Terra Arrow damage slightly.
5 - Nerfed Vanquisher arrows.
6 - Charred Idol now requires an Adamantite Forge, 3 souls of night (used to be 5) and an Unholy Core.
7 - Cryo Key requires less ice blocks.
8 - Polterghast sticks to a charge location once it finds one and waits 15 frames before charging.
9 - Brimstone Elemental can no longer fire projectiles the moment her cocoon starts again.
10 - Retinazer and Rev+ Skeletron Prime slow down more while using true melee.
11 - DoG resists Dark Spark by 15%.
12 - Skeletron drops bones.
13 - Nerfed Elysian Arrows.
14 - Charred Ore can be mined post-1 mech with mythril or orichalcum pickaxe.
This commit is contained in:
Andrew Marheine committed 2021-03-23 17:57:00 -05:00
1 parent 3d623f2ca7
commit b098156417
24 files changed
+145 -32

No files matched your search

+6 -2
View File
@@ -5568,7 +5568,9 @@ namespace CalamityMod.CalPlayer
int damageToDefense = (int)(newDamage * defenseStatDamageMult);
defenseDamage += damageToDefense;
string text = (-damageToDefense).ToString();
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DefenseDamage"), (int)player.position.X, (int)player.position.Y);
string text = (-damageToDefense).ToString();
Color messageColor = Color.LightGray;
Rectangle location = new Rectangle((int)player.position.X, (int)player.position.Y - 16, player.width, player.height);
CombatText.NewText(location, messageColor, Language.GetTextValue(text));
@@ -6001,7 +6003,9 @@ namespace CalamityMod.CalPlayer
int damageToDefense = (int)(newDamage * defenseStatDamageMult);
defenseDamage += damageToDefense;
string text = (-damageToDefense).ToString();
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DefenseDamage"), (int)player.position.X, (int)player.position.Y);
string text = (-damageToDefense).ToString();
Color messageColor = Color.LightGray; // Light Gray text because it's visible and defense icon is gray in the UI
Rectangle location = new Rectangle((int)player.position.X, (int)player.position.Y - 16, player.width, player.height);
CombatText.NewText(location, messageColor, Language.GetTextValue(text));
Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

+25
View File
@@ -86,6 +86,31 @@ namespace CalamityMod.ILEditing
};
}
private static void IncreaseaChlorophyteSpreadChance()
{
// Change the Chlorophyte spawn rate.
IL.Terraria.WorldGen.hardUpdateWorld += (il) =>
{
var cursor = new ILCursor(il);
cursor.GotoNext(MoveType.Before, i => i.MatchLdcI4(300)); // 1 in 300 genRand call used to generate Chlorophyte in mud tiles near jungle grass.
cursor.Remove();
cursor.Emit(OpCodes.Ldc_I4, 150); // Increase the chance to 1 in 150.
};
// Change the Chlorophyte spawn limits.
IL.Terraria.WorldGen.Chlorophyte += (il) =>
{
var cursor = new ILCursor(il);
cursor.GotoNext(MoveType.Before, i => i.MatchLdcI4(40)); // Find the 40 Chlorophyte tile limit. This limit is checked within a 71x71-tile square, with the reference tile as the center.
cursor.Remove();
cursor.Emit(OpCodes.Ldc_I4, 60); // Increase the limit to 60.
cursor.GotoNext(MoveType.Before, i => i.MatchLdcI4(130)); // Find the 130 Chlorophyte tile limit. This limit is checked within a 171x171-tile square, with the reference tile as the center.
cursor.Remove();
cursor.Emit(OpCodes.Ldc_I4, 200); // Increase the limit to 200.
};
}
private static void RemoveRNGFromBlackBelt()
{
// Change the random chance of the Black Belt to 100%, but don't let it work if Calamity's cooldown is active.
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo
public override void SetDefaults()
{
item.damage = 9;
item.damage = 14;
item.ranged = true;
item.width = 22;
item.height = 36;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
public override void SetDefaults()
{
item.damage = 33;
item.damage = 22;
item.ranged = true;
item.width = 22;
item.height = 46;
+3 -2
View File
@@ -50,9 +50,10 @@ namespace CalamityMod.Items.SummonItems
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SoulofNight, 5);
recipe.AddIngredient(ItemID.SoulofNight, 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.AddIngredient(ModContent.ItemType<UnholyCore>());
recipe.AddTile(TileID.AdamantiteForge);
recipe.SetResult(this);
recipe.AddRecipe();
}
+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.SummonItems
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddRecipeGroup("AnyIceBlock", 50);
recipe.AddRecipeGroup("AnyIceBlock", 25);
recipe.AddIngredient(ItemID.SoulofNight, 3);
recipe.AddIngredient(ItemID.SoulofLight, 3);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 5);
+1
View File
@@ -1038,6 +1038,7 @@ namespace CalamityMod.NPCs
npc.ai[1] = 4f;
npc.ai[2] = 0f;
npc.ai[3] = 0f;
npc.localAI[0] = 0f;
npc.netUpdate = true;
}
}
+12 -1
View File
@@ -5279,6 +5279,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
{
num421 *= 0.75f;
num422 *= 0.5f;
}
Vector2 vector39 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
@@ -5389,6 +5390,7 @@ namespace CalamityMod.NPCs
// Reduce acceleration if target is holding a true melee weapon
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
{
num430 *= 0.75f;
num431 *= 0.5f;
}
Vector2 vector40 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
@@ -5848,6 +5850,7 @@ namespace CalamityMod.NPCs
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
{
num399 *= 0.75f;
num400 *= 0.5f;
}
@@ -5963,6 +5966,7 @@ namespace CalamityMod.NPCs
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
{
num409 *= 0.75f;
num410 *= 0.5f;
}
@@ -7283,7 +7287,14 @@ namespace CalamityMod.NPCs
acceleration += 0.025f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 350f)
// Reduce acceleration if target is holding a true melee weapon
Item targetSelectedItem = Main.player[npc.target].inventory[Main.player[npc.target].selectedItem];
if (targetSelectedItem.melee && (targetSelectedItem.shoot == ProjectileID.None || CalamityLists.trueMeleeProjectileList.Contains(targetSelectedItem.shoot)))
{
acceleration *= 0.5f;
}
if (npc.position.Y > Main.player[npc.target].position.Y - 350f)
{
if (npc.velocity.Y > 0f)
npc.velocity.Y *= 0.98f;
+4
View File
@@ -3448,6 +3448,10 @@ namespace CalamityMod.NPCs
// 25% resist to Wave Pounder
else if (projectile.type == ProjectileType<WavePounderBoom>())
damage = (int)(damage * 0.75);
// 15% resist to Dark Spark
else if (projectile.type == ProjectileType<DarkSparkBeam>())
damage = (int)(damage * 0.85);
}
else if (CosmicGuardianIDs.Contains(npc.type) || DarkEnergyIDs.Contains(npc.type))
{
+1
View File
@@ -155,6 +155,7 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.SkeletronHead)
{
DropHelper.DropItemSpray(npc, ItemID.Bone, 70, 100, 5);
DropHelper.DropItemCondition(npc, ModContent.ItemType<ClothiersWrath>(), !Main.expertMode, DropHelper.RareVariantDropRateInt, 1, 1);
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeSkeletron>(), true, !NPC.downedBoss3);
+18 -2
View File
@@ -17,8 +17,9 @@ namespace CalamityMod.NPCs.Polterghast
public class PolterPhantom : ModNPC
{
private int despawnTimer = 600;
private bool reachedChargingPoint = false;
public override void SetStaticDefaults()
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Polterghast");
Main.npcFrameCount[npc.type] = 4;
@@ -50,6 +51,7 @@ namespace CalamityMod.NPCs.Polterghast
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(despawnTimer);
writer.Write(reachedChargingPoint);
CalamityGlobalNPC cgn = npc.Calamity();
writer.Write(cgn.newAI[0]);
writer.Write(cgn.newAI[1]);
@@ -60,6 +62,7 @@ namespace CalamityMod.NPCs.Polterghast
public override void ReceiveExtraAI(BinaryReader reader)
{
despawnTimer = reader.ReadInt32();
reachedChargingPoint = reader.ReadBoolean();
CalamityGlobalNPC cgn = npc.Calamity();
cgn.newAI[0] = reader.ReadSingle();
cgn.newAI[1] = reader.ReadSingle();
@@ -252,6 +255,8 @@ namespace CalamityMod.NPCs.Polterghast
// Charge
if (npc.Calamity().newAI[3] == 1f)
{
reachedChargingPoint = false;
npc.Opacity += 0.06f;
if (npc.Opacity > 0.8f)
npc.Opacity = 0.8f;
@@ -313,6 +318,13 @@ namespace CalamityMod.NPCs.Polterghast
// Do not deal damage during movement to avoid cheap bullshit hits
npc.damage = 0;
// Greatly increase velocity and acceleration in order to stick to a position once one is found
if (reachedChargingPoint)
{
chargeAcceleration *= 4f;
chargeVelocity *= 2f;
}
// Charge location
Vector2 chargeVector = new Vector2(npc.Calamity().newAI[1], npc.Calamity().newAI[2]);
Vector2 chargeLocationVelocity = Vector2.Normalize(chargeVector - vector) * chargeVelocity;
@@ -334,7 +346,11 @@ namespace CalamityMod.NPCs.Polterghast
}
if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue)
npc.velocity *= 0.8f;
{
reachedChargingPoint = true;
npc.velocity *= 0.25f;
}
else
{
if (Vector2.Distance(vector, chargeVector) > 1200f)
+26 -1
View File
@@ -29,6 +29,8 @@ namespace CalamityMod.NPCs.Polterghast
public class Polterghast : ModNPC
{
private int despawnTimer = 600;
private int chargeTelegraphTimer = 15;
private bool reachedChargingPoint = false;
public override void SetStaticDefaults()
{
@@ -87,6 +89,8 @@ namespace CalamityMod.NPCs.Polterghast
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(despawnTimer);
writer.Write(chargeTelegraphTimer);
writer.Write(reachedChargingPoint);
CalamityGlobalNPC cgn = npc.Calamity();
writer.Write(cgn.newAI[0]);
writer.Write(cgn.newAI[1]);
@@ -97,6 +101,8 @@ namespace CalamityMod.NPCs.Polterghast
public override void ReceiveExtraAI(BinaryReader reader)
{
despawnTimer = reader.ReadInt32();
chargeTelegraphTimer = reader.ReadInt32();
reachedChargingPoint = reader.ReadBoolean();
CalamityGlobalNPC cgn = npc.Calamity();
cgn.newAI[0] = reader.ReadSingle();
cgn.newAI[1] = reader.ReadSingle();
@@ -441,6 +447,8 @@ namespace CalamityMod.NPCs.Polterghast
// Charge
if (calamityGlobalNPC.newAI[3] == 1f)
{
reachedChargingPoint = false;
if (calamityGlobalNPC.newAI[1] == 0f)
{
npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity;
@@ -459,6 +467,7 @@ namespace CalamityMod.NPCs.Polterghast
// Reset and either go back to normal or charge again
if (calamityGlobalNPC.newAI[2] >= totalChargeTime)
{
chargeTelegraphTimer = 15;
calamityGlobalNPC.newAI[1] = 0f;
calamityGlobalNPC.newAI[2] = 0f;
calamityGlobalNPC.newAI[3] = 0f;
@@ -493,6 +502,13 @@ namespace CalamityMod.NPCs.Polterghast
else
calamityGlobalNPC.newAI[2] = player.Center.Y - chargeDistance;
// Greatly increase velocity and acceleration in order to stick to a position once one is found
if (reachedChargingPoint)
{
chargeAcceleration *= 4f;
chargeVelocity *= 2f;
}
// Line up a charge
Vector2 chargeVector = new Vector2(calamityGlobalNPC.newAI[1], calamityGlobalNPC.newAI[2]);
Vector2 chargeLocationVelocity = Vector2.Normalize(chargeVector - vector) * chargeVelocity;
@@ -504,10 +520,19 @@ namespace CalamityMod.NPCs.Polterghast
if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue)
{
npc.velocity *= 0.8f;
reachedChargingPoint = true;
npc.velocity *= 0.25f;
if (clonePositionCheck)
{
// Pause before actually charging
if (chargeTelegraphTimer > 0)
{
chargeTelegraphTimer--;
return;
}
npc.velocity = Vector2.Zero;
calamityGlobalNPC.newAI[1] = 0f;
calamityGlobalNPC.newAI[2] = 0f;
+14 -1
View File
@@ -161,7 +161,20 @@ namespace CalamityMod.NPCs.Ravager
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, DustID.Iron, 0f, 0f, 100, default, 2f);
Main.dust[num624].velocity *= 2f;
}
}
float y = npc.height / 6f;
float randomVelocityScale = 0.25f;
for (int i = 0; i < 2; i++)
{
Vector2 randomVelocity = npc.velocity * Main.rand.NextFloat() * randomVelocityScale;
Gore.NewGore(npc.position, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar"), 1f);
Gore.NewGore(npc.position + Vector2.UnitY * y, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar2"), 1f);
Gore.NewGore(npc.position + Vector2.UnitY * y * 2f, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar3"), 1f);
Gore.NewGore(npc.position + Vector2.UnitY * y * 3f, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar4"), 1f);
Gore.NewGore(npc.position + Vector2.UnitY * y * 4f, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar5"), 1f);
Gore.NewGore(npc.position + Vector2.UnitY * y * 5f, npc.velocity + randomVelocity, mod.GetGoreSlot("Gores/ScavengerGores/RockPillar6"), 1f);
}
}
else
{
for (int num621 = 0; num621 < 2; num621++)
+10 -16
View File
@@ -48,15 +48,9 @@ namespace CalamityMod.Projectiles.Ranged
{
projectile.position = projectile.Center;
projectile.width = projectile.height = 32;
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
projectile.position.X = projectile.position.X - (projectile.width / 2);
projectile.position.Y = projectile.position.Y - (projectile.height / 2);
Main.PlaySound(SoundID.Item14, (int)projectile.position.X, (int)projectile.position.Y);
projectile.maxPenetrate = -1;
projectile.penetrate = -1;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
projectile.damage /= 2;
projectile.Damage();
for (int num621 = 0; num621 < 2; num621++)
{
int num622 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f);
@@ -64,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 6; num623++)
@@ -76,15 +70,15 @@ namespace CalamityMod.Projectiles.Ranged
Main.dust[num624].velocity *= 2f;
}
CalamityUtils.ExplosionGores(projectile.Center, 3);
float x = projectile.position.X + (float)Main.rand.Next(-400, 400);
float y = projectile.position.Y - (float)Main.rand.Next(500, 800);
float x = projectile.position.X + Main.rand.Next(-400, 400);
float y = projectile.position.Y - Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = projectile.position.X + (float)(projectile.width / 2) - vector.X;
float num16 = projectile.position.Y + (float)(projectile.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
float num15 = projectile.position.X + (projectile.width / 2) - vector.X;
float num16 = projectile.position.Y + (projectile.height / 2) - vector.Y;
num15 += Main.rand.Next(-100, 101);
int num17 = 25;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
float num18 = (float)Math.Sqrt(num15 * num15 + num16 * num16);
num18 = num17 / num18;
num15 *= num18;
num16 *= num18;
if (projectile.owner == Main.myPlayer)
+3 -3
View File
@@ -32,10 +32,10 @@ namespace CalamityMod.Projectiles.Ranged
public override void AI()
{
projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2;
if (projectile.timeLeft % 60 == 0)
if (projectile.timeLeft % 45 == 0)
{
if (projectile.owner == Main.myPlayer)
Projectile.NewProjectile(projectile.Center, projectile.velocity * 0.25f, ModContent.ProjectileType<VanquisherArrowSplit>(), projectile.damage, projectile.knockBack, projectile.owner);
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<VanquisherArrowSplit>()] < 20)
Projectile.NewProjectile(projectile.Center, projectile.velocity * 0.25f, ModContent.ProjectileType<VanquisherArrowSplit>(), projectile.damage / 2, projectile.knockBack, projectile.owner);
}
}
+18
View File
@@ -0,0 +1,18 @@
using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
{
public class DefenseDamage : ModSound
{
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume * 1f;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;
}
}
}
Binary file not shown.
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.Ores
name.SetDefault("Charred Ore");
AddMapEntry(new Color(17, 16, 26), name);
mineResist = 6f;
minPick = 180;
minPick = 150;
soundType = SoundID.Tink;
dustType = 235;
Main.tileSpelunker[Type] = true;