This commit is contained in:
IbanPlay committed 2022-03-17 21:10:58 +01:00
commit 1a3997c4ae
36 files changed
+128 -236

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetDefaults()
{
DisplayName.SetDefault("Holy Wrath");
Description.SetDefault("Increased damage, increased movement and flight speed, and all attacks inflict holy fire");
Description.SetDefault("Increased damage and all attacks inflict holy fire");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetDefaults()
{
DisplayName.SetDefault("Profaned Rage");
Description.SetDefault("Increased crit chance, movement and flight speed");
Description.SetDefault("Increased critical strike chance");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+1 -3
View File
@@ -2973,9 +2973,7 @@ namespace CalamityMod.CalPlayer
Main.dust[dustIndex].noLight = true;
}
int iframes = 150;
player.GiveIFrames(iframes, true);
spectralVeilImmunity = iframes;
spectralVeilImmunity = 60;
}
}
}
-1
View File
@@ -2739,7 +2739,6 @@ namespace CalamityMod.CalPlayer
if (player.FindBuffIndex(BuffID.Lifeforce) > -1)
player.ClearBuff(BuffID.Lifeforce);
player.lifeMagnet = true;
player.calmed = true;
}
if (player.wellFed)
+2 -1
View File
@@ -1484,7 +1484,8 @@ namespace CalamityMod
ItemType<JawsOfOblivion>(),
ItemType<LeviathanTeeth>(),
ItemType<DeificThunderbolt>(),
ItemType<Sacrifice>()
ItemType<Sacrifice>(),
ItemType<Seraphim>()
};
daggerProjList = new List<int>()
-2
View File
@@ -15,7 +15,6 @@ namespace CalamityMod.Items.Accessories
"TOOLTIP LINE HERE\n" +
"If you dodge something while invulnerable, you instantly gain full stealth\n" +
"Teleportation is disabled while Chaos State is active\n" +
"Provides 10% increased movement speed\n" +
"Stealth generates 20% faster while moving");
}
@@ -45,7 +44,6 @@ namespace CalamityMod.Items.Accessories
{
player.Calamity().spectralVeil = true;
player.Calamity().stealthGenMoving += 0.2f;
player.moveSpeed += 0.1f;
}
}
}
+4 -4
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories.Wings
DisplayName.SetDefault("Exodus Wings");
Tooltip.SetDefault("Pulsing with an alien heartbeat\n" +
"Horizontal speed: 9.00\n" +
"Acceleration multiplier: 2.5\n" +
"Acceleration multiplier: 3.0\n" +
"Great vertical speed\n" +
"Flight time: 180\n" +
"5% increased rogue damage and critical strike chance while wearing the Empyrean Armor");
@@ -61,11 +61,11 @@ namespace CalamityMod.Items.Accessories.Wings
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
{
ascentWhenFalling = 0.75f;
ascentWhenFalling = 0.85f;
ascentWhenRising = 0.15f;
maxCanAscendMultiplier = 1f;
maxAscentMultiplier = 2.5f;
constantAscend = 0.125f;
maxAscentMultiplier = 3f;
constantAscend = 0.135f;
}
public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
+3 -3
View File
@@ -644,7 +644,7 @@ namespace CalamityMod.Items
EditTooltipByNum(0, (line) => line.text += "\nCan mine Scoria Ore located in the Abyss");
if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe)
EditTooltipByName("Material", (line) => line.text += "\nCan mine Uelibloom Ore located in the Jungle");
EditTooltipByName("Material", (line) => line.text += "\nCan mine Uelibloom Ore");
#endregion
// Rebalances and information about vanilla set bonuses
@@ -795,11 +795,11 @@ namespace CalamityMod.Items
"10% increased movement speed and 12% increased jump speed");
if (item.type == ItemID.WingsSolar)
AddWingStats(9f, 2.5f, 2, 180, "7% increased melee damage and 3% increased melee critical strike chance\n" +
AddWingStats(9f, 3f, 2, 180, "7% increased melee damage and 3% increased melee critical strike chance\n" +
"while wearing the Solar Flare Armor");
if (item.type == ItemID.WingsStardust)
AddWingStats(9f, 2.5f, 2, 180, "+1 max minion and 5% increased minion damage while wearing the Stardust Armor");
AddWingStats(9f, 3f, 2, 180, "+1 max minion and 5% increased minion damage while wearing the Stardust Armor");
if (item.type == ItemID.WingsVortex)
AddWingStats(6.5f, 1.5f, 1, 160, "3% increased ranged damage and 7% increased ranged critical strike chance\n" +
-1
View File
@@ -20,7 +20,6 @@ namespace CalamityMod.Items.DifficultyItems
// Biome effect lines
"Allows certain bosses to spawn naturally depending on what biome you're in.\n" +
"Lethal Lava effects are always enabled.\n" +
"Greatly boosts enemy spawn rates during the Blood Moon.\n" +
"Makes the Abyss more treacherous to navigate.\n" +
+11 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Tiles;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -8,7 +9,7 @@ namespace CalamityMod.Items.Placeables.Banners
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("A purely decorative banner themed after an extinct slime species");
Tooltip.SetDefault("A decorative banner themed after an extinct slime species");
}
public override void SetDefaults()
@@ -27,5 +28,14 @@ namespace CalamityMod.Items.Placeables.Banners
item.createTile = ModContent.TileType<MonsterBanner>();
item.placeStyle = 51;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Silk, 3);
recipe.AddIngredient(ModContent.ItemType<WulfrumShard>(), 3);
recipe.AddTile(TileID.Loom);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 367 B

+2 -3
View File
@@ -11,9 +11,8 @@ namespace CalamityMod.Items.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cadance Potion");
Tooltip.SetDefault("Gives the cadance buff which reduces spawn rates\n" +
"Increases life regen and increases max life by 25%\n" +
"Increases heart pickup range\n" +
Tooltip.SetDefault("Gives the cadance buff which increases life regeneration and heart pickup range\n" +
"Increases max life by 25%\n" +
"While this potion's buff is active, Regeneration Potion and Lifeforce Potion buffs are disabled");
}
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Profaned Rage Potion");
Tooltip.SetDefault("Increases critical strike chance by 12% and increases horizontal flight speed by 5%\n" +
Tooltip.SetDefault("Increases critical strike chance by 12%\n" +
"While this potion's buff is active the Rage Potion's buff is disabled");
}
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Tools
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Genesis Pickaxe");
Tooltip.SetDefault("Can mine Uelibloom Ore located in the Jungle");
Tooltip.SetDefault("Can mine Uelibloom Ore");
}
public override void SetDefaults()
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Eutrophic Scimitar");
Tooltip.SetDefault("Fires a beam upon swing that stuns enemies");
Tooltip.SetDefault("Fires two beams that stun enemies");
}
public override void SetDefaults()
+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Forsaken Saber");
Tooltip.SetDefault("Shoots a sand blade that alters its velocity as it travels");
Tooltip.SetDefault("Shoots three sand blades that alter their velocity as they travel");
}
public override void SetDefaults()
+2 -1
View File
@@ -12,7 +12,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Claret Cannon");
Tooltip.SetDefault("Converts musket balls into strings of 3 bloody tears that drain enemy health");
Tooltip.SetDefault("Fires strings of 3 bullets\n" +
"Converts musket balls into bloody tears that drain enemy health");
}
public override void SetDefaults()
+6 -11
View File
@@ -53,17 +53,12 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<IceStar>(), 200);
recipe.AddIngredient(ModContent.ItemType<Avalanche>(), 2);
recipe.AddIngredient(ModContent.ItemType<EffluviumBow>(), 2);
recipe.AddIngredient(ModContent.ItemType<GlacialCrusher>(), 2);
recipe.AddIngredient(ModContent.ItemType<Icebreaker>(), 2);
recipe.AddIngredient(ModContent.ItemType<SnowstormStaff>(), 2);
recipe.AddIngredient(ModContent.ItemType<SoulofCryogen>(), 2);
recipe.AddIngredient(ModContent.ItemType<FrostFlare>(), 2);
recipe.AddIngredient(ModContent.ItemType<CryoStone>());
recipe.AddIngredient(ItemID.FrozenKey);
recipe.AddIngredient(ItemID.FrostCore, 2);
recipe.AddIngredient(ModContent.ItemType<IceStar>(), 100);
recipe.AddIngredient(ModContent.ItemType<Avalanche>(), 1);
recipe.AddIngredient(ModContent.ItemType<EffluviumBow>(), 1);
recipe.AddIngredient(ModContent.ItemType<GlacialCrusher>(), 1);
recipe.AddIngredient(ModContent.ItemType<Icebreaker>(), 1);
recipe.AddIngredient(ModContent.ItemType<SnowstormStaff>(), 1);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 10);
recipe.AddTile(TileID.IceMachine);
recipe.SetResult(this);
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
@@ -46,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ShatteredSun>());
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
recipe.SetResult(this);
recipe.AddRecipe();
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Typeless
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Aero Dynamite");
DisplayName.SetDefault("Skynamite");
Tooltip.SetDefault("You don't need an aerodynamics major to use this\n" +
"Throws a floaty explosive that defies gravity");
}
+1 -1
View File
@@ -659,7 +659,7 @@ namespace CalamityMod
List<int> enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Key).ToList();
enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Key));
List<int> summons = new List<int>() { ItemType<CausticTear>() };
List<int> loot = new List<int>() { ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<CausticCroakerStaff>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>(), ModContent.ItemType<GammaHeart>(), ModContent.ItemType<PhosphorescentGauntlet>() };
List<int> loot = new List<int>() { ItemID.SharkFin, ItemType<SulfuricScale>(), ItemType<CorrodedFossil>(), ItemType<LeadCore>(), ItemType<NuclearRod>(), ItemType<ParasiticSceptor>(), ItemType<CausticCroakerStaff>(), ItemType<FlakToxicannon>(), ItemType<OrthoceraShell>(), ItemType<SkyfinBombers>(), ItemType<SlitheringEels>(), ItemType<SpentFuelContainer>(), ItemType<SulphurousGrabber>(), ItemType<GammaHeart>(), ItemType<PhosphorescentGauntlet>(), ItemType<SulphuricAcidCannon>() };
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
string instructions = $"Use a [i:{ItemType<CausticTear>()}] or wait for the invasion to occur naturally after the Polterghast is defeated";
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116));
+1 -5
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.AstrumAureus
npc.height = 374;
npc.defense = 40;
npc.DR_NERD(0.5f);
npc.LifeMaxNERB(NPC.downedMoonlord ? 243750 : 89200, NPC.downedMoonlord ? 292500 : 107000, 740000); // 30 seconds in boss rush
npc.LifeMaxNERB(NPC.downedMoonlord ? 196000 : 98000, NPC.downedMoonlord ? 235200 : 117600, 740000); // 30 seconds in boss rush
npc.aiStyle = -1;
aiType = -1;
npc.knockBackResist = 0f;
@@ -70,8 +70,6 @@ namespace CalamityMod.NPCs.AstrumAureus
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(stomping);
writer.Write(npc.dontTakeDamage);
writer.Write(npc.chaseable);
writer.Write(npc.alpha);
writer.Write(npc.localAI[2]);
for (int i = 0; i < 4; i++)
@@ -81,8 +79,6 @@ namespace CalamityMod.NPCs.AstrumAureus
public override void ReceiveExtraAI(BinaryReader reader)
{
stomping = reader.ReadBoolean();
npc.dontTakeDamage = reader.ReadBoolean();
npc.chaseable = reader.ReadBoolean();
npc.alpha = reader.ReadInt32();
npc.localAI[2] = reader.ReadSingle();
for (int i = 0; i < 4; i++)
+1 -3
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Bumblebirb
npc.height = 100;
npc.defense = 40;
npc.DR_NERD(0.1f);
npc.LifeMaxNERB(158500, 190000, 300000); // Old HP - 227500, 252500
npc.LifeMaxNERB(190200, 228240, 300000); // Old HP - 227500, 252500
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
@@ -66,7 +66,6 @@ namespace CalamityMod.NPCs.Bumblebirb
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(npc.dontTakeDamage);
writer.Write(npc.localAI[0]);
writer.Write(npc.localAI[1]);
writer.Write(npc.localAI[2]);
@@ -77,7 +76,6 @@ namespace CalamityMod.NPCs.Bumblebirb
public override void ReceiveExtraAI(BinaryReader reader)
{
npc.dontTakeDamage = reader.ReadBoolean();
npc.localAI[0] = reader.ReadSingle();
npc.localAI[1] = reader.ReadSingle();
npc.localAI[2] = reader.ReadSingle();
-2
View File
@@ -74,7 +74,6 @@ namespace CalamityMod.NPCs.Calamitas
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(npc.chaseable);
writer.Write(npc.dontTakeDamage);
writer.Write(npc.localAI[0]);
writer.Write(npc.localAI[1]);
@@ -86,7 +85,6 @@ namespace CalamityMod.NPCs.Calamitas
public override void ReceiveExtraAI(BinaryReader reader)
{
npc.chaseable = reader.ReadBoolean();
npc.dontTakeDamage = reader.ReadBoolean();
npc.localAI[0] = reader.ReadSingle();
npc.localAI[1] = reader.ReadSingle();
+16 -49
View File
@@ -1293,7 +1293,6 @@ namespace CalamityMod.NPCs
Main.PlaySound(SoundID.Item109, npc.Center);
calamityGlobalNPC.newAI[2] = 2f;
SpawnDust();
npc.alpha = 255;
}
else if (calamityGlobalNPC.newAI[0] <= (float)npc.lifeMax * 0.4)
{
@@ -1303,45 +1302,33 @@ namespace CalamityMod.NPCs
string key = "Mods.CalamityMod.CalamitasBossText2";
Color messageColor = Color.Orange;
CalamityUtils.DisplayLocalizedText(key, messageColor);
SpawnDust();
}
else
{
Main.PlaySound(SoundID.Item109, npc.Center);
calamityGlobalNPC.newAI[2] = 1f;
SpawnDust();
npc.alpha = 255;
}
}
}
}
// Huge DR boost if brothers are alive
if (expertMode)
// Immunity if brothers are alive
if (CalamityGlobalNPC.cataclysm != -1)
{
if (CalamityGlobalNPC.cataclysm != -1)
{
if (Main.npc[CalamityGlobalNPC.cataclysm].active)
brotherAlive = true;
}
if (CalamityGlobalNPC.catastrophe != -1)
{
if (Main.npc[CalamityGlobalNPC.catastrophe].active)
brotherAlive = true;
}
if (brotherAlive)
{
calamityGlobalNPC.DR = 0.9999f;
calamityGlobalNPC.unbreakableDR = true;
}
else
{
calamityGlobalNPC.DR = death ? 0.075f : 0.15f;
calamityGlobalNPC.unbreakableDR = false;
}
if (Main.npc[CalamityGlobalNPC.cataclysm].active)
brotherAlive = true;
}
if (CalamityGlobalNPC.catastrophe != -1)
{
if (Main.npc[CalamityGlobalNPC.catastrophe].active)
brotherAlive = true;
}
// Disable homing if brothers are alive
npc.chaseable = !brotherAlive;
if (brotherAlive)
npc.dontTakeDamage = true;
void SpawnDust()
{
@@ -1565,8 +1552,8 @@ namespace CalamityMod.NPCs
{
calamityGlobalNPC.newAI[3] += 1f;
npc.damage = 0;
npc.chaseable = false;
npc.dontTakeDamage = true;
npc.alpha = 255;
float rotX = player.Center.X - npc.Center.X;
float rotY = player.Center.Y - npc.Center.Y;
@@ -1636,7 +1623,6 @@ namespace CalamityMod.NPCs
npc.localAI[1] = 0f;
calamityGlobalNPC.newAI[2] = 0f;
calamityGlobalNPC.newAI[3] = 0f;
npc.alpha = 0;
// Prevent bullshit charge hits when second bullet hell ends.
if (phase5)
@@ -1703,6 +1689,8 @@ namespace CalamityMod.NPCs
return;
}
npc.alpha = npc.dontTakeDamage ? 255 : 0;
// Float above target and fire lasers or fireballs
if (npc.ai[1] == 0f)
{
@@ -3033,10 +3021,6 @@ namespace CalamityMod.NPCs
// Mid-teleport
else if (npc.ai[0] == 6f)
{
// Become immune
npc.chaseable = false;
npc.dontTakeDamage = true;
if (death)
npc.localAI[2] += 1f + 0.33f * (1f - lifeRatio);
@@ -3105,10 +3089,6 @@ namespace CalamityMod.NPCs
}
}
// Become vulnerable
npc.chaseable = true;
npc.dontTakeDamage = false;
// Reset alpha and set AI to next phase (Idle)
npc.alpha = 0;
npc.ai[0] = 1f;
@@ -4585,10 +4565,6 @@ namespace CalamityMod.NPCs
bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) ||
(phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f);
npc.dontTakeDamage = phaseSwitchPhase;
calamityGlobalNPC.DR = (npc.ai[0] == 5f || (enrageScale == 3f && !malice)) ? 0.75f : 0.1f;
if (phaseSwitchPhase)
{
if (npc.velocity.X < 0f)
@@ -5216,7 +5192,6 @@ namespace CalamityMod.NPCs
{
Vector2 value43 = new Vector2(0f, -8f);
npc.velocity = (npc.velocity * 21f + value43) / 10f;
npc.dontTakeDamage = true;
return;
}
@@ -5565,10 +5540,6 @@ namespace CalamityMod.NPCs
npc.Calamity().CurrentlyEnraged = biomeEnraged;
// If the player isn't in the ocean biome or Old Duke is transitioning between phases, become immune
if (!phase3AI)
npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f;
// Enrage
if (biomeEnraged)
{
@@ -6464,8 +6435,6 @@ namespace CalamityMod.NPCs
// Pause before teleport
else if (npc.ai[0] == 12f)
{
npc.dontTakeDamage = true;
// Alpha
if (npc.alpha < 255 && npc.ai[2] >= num12 - 15f)
{
@@ -6521,8 +6490,6 @@ namespace CalamityMod.NPCs
if (npc.ai[3] >= 9f)
npc.ai[3] = 0f;
npc.dontTakeDamage = false;
npc.netUpdate = true;
}
}
+1 -1
View File
@@ -1123,7 +1123,7 @@ namespace CalamityMod.NPCs
}
else if (npc.type == NPCID.DukeFishron)
{
npc.lifeMax = (int)(npc.lifeMax * 1.2);
npc.lifeMax = (int)(npc.lifeMax * 1.4);
npc.npcSlots = 20f;
}
else if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2)
+1 -17
View File
@@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.HiveMind
npc.width = 178;
npc.height = 122;
npc.defense = 8;
npc.LifeMaxNERB(7800, 9360, 350000);
npc.LifeMaxNERB(8500, 10200, 350000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
@@ -405,8 +405,6 @@ namespace CalamityMod.NPCs.HiveMind
npc.frame.Y = 0;
npc.noGravity = true;
npc.noTileCollide = true;
npc.Calamity().DR = 0f;
npc.Calamity().unbreakableDR = false;
npc.scale = 1f;
npc.alpha = 0;
npc.dontTakeDamage = false;
@@ -468,20 +466,6 @@ namespace CalamityMod.NPCs.HiveMind
}
}
if (expertMode)
{
if (NPC.AnyNPCs(ModContent.NPCType<DankCreeper>()))
{
npc.Calamity().DR = 0.9999f;
npc.Calamity().unbreakableDR = true;
}
else
{
npc.Calamity().DR = 0f;
npc.Calamity().unbreakableDR = false;
}
}
if (npc.ai[3] == 0f && npc.life > 0)
npc.ai[3] = npc.lifeMax;
+1 -3
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.OldDuke
npc.GetNPCDamage();
npc.defense = 90;
npc.DR_NERD(0.5f, null, null, null, true);
npc.LifeMaxNERB(412500, 495000, 400000);
npc.LifeMaxNERB(495000, 594000, 400000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
@@ -65,7 +65,6 @@ namespace CalamityMod.NPCs.OldDuke
public override void SendExtraAI(BinaryWriter writer)
{
writer.Write(npc.dontTakeDamage);
writer.Write(npc.localAI[0]);
writer.Write(npc.localAI[1]);
writer.Write(npc.rotation);
@@ -76,7 +75,6 @@ namespace CalamityMod.NPCs.OldDuke
public override void ReceiveExtraAI(BinaryReader reader)
{
npc.dontTakeDamage = reader.ReadBoolean();
npc.localAI[0] = reader.ReadSingle();
npc.localAI[1] = reader.ReadSingle();
npc.rotation = reader.ReadSingle();
+27 -10
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Perforator
npc.width = 110;
npc.height = 100;
npc.defense = 4;
npc.LifeMaxNERB(4500, 5400, 270000);
npc.LifeMaxNERB(5000, 6000, 270000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.aiStyle = -1;
@@ -170,27 +170,22 @@ namespace CalamityMod.NPCs.Perforator
npc.timeLeft = 1800;
int wormsAlive = 0;
bool largeWormAlive = false;
if (NPC.AnyNPCs(ModContent.NPCType<PerforatorHeadLarge>()))
{
wormsAlive++;
largeWormAlive = true;
}
if (NPC.AnyNPCs(ModContent.NPCType<PerforatorHeadMedium>()))
wormsAlive++;
if (NPC.AnyNPCs(ModContent.NPCType<PerforatorHeadSmall>()))
wormsAlive++;
npc.dontTakeDamage = largeWormAlive && expertMode;
if (npc.ai[3] == 0f && npc.life > 0)
npc.ai[3] = npc.lifeMax;
if (npc.life > 0)
bool canSpawnWorms = !small || !medium || !large;
if (npc.life > 0 && canSpawnWorms)
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int num660 = (int)(npc.lifeMax * 0.3);
int num660 = (int)(npc.lifeMax * 0.25);
if ((npc.life + num660) < npc.ai[3])
{
npc.ai[3] = npc.life;
@@ -209,8 +204,30 @@ namespace CalamityMod.NPCs.Perforator
large = true;
wormType = ModContent.NPCType<PerforatorHeadLarge>();
}
NPC.NewNPC((int)npc.Center.X, (int)(npc.Center.Y + 800f), wormType, 1);
NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, wormType, 1);
npc.TargetClosest();
Main.PlaySound(SoundID.NPCDeath23, npc.position);
for (int num621 = 0; num621 < 16; num621++)
{
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 170, 0f, 0f, 100, default, 1f);
Main.dust[num622].velocity *= 2f;
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.25f;
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 32; num623++)
{
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1.5f);
Main.dust[num624].noGravity = true;
Main.dust[num624].velocity *= 3f;
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1f);
Main.dust[num624].velocity *= 2f;
}
}
}
}
+1 -15
View File
@@ -605,18 +605,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
// 2 seconds of immunity to prevent spawn killing
if (npc.Calamity().newAI[1] < 120f)
{
npc.Calamity().newAI[1] += 1f;
if (npc.Calamity().newAI[1] % 15f == 0f)
npc.SyncExtraAI();
npc.dontTakeDamage = true;
}
else
npc.dontTakeDamage = false;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
npc.TargetClosest();
@@ -705,9 +693,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
else if (npc.velocity.Y > num5)
npc.velocity.Y -= acceleration;
if (npc.Calamity().newAI[1] >= 120f)
npc.localAI[0] += 1f;
npc.localAI[0] += 1f;
if (npc.justHit)
npc.localAI[0] = 0f;
@@ -143,10 +143,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage;
// If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune
if (!phase3AI)
npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f;
// Enrage
if (enrage || malice)
{
@@ -807,9 +803,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Phase 3
else if (npc.ai[0] == 10f && !player.dead)
{
npc.dontTakeDamage = false;
npc.chaseable = false;
// Alpha
if (npc.alpha < 255)
{
@@ -929,9 +922,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Charge
else if (npc.ai[0] == 11f)
{
npc.dontTakeDamage = false;
npc.chaseable = true;
// Accelerate
npc.velocity *= 1.01f;
@@ -971,9 +961,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Pause before teleport
else if (npc.ai[0] == 12f)
{
npc.dontTakeDamage = true;
npc.chaseable = false;
// Alpha
if (npc.alpha < 255)
{
+28 -37
View File
@@ -365,7 +365,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
calamityGlobalNPC.unbreakableDR = false;
npc.defense = 10;
npc.damage = (int)(npc.defDamage * 1.4f);
npc.chaseable = true;
// Spawn tentacles
if (Main.netMode != NetmodeID.MultiplayerClient)
@@ -559,51 +558,43 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
}
}
// Heal if on surface and it's daytime, else, gain defense
// Heal if on surface
if (surface)
{
if (Main.dayTime)
if (Main.rand.NextBool(Main.dayTime ? 3 : 6))
{
if (Main.rand.NextBool(3))
{
int dust = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, default, 0.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].fadeIn = 1.3f;
Vector2 vector = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
vector.Normalize();
vector *= Main.rand.Next(50, 100) * 0.04f;
Main.dust[dust].velocity = vector;
vector.Normalize();
vector *= 86f;
Main.dust[dust].position = npc.Center - vector;
}
int dust = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, default, 0.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].fadeIn = 1.3f;
Vector2 vector = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
vector.Normalize();
vector *= Main.rand.Next(50, 100) * 0.04f;
Main.dust[dust].velocity = vector;
vector.Normalize();
vector *= 86f;
Main.dust[dust].position = npc.Center - vector;
}
// Heal, 25 seconds to reach full HP from 0
calamityGlobalNPC.newAI[1] += 1f;
if (calamityGlobalNPC.newAI[1] >= 15f)
// Heal, 100 (50 during daytime) seconds to reach full HP from 0
calamityGlobalNPC.newAI[1] += 1f;
if (calamityGlobalNPC.newAI[1] >= (Main.dayTime ? 30f : 60f))
{
calamityGlobalNPC.newAI[1] = 0f;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
calamityGlobalNPC.newAI[1] = 0f;
if (Main.netMode != NetmodeID.MultiplayerClient)
int healAmt = npc.lifeMax / 100;
if (healAmt > npc.lifeMax - npc.life)
healAmt = npc.lifeMax - npc.life;
if (healAmt > 0)
{
int healAmt = npc.lifeMax / 100;
if (healAmt > npc.lifeMax - npc.life)
healAmt = npc.lifeMax - npc.life;
if (healAmt > 0)
{
npc.life += healAmt;
npc.HealEffect(healAmt, true);
npc.netUpdate = true;
}
npc.life += healAmt;
npc.HealEffect(healAmt, true);
npc.netUpdate = true;
}
}
}
else
{
calamityGlobalNPC.DR = 0.9999f;
calamityGlobalNPC.unbreakableDR = true;
}
}
if (npc.ai[0] == 0f && npc.life > 0)
@@ -126,9 +126,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
}
bool handsDead = num156 == 0;
npc.chaseable = handsDead;
calamityGlobalNPC.DR = (malice ? 0.45f : 0.05f) + num156 * 0.45f;
if (calamityGlobalNPC.DR > 0.95f)
calamityGlobalNPC.DR = 0.95f;
calamityGlobalNPC.DR = num156 > 0 ? 0.9999f : 0.05f;
// Teleport
if (handsDead || phase2)
@@ -108,12 +108,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
else if (allArmsDead)
npc.damage = npc.defDamage;
int defenseBoost = malice ? 100 : 20;
npc.defense = npc.defDefense + (cannonAlive ? defenseBoost : 0) + (laserAlive ? defenseBoost : 0) + (viceAlive ? defenseBoost : 0) + (sawAlive ? defenseBoost : 0);
npc.defense = npc.defDefense;
// Phases
bool phase2 = lifeRatio < 0.66f;
bool phase3 = lifeRatio < 0.33f;
bool phase2 = lifeRatio < 0.5f;
bool phase3 = lifeRatio < 0.25f;
// Kill all arms if Prime Head enters phase 2
if (phase2 && !allArmsDead)
+4 -32
View File
@@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.Yharon
npc.width = 200;
npc.height = 200;
npc.defense = 90;
npc.LifeMaxNERB(1085000, 1300000, 370000);
npc.LifeMaxNERB(1302000, 1562400, 370000);
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
npc.knockBackResist = 0f;
@@ -183,14 +183,6 @@ namespace CalamityMod.NPCs.Yharon
float acceleration = expertMode ? 0.75f : 0.7f;
float velocity = expertMode ? 12f : 11f;
// Damage immunity
if (phase3Change)
npc.dontTakeDamage = phase4Check;
else if (phase2Change)
npc.dontTakeDamage = phase3Check;
else if (phase1Change)
npc.dontTakeDamage = phase2Check;
if (phase3Change)
{
acceleration = expertMode ? 0.85f : 0.8f;
@@ -1528,32 +1520,12 @@ namespace CalamityMod.NPCs.Yharon
CalamityUtils.DisplayLocalizedText(key, messageColor);
}
npc.dontTakeDamage = false;
if (invincibilityCounter < Phase2InvincibilityTime)
{
npc.dontTakeDamage = true;
phase2 = phase3 = phase4 = false;
invincibilityCounter += 1;
}
else
{
// Damage immunity
switch (secondPhasePhase)
{
case 1:
npc.dontTakeDamage = phase2;
break;
case 2:
npc.dontTakeDamage = phase3;
break;
case 3:
npc.dontTakeDamage = phase4;
break;
case 4:
npc.dontTakeDamage = false;
break;
}
if (!npc.dontTakeDamage)
npc.dontTakeDamage = npc.ai[0] == 9f;
invincibilityCounter++;
}
// Acquire target and determine enrage state
+2 -2
View File
@@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged
public override void SetDefaults()
{
projectile.width = 72;
projectile.height = 72;
projectile.width = 36;
projectile.height = 36;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;