Merge branch '1.4' into codebreaker-text
This commit is contained in:
commit
42d82daa5c
25 files changed
+150
-106
No files matched your search
@@ -551,7 +551,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (ZoneCalamity) // Brimstone Crags, fishing in lava
|
||||
{
|
||||
if (attempt.legendary)
|
||||
if (attempt.crate)
|
||||
{
|
||||
itemDrop = ModContent.ItemType<BrimstoneCrate>();
|
||||
}
|
||||
else if (attempt.legendary)
|
||||
{
|
||||
List<int> legendaryCatches = new List<int>()
|
||||
{
|
||||
|
||||
@@ -435,13 +435,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else
|
||||
{
|
||||
// If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly.
|
||||
// If any boss is alive, you gain adrenaline smoothly.
|
||||
// EXCEPTION: Wall of Flesh is alive and you are not in hell. Then you don't get anything.
|
||||
if ((areThereAnyDamnBosses || BossRushEvent.BossRushActive) && !wofAndNotHell)
|
||||
if (areThereAnyDamnBosses && !wofAndNotHell)
|
||||
adrenalineDiff += adrenalineMax / AdrenalineChargeTime;
|
||||
|
||||
// If you aren't actively in a boss fight, adrenaline rapidly fades away.
|
||||
else
|
||||
// If Boss Rush is active, adrenaline is paused between boss fights and during the Exo Mechs "Make your choice".
|
||||
else if (!BossRushEvent.BossRushActive)
|
||||
adrenalineDiff = -adrenalineMax / AdrenalineFadeTime;
|
||||
}
|
||||
|
||||
|
||||
@@ -1493,7 +1493,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (corrosiveSpine)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 240);
|
||||
target.AddBuff(BuffID.Poisoned, 240);
|
||||
}
|
||||
}
|
||||
if (summon)
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace CalamityMod.Events
|
||||
int thePefectOne = NPC.NewNPC(Source, (int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1);
|
||||
Main.npc[thePefectOne].timeLeft *= 20;
|
||||
CalamityUtils.BossAwakenMessage(thePefectOne);
|
||||
}, specialSpawnCountdown: 300, permittedNPCs: ModContent.NPCType<CrabShroom>()),
|
||||
}, permittedNPCs: ModContent.NPCType<CrabShroom>()),
|
||||
|
||||
new Boss(NPCID.EaterofWorldsHead, permittedNPCs: new int[] { NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.VileSpit }),
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace CalamityMod.Events
|
||||
NPC.SpawnWOF(player.position);
|
||||
}, permittedNPCs: new int[] { NPCID.WallofFleshEye, NPCID.LeechHead, NPCID.LeechBody, NPCID.LeechTail, NPCID.TheHungry, NPCID.TheHungryII }),
|
||||
|
||||
new Boss(NPCID.QueenSlimeBoss, permittedNPCs: new int[] { NPCID.QueenSlimeMinionBlue, NPCID.QueenSlimeMinionPink, NPCID.QueenSlimeMinionPurple }),
|
||||
new Boss(NPCID.QueenSlimeBoss, specialSpawnCountdown: 120, permittedNPCs: new int[] { NPCID.QueenSlimeMinionBlue, NPCID.QueenSlimeMinionPink, NPCID.QueenSlimeMinionPurple }),
|
||||
|
||||
new Boss(ModContent.NPCType<Cryogen>(), permittedNPCs: ModContent.NPCType<CryogenShield>()),
|
||||
|
||||
@@ -207,18 +207,18 @@ namespace CalamityMod.Events
|
||||
|
||||
new Boss(ModContent.NPCType<AquaticScourgeHead>(), permittedNPCs: new int[] { ModContent.NPCType<AquaticScourgeBody>(), ModContent.NPCType<AquaticScourgeBodyAlt>(), ModContent.NPCType<AquaticScourgeTail>() }),
|
||||
|
||||
new Boss(NPCID.TheDestroyer, TimeChangeContext.Night, specialSpawnCountdown: 300, permittedNPCs: new int[] { NPCID.TheDestroyerBody, NPCID.TheDestroyerTail, NPCID.Probe }),
|
||||
new Boss(NPCID.TheDestroyer, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.TheDestroyerBody, NPCID.TheDestroyerTail, NPCID.Probe }),
|
||||
|
||||
new Boss(ModContent.NPCType<BrimstoneElemental>(), permittedNPCs: ModContent.NPCType<Brimling>()),
|
||||
|
||||
new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }),
|
||||
|
||||
new Boss(ModContent.NPCType<CalamitasClone>(), TimeChangeContext.Night, specialSpawnCountdown: 300, dimnessFactor: 0.6f, permittedNPCs: new int[] { ModContent.NPCType<Cataclysm>(), ModContent.NPCType<Catastrophe>(),
|
||||
new Boss(ModContent.NPCType<CalamitasClone>(), TimeChangeContext.Night, dimnessFactor: 0.6f, permittedNPCs: new int[] { ModContent.NPCType<Cataclysm>(), ModContent.NPCType<Catastrophe>(),
|
||||
ModContent.NPCType<SoulSeeker>() }),
|
||||
|
||||
new Boss(NPCID.Plantera, permittedNPCs: new int[] { NPCID.PlanterasTentacle, NPCID.PlanterasHook, NPCID.Spore }),
|
||||
|
||||
new Boss(ModContent.NPCType<Anahita>(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType<Leviathan>(), ModContent.NPCType<AquaticAberration>(),
|
||||
new Boss(ModContent.NPCType<Anahita>(), TimeChangeContext.Day, specialSpawnCountdown: 120, permittedNPCs: new int[] { ModContent.NPCType<Leviathan>(), ModContent.NPCType<AquaticAberration>(),
|
||||
ModContent.NPCType<AnahitasIceShield>(), NPCID.DetonatingBubble}),
|
||||
|
||||
new Boss(ModContent.NPCType<AstrumAureus>(), TimeChangeContext.Night, permittedNPCs: ModContent.NPCType<AureusSpawn>()),
|
||||
@@ -253,7 +253,7 @@ namespace CalamityMod.Events
|
||||
Player player = Main.player[ClosestPlayerToWorldCenter];
|
||||
|
||||
SoundEngine.PlaySound(SoundID.ScaryScream, player.position);
|
||||
int ravager = NPC.NewNPC(Source, (int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 400f), type, 1);
|
||||
int ravager = NPC.NewNPC(Source, (int)(player.position.X + Main.rand.Next(-100, 101)), (int)(player.position.Y - 600f), type, 1);
|
||||
Main.npc[ravager].timeLeft *= 20;
|
||||
CalamityUtils.BossAwakenMessage(ravager);
|
||||
}, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType<FlamePillar>(), ModContent.NPCType<RockPillar>(), ModContent.NPCType<RavagerLegLeft>(), ModContent.NPCType<RavagerLegRight>(),
|
||||
@@ -574,8 +574,8 @@ namespace CalamityMod.Events
|
||||
// Cooldown before next boss spawns.
|
||||
BossRushSpawnCountdown = 60;
|
||||
|
||||
// Increase cooldown post-Fishron.
|
||||
if (BossRushStage >= Bosses.FindIndex(boss => boss.EntityID == NPCID.DukeFishron))
|
||||
// Increase cooldown post-Moon Lord.
|
||||
if (BossRushStage >= Bosses.FindIndex(boss => boss.EntityID == NPCID.MoonLordCore))
|
||||
BossRushSpawnCountdown += 300;
|
||||
|
||||
// Override the spawn countdown if specified.
|
||||
|
||||
@@ -551,5 +551,26 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldc_R4, BalancingConstants.SharpeningStationArmorPenetration);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Remove Lunatic Cultist Homing Resist
|
||||
private static void RemoveLunaticCultistHomingResist(ILContext il)
|
||||
{
|
||||
// Change Lunatic Cultist's resist from 25% to 0% (effectively removing it).
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(typeof(ProjectileID.Sets), "CultistIsResistantTo")))
|
||||
{
|
||||
LogFailure("Lunatic Cultist Homing Resist Removal", "Could not locate the Cultist resist set.");
|
||||
return;
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(0.75f))) // The resist ratio.
|
||||
{
|
||||
LogFailure("Lunatic Cultist Homing Resist Removal", "Could not locate the resist percentage.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Replace the value with 1, meaning -0% damage or no resist.
|
||||
cursor.Next.Operand = 1f;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -31,49 +31,61 @@ namespace CalamityMod.ILEditing
|
||||
// Re-initialize the projectile cache list.
|
||||
OrderedProjectiles = new List<OrderedProjectileEntry>();
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision += AllowTriggeredFallthrough;
|
||||
On.Terraria.NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush;
|
||||
// Graphics
|
||||
IL.Terraria.Main.DoDraw += AdditiveDrawing;
|
||||
On.Terraria.Main.DrawGore += DrawForegroundStuff;
|
||||
On.Terraria.Main.DrawCursor += UseCoolFireCursorEffect;
|
||||
On.Terraria.Main.SetDisplayMode += ResetRenderTargetSizes;
|
||||
On.Terraria.Main.SortDrawCacheWorms += DrawFusableParticles;
|
||||
On.Terraria.Main.DrawInfernoRings += DrawForegroundParticles;
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon += MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid += DrawCustomLava;
|
||||
IL.Terraria.WaterfallManager.DrawWaterfall += DrawCustomLavafalls;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw += ChangeWaterQuadColors;
|
||||
IL.Terraria.Main.oldDrawWater += DrawCustomLava3;
|
||||
On.Terraria.Graphics.Light.TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.PreDrawTiles += ClearForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.Draw += ClearTilePings;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
|
||||
|
||||
// NPC behavior
|
||||
IL.Terraria.Main.UpdateTime += PermitNighttimeTownNPCSpawning;
|
||||
On.Terraria.Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
|
||||
On.Terraria.NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush;
|
||||
IL.Terraria.Player.CollectTaxes += MakeTaxCollectorUseful;
|
||||
IL.Terraria.Projectile.Damage += RemoveLunaticCultistHomingResist;
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision += AllowTriggeredFallthrough;
|
||||
IL.Terraria.Player.Hurt += RemoveRNGFromDodges;
|
||||
IL.Terraria.Player.DashMovement += FixAllDashMechanics;
|
||||
IL.Terraria.Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
|
||||
IL.Terraria.Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
|
||||
On.Terraria.WorldGen.OpenDoor += OpenDoor_LabDoorOverride;
|
||||
On.Terraria.WorldGen.CloseDoor += CloseDoor_LabDoorOverride;
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon += MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.Item.AffixName += IncorporateEnchantmentInAffix;
|
||||
On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float += IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Main.DrawCursor += UseCoolFireCursorEffect;
|
||||
IL.Terraria.Player.QuickHeal += ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.QuickMana += ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.ItemCheck_Inner += ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Main.DoDraw += AdditiveDrawing;
|
||||
On.Terraria.Main.SortDrawCacheWorms += DrawFusableParticles;
|
||||
On.Terraria.Main.DrawInfernoRings += DrawForegroundParticles;
|
||||
On.Terraria.Main.SetDisplayMode += ResetRenderTargetSizes;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid += DrawCustomLava;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw += ChangeWaterQuadColors;
|
||||
IL.Terraria.Main.oldDrawWater += DrawCustomLava3;
|
||||
IL.Terraria.Player.CollectTaxes += MakeTaxCollectorUseful;
|
||||
On.Terraria.Graphics.Light.TileLightScanner.GetTileLight += MakeSulphSeaWaterBetter;
|
||||
On.Terraria.Main.DrawGore += DrawForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.PreDrawTiles += ClearForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.Draw += ClearTilePings;
|
||||
On.Terraria.Player.GrappleMovement += CustomGrappleMovementCheck;
|
||||
On.Terraria.Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement;
|
||||
On.Terraria.Player.PlayerFrame += CustomGrapplePostFrame;
|
||||
On.Terraria.Player.SlopeDownMovement += CustomGrapplePreStepUp;
|
||||
IL.Terraria.WaterfallManager.DrawWaterfall += DrawCustomLavafalls;
|
||||
// TODO -- This should be unnecessary. There is now a TML hook for platform collision for ModNPCs.
|
||||
On.Terraria.NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
|
||||
IL.Terraria.Wiring.HitWireSingle += AddTwinklersToStatue;
|
||||
|
||||
// Mana Burn
|
||||
IL.Terraria.Player.QuickHeal += ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.QuickMana += ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.ItemCheck_Inner += ConditionallyReplaceManaSickness;
|
||||
|
||||
// Custom grappling
|
||||
On.Terraria.Player.GrappleMovement += CustomGrappleMovementCheck;
|
||||
On.Terraria.Player.UpdatePettingAnimal += CustomGrapplePreDefaultMovement;
|
||||
On.Terraria.Player.PlayerFrame += CustomGrapplePostFrame;
|
||||
On.Terraria.Player.SlopeDownMovement += CustomGrapplePreStepUp;
|
||||
|
||||
// Damage and health balance
|
||||
IL.Terraria.Main.DamageVar += AdjustDamageVariance;
|
||||
IL.Terraria.Projectile.Damage += MakeTagDamageMultiplicative;
|
||||
IL.Terraria.NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.Projectile.AI_001 += AdjustChlorophyteBullets;
|
||||
IL.Terraria.Player.UpdateBuffs += NerfSharpeningStation;
|
||||
|
||||
// Movement speed balance
|
||||
IL.Terraria.Player.UpdateJumpHeight += FixJumpHeightBoosts;
|
||||
@@ -84,9 +96,6 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.Update += NerfSoaringInsigniaRunAcceleration;
|
||||
IL.Terraria.Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
|
||||
|
||||
// Damage balance
|
||||
IL.Terraria.Player.UpdateBuffs += NerfSharpeningStation;
|
||||
|
||||
// Life regen balance
|
||||
IL.Terraria.Player.UpdateLifeRegen += PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen;
|
||||
|
||||
@@ -118,18 +127,15 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Main.UpdateWindyDayState += MakeWindyDayMusicPlayLessOften;
|
||||
IL.Terraria.Main.UpdateTime_StartNight += BloodMoonsRequire200MaxLife;
|
||||
IL.Terraria.WorldGen.AttemptFossilShattering += PreventFossilShattering;
|
||||
IL.Terraria.Projectile.Damage += MakeTagDamageMultiplicative;
|
||||
On.Terraria.Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL.Terraria.NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
On.Terraria.Item.Prefix += LetRogueItemsBeReforgeable;
|
||||
// Should not be necessary in 1.4
|
||||
// IL.Terraria.Main.DoUpdate += FixProjectileUpdatePriorityProblems;
|
||||
|
||||
|
||||
//Additional detours that are in their own item files given they are only relevant to these specific items:
|
||||
|
||||
//Rover drive detours on Player.DrawInfernoRings to draw its shield
|
||||
//Wulfrum armor hooks on Player.KeyDoubleTap and DrawPendingMouseText to activate its set bonus and spoof the mouse text to display the stats of the activated weapon if shift is held
|
||||
//HeldOnlyItem detours Player.dropItemCheck, ItemSlot.Draw (Sb, itemarray, int, int, vector2, color) and ItemSlot.LeftClick_ItemArray to make its stuff work
|
||||
@@ -143,39 +149,47 @@ namespace CalamityMod.ILEditing
|
||||
VanillaSpawnTownNPCs = null;
|
||||
labDoorOpen = labDoorClosed = aLabDoorOpen = aLabDoorClosed = exoDoorClosed = exoDoorOpen = -1;
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision -= AllowTriggeredFallthrough;
|
||||
On.Terraria.NPC.ShouldEmpressBeEnraged -= AllowEmpressToEnrageInBossRush;
|
||||
// Graphics
|
||||
IL.Terraria.Main.DoDraw -= AdditiveDrawing;
|
||||
On.Terraria.Main.DrawGore -= DrawForegroundStuff;
|
||||
On.Terraria.Main.DrawCursor -= UseCoolFireCursorEffect;
|
||||
On.Terraria.Main.SetDisplayMode -= ResetRenderTargetSizes;
|
||||
On.Terraria.Main.SortDrawCacheWorms -= DrawFusableParticles;
|
||||
On.Terraria.Main.DrawInfernoRings -= DrawForegroundParticles;
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon -= MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid -= DrawCustomLava;
|
||||
IL.Terraria.WaterfallManager.DrawWaterfall -= DrawCustomLavafalls;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw -= ChangeWaterQuadColors;
|
||||
IL.Terraria.Main.oldDrawWater -= DrawCustomLava3;
|
||||
On.Terraria.Graphics.Light.TileLightScanner.GetTileLight -= MakeSulphSeaWaterBetter;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.PreDrawTiles -= ClearForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.Draw -= ClearTilePings;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC -= ColorBlightedGel;
|
||||
|
||||
// NPC behavior
|
||||
IL.Terraria.Main.UpdateTime -= PermitNighttimeTownNPCSpawning;
|
||||
On.Terraria.Main.UpdateTime_SpawnTownNPCs -= AlterTownNPCSpawnRate;
|
||||
On.Terraria.NPC.ShouldEmpressBeEnraged -= AllowEmpressToEnrageInBossRush;
|
||||
IL.Terraria.Player.CollectTaxes -= MakeTaxCollectorUseful;
|
||||
IL.Terraria.Projectile.Damage -= RemoveLunaticCultistHomingResist;
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision -= AllowTriggeredFallthrough;
|
||||
IL.Terraria.Player.Hurt -= RemoveRNGFromDodges;
|
||||
IL.Terraria.Player.DashMovement -= FixAllDashMechanics;
|
||||
IL.Terraria.Player.GiveImmuneTimeForCollisionAttack -= MakeShieldSlamIFramesConsistent;
|
||||
IL.Terraria.Player.Update_NPCCollision -= NerfShieldOfCthulhuBonkSafety;
|
||||
On.Terraria.WorldGen.OpenDoor -= OpenDoor_LabDoorOverride;
|
||||
On.Terraria.WorldGen.CloseDoor -= CloseDoor_LabDoorOverride;
|
||||
IL.Terraria.Main.DrawInterface_40_InteractItemIcon -= MakeMouseHoverItemsSupportAnimations;
|
||||
On.Terraria.Item.AffixName -= IncorporateEnchantmentInAffix;
|
||||
On.Terraria.Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float -= IncorporateMinionExplodingCountdown;
|
||||
On.Terraria.Main.DrawCursor -= UseCoolFireCursorEffect;
|
||||
|
||||
// Mana Burn
|
||||
IL.Terraria.Player.QuickHeal -= ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.QuickMana -= ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Player.ItemCheck_Inner -= ConditionallyReplaceManaSickness;
|
||||
IL.Terraria.Main.DoDraw -= AdditiveDrawing;
|
||||
On.Terraria.Main.SortDrawCacheWorms -= DrawFusableParticles;
|
||||
On.Terraria.Main.DrawInfernoRings -= DrawForegroundParticles;
|
||||
On.Terraria.Main.SetDisplayMode -= ResetRenderTargetSizes;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid -= DrawCustomLava;
|
||||
IL.Terraria.GameContent.Liquid.LiquidRenderer.InternalDraw -= ChangeWaterQuadColors;
|
||||
IL.Terraria.Main.oldDrawWater -= DrawCustomLava3;
|
||||
IL.Terraria.Player.CollectTaxes -= MakeTaxCollectorUseful;
|
||||
On.Terraria.Graphics.Light.TileLightScanner.GetTileLight -= MakeSulphSeaWaterBetter;
|
||||
// IL.Terraria.WaterfallManager.DrawWaterfall -= DrawCustomLavafalls;
|
||||
On.Terraria.NPC.Collision_DecideFallThroughPlatforms -= EnableCalamityBossPlatformCollision;
|
||||
IL.Terraria.Wiring.HitWireSingle -= AddTwinklersToStatue;
|
||||
On.Terraria.Main.DrawGore -= DrawForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.PreDrawTiles -= ClearForegroundStuff;
|
||||
On.Terraria.GameContent.Drawing.TileDrawing.Draw -= ClearTilePings;
|
||||
|
||||
// Custom grappling
|
||||
On.Terraria.Player.GrappleMovement -= CustomGrappleMovementCheck;
|
||||
On.Terraria.Player.UpdatePettingAnimal -= CustomGrapplePreDefaultMovement;
|
||||
On.Terraria.Player.PlayerFrame -= CustomGrapplePostFrame;
|
||||
@@ -183,8 +197,10 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Damage and health balance
|
||||
IL.Terraria.Main.DamageVar -= AdjustDamageVariance;
|
||||
IL.Terraria.Projectile.Damage -= MakeTagDamageMultiplicative;
|
||||
IL.Terraria.NPC.ScaleStats_ApplyExpertTweaks -= RemoveExpertHardmodeScaling;
|
||||
IL.Terraria.Projectile.AI_001 -= AdjustChlorophyteBullets;
|
||||
IL.Terraria.Player.UpdateBuffs -= NerfSharpeningStation;
|
||||
|
||||
// Movement speed balance
|
||||
IL.Terraria.Player.UpdateJumpHeight -= FixJumpHeightBoosts;
|
||||
@@ -195,9 +211,6 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.Update -= NerfSoaringInsigniaRunAcceleration;
|
||||
IL.Terraria.Player.WingMovement -= RemoveSoaringInsigniaInfiniteWingTime;
|
||||
|
||||
// Damage balance
|
||||
IL.Terraria.Player.UpdateBuffs -= NerfSharpeningStation;
|
||||
|
||||
// Life regen balance
|
||||
IL.Terraria.Player.UpdateLifeRegen -= PreventWellFedFromBeingRequiredInExpertModeForFullLifeRegen;
|
||||
|
||||
@@ -222,15 +235,13 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Item.Prefix -= RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns -= PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC -= MakeVoodooDemonDollWork;
|
||||
//IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes;
|
||||
// IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes;
|
||||
IL.Terraria.Player.IsTileTypeInInteractionRange -= IncreasePylonInteractionRange;
|
||||
IL.Terraria.Projectile.CanExplodeTile -= MakeMeteoriteExplodable;
|
||||
IL.Terraria.Main.UpdateWindyDayState -= MakeWindyDayMusicPlayLessOften;
|
||||
IL.Terraria.Main.UpdateTime_StartNight -= BloodMoonsRequire200MaxLife;
|
||||
IL.Terraria.WorldGen.AttemptFossilShattering -= PreventFossilShattering;
|
||||
IL.Terraria.Projectile.Damage -= MakeTagDamageMultiplicative;
|
||||
On.Terraria.Player.GetPickaxeDamage -= RemoveHellforgePickaxeRequirement;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC -= ColorBlightedGel;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL.Terraria.NPC.NPCLoot -= FixSplittingWormBannerDrops;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Corrosive Spine");
|
||||
Tooltip.SetDefault("5% increased movement speed\n" +
|
||||
"All rogue weapons inflict venom and spawn clouds on enemy hits\n" +
|
||||
"All rogue weapons inflict poisoned and spawn clouds on enemy hits\n" +
|
||||
"You release a ton of clouds everywhere on hit");
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 18;
|
||||
Item.useTime = 18;
|
||||
Item.width = 44;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee.Shortswords;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 10;
|
||||
Item.useTime = 10;
|
||||
Item.width = 44;
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace CalamityMod.Localization
|
||||
new [] { "DraedonExoPhase6Text3", "I shall show you the full fury of my final machine." },
|
||||
new [] { "DraedonAresEnrageText", "How foolish. You cannot escape." },
|
||||
new [] { "DraedonResummonText", "Make your choice." },
|
||||
new [] { "DraedonBossRushText", "Make your choice. You have 20 seconds." },
|
||||
new [] { "DraedonEndText1", "An unknown factor-a catalyst is what you are." },
|
||||
new [] { "DraedonEndText2", "Nearly as alien as I, to this land and its history." },
|
||||
new [] { "DraedonEndText3", "...Excuse my introspection. I must gather my thoughts after that display." },
|
||||
|
||||
+2
-2
@@ -4560,7 +4560,7 @@ namespace CalamityMod.NPCs
|
||||
bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) ||
|
||||
(phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f);
|
||||
|
||||
calamityGlobalNPC.DR = (phaseSwitchPhase || npc.ai[0] == 5f || (enrageScale == 3f && !bossRush)) ? 0.55f : 0.1f;
|
||||
calamityGlobalNPC.DR = (phaseSwitchPhase || npc.ai[0] == 5f || (enrageScale == 3f && !bossRush)) ? (bossRush ? 0.99f : 0.55f) : 0.1f;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phaseSwitchPhase || npc.ai[0] == 5f || (enrageScale == 3f && !bossRush);
|
||||
|
||||
if (phaseSwitchPhase)
|
||||
@@ -5575,7 +5575,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
// Increased DR while transitioning phases and not exhausted
|
||||
if (!exhausted)
|
||||
calamityGlobalNPC.DR = (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f) ? 0.75f : 0.5f;
|
||||
calamityGlobalNPC.DR = (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f) ? (bossRush ? 0.99f : 0.75f) : 0.5f;
|
||||
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
|
||||
NPC.lifeMax = 15;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.lifeMax = 15000;
|
||||
NPC.lifeMax = 8000;
|
||||
if (Main.getGoodWorld)
|
||||
NPC.lifeMax *= 2;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
NPC.width = 196;
|
||||
NPC.height = 196;
|
||||
NPC.defense = 8;
|
||||
NPC.LifeMaxNERB(3350, 4000, 1100000);
|
||||
NPC.LifeMaxNERB(3350, 4000, 680000);
|
||||
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
|
||||
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
|
||||
NPC.aiStyle = -1;
|
||||
|
||||
@@ -1198,7 +1198,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
// Spawn Permafrost if he isn't in the world
|
||||
int permafrostNPC = NPC.FindFirstNPC(ModContent.NPCType<DILF>());
|
||||
if (permafrostNPC == -1)
|
||||
if (permafrostNPC == -1 && !BossRushEvent.BossRushActive)
|
||||
NPC.NewNPC(NPC.GetSource_Death(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType<DILF>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
|
||||
// If Cryogen has not been killed, notify players about Cryonic Ore
|
||||
|
||||
@@ -271,7 +271,9 @@ namespace CalamityMod.NPCs.ExoMechs
|
||||
// Inform the player who summoned draedon they may choose the first mech and cause a selection UI to appear over their head.
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && TalkTimer == TalkDelay + DelayPerDialogLine * 4f)
|
||||
{
|
||||
if ((CalamityWorld.TalkedToDraedon || bossRush))
|
||||
if (bossRush)
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonBossRushText", TextColorEdgy);
|
||||
else if (CalamityWorld.TalkedToDraedon)
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonResummonText", TextColorEdgy);
|
||||
else
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.DraedonIntroductionText5", TextColorEdgy);
|
||||
@@ -295,7 +297,7 @@ namespace CalamityMod.NPCs.ExoMechs
|
||||
{
|
||||
// Summon a random exo mech if you wait too long
|
||||
BossRushCounter++;
|
||||
if (BossRushCounter > 600 && CalamityWorld.DraedonMechToSummon == ExoMech.None)
|
||||
if (BossRushCounter > 1200 && CalamityWorld.DraedonMechToSummon == ExoMech.None)
|
||||
{
|
||||
CalamityWorld.DraedonMechToSummon = (ExoMech)Main.rand.Next(1,4);
|
||||
|
||||
|
||||
@@ -760,8 +760,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
lightning -= lightningDecay;
|
||||
}
|
||||
|
||||
// Start a storm when in third phase
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient || (Main.netMode == NetmodeID.SinglePlayer && Main.gameMenu) || calamityGlobalNPC.newAI[1] > 0f)
|
||||
// Start a storm when in third phase. Don't do this during Boss Rush
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient || (Main.netMode == NetmodeID.SinglePlayer && Main.gameMenu) || calamityGlobalNPC.newAI[1] > 0f || bossRush)
|
||||
return;
|
||||
|
||||
CalamityUtils.StartRain(true, true);
|
||||
|
||||
@@ -2564,7 +2564,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Main.player[NPC.target].Calamity().sCalKillCount++;
|
||||
|
||||
// Spawn the SCal NPC directly where the boss was
|
||||
NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, ModContent.NPCType<WITCH>());
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 12, ModContent.NPCType<WITCH>());
|
||||
|
||||
// Mark Supreme Calamitas as defeated
|
||||
DownedBossSystem.downedSCal = true;
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
npc.dontTakeDamage = false;
|
||||
|
||||
// Increased DR during phase transitions
|
||||
calamityGlobalNPC.DR = (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f) ? 0.625f : 0.15f;
|
||||
calamityGlobalNPC.DR = (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f) ? (bossRush ? 0.99f : 0.625f) : 0.15f;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f;
|
||||
|
||||
// Enrage
|
||||
|
||||
@@ -604,7 +604,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
npc.damage = 0;
|
||||
|
||||
// Increase durability.
|
||||
calamityGlobalNPC.DR = shouldBeInPhase2ButIsStillInPhase1 ? 0.99f : 0.575f;
|
||||
calamityGlobalNPC.DR = shouldBeInPhase2ButIsStillInPhase1 ? 0.99f : (bossRush ? 0.99f : 0.575f);
|
||||
|
||||
int totalSunDances = phase2 ? 2 : 3;
|
||||
float sunDanceGateValue = dayTimeEnrage ? 35f : death ? 40f : 50f;
|
||||
|
||||
@@ -384,17 +384,17 @@ namespace CalamityMod.NPCs.Yharon
|
||||
{
|
||||
if (phase3Change)
|
||||
{
|
||||
calamityGlobalNPC.DR = phase4Check ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase4Check ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase4Check;
|
||||
}
|
||||
else if (phase2Change)
|
||||
{
|
||||
calamityGlobalNPC.DR = phase3Check ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase3Check ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase3Check;
|
||||
}
|
||||
else if (phase1Change)
|
||||
{
|
||||
calamityGlobalNPC.DR = phase2Check ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase2Check ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase2Check;
|
||||
}
|
||||
}
|
||||
@@ -1620,22 +1620,22 @@ namespace CalamityMod.NPCs.Yharon
|
||||
switch (secondPhasePhase)
|
||||
{
|
||||
case 1:
|
||||
calamityGlobalNPC.DR = phase2 ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase2 ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase2;
|
||||
break;
|
||||
case 2:
|
||||
calamityGlobalNPC.DR = phase3 ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase3 ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase3;
|
||||
break;
|
||||
case 3:
|
||||
calamityGlobalNPC.DR = phase4 ? 0.7f : normalDR;
|
||||
calamityGlobalNPC.DR = phase4 ? (bossRush ? 0.99f : 0.7f) : normalDR;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phase4;
|
||||
break;
|
||||
}
|
||||
|
||||
if (NPC.ai[0] == 9f)
|
||||
{
|
||||
calamityGlobalNPC.DR = 0.7f;
|
||||
calamityGlobalNPC.DR = bossRush ? 0.99f : 0.7f;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,6 +221,10 @@ namespace CalamityMod.Particles.Metaballs
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
return null;
|
||||
|
||||
// Reload particle sets if they are completely unloaded for some reason.
|
||||
if (ParticleSets.Count <= 0)
|
||||
LoadParticleRenderSets(true);
|
||||
|
||||
return ParticleSets.First(s => s.ParticleSet.GetType() == typeof(T)).ParticleSet as T;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,8 +149,8 @@ namespace CalamityMod.Projectiles
|
||||
#region SetDefaults
|
||||
public override void SetDefaults(Projectile projectile)
|
||||
{
|
||||
// Disable Lunatic Cultist's homing resistance globally
|
||||
ProjectileID.Sets.CultistIsResistantTo[projectile.type] = false;
|
||||
// OLD 1.3 CODE: Disable Lunatic Cultist's homing resistance globally
|
||||
// ProjectileID.Sets.CultistIsResistantTo[projectile.type] = false;
|
||||
|
||||
// Apply Calamity Global Projectile Tweaks.
|
||||
SetDefaults_ApplyTweaks(projectile);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class DormantBrimseekerBab : ModProjectile
|
||||
{
|
||||
public const float DistanceToCheck = 1600f;
|
||||
public const int TurnTime = 7;
|
||||
public const int TurnTime = 12;
|
||||
public bool SeekingTarget = false;
|
||||
public float MaxChargeTime
|
||||
{
|
||||
@@ -113,9 +113,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.DD2_DrakinShot, Projectile.Center);
|
||||
Projectile.ai[0]++;
|
||||
float acceleration = (Projectile.localAI[1] == 1f) ? 1.85f : 1.1f;
|
||||
float minSpeed = (Projectile.localAI[1] == 1f) ? 21.5f : 15f;
|
||||
float maxSpeed = (Projectile.localAI[1] == 1f) ? 32f : 24f;
|
||||
float acceleration = (Projectile.localAI[1] == 1f) ? 1.5f : 1.1f;
|
||||
float minSpeed = (Projectile.localAI[1] == 1f) ? 17.5f : 15f;
|
||||
float maxSpeed = (Projectile.localAI[1] == 1f) ? 28f : 24f;
|
||||
Projectile.velocity = Projectile.SafeDirectionTo(potentialTarget.Center) * MathHelper.Clamp(Projectile.velocity.Length() + acceleration, minSpeed, maxSpeed);
|
||||
Projectile.rotation = Projectile.AngleTo(potentialTarget.Center) + (Projectile.spriteDirection == 1).ToInt() * MathHelper.Pi;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace CalamityMod.Systems
|
||||
if (y2 < 10)
|
||||
y2 = 10;
|
||||
|
||||
if (Main.tile[x, y] != null)
|
||||
if (WorldGen.InWorld(x, y, 1) && Main.tile[x, y] != null)
|
||||
{
|
||||
if (Main.tile[x, y].HasUnactuatedTile)
|
||||
{
|
||||
@@ -161,7 +161,7 @@ namespace CalamityMod.Systems
|
||||
if (Main.tile[x, y2].LiquidAmount == 0)
|
||||
{
|
||||
// Plantera Bulbs pre-mech
|
||||
if (WorldGen.genRand.Next(1500) == 0)
|
||||
if (WorldGen.genRand.NextBool(1500))
|
||||
{
|
||||
if (Main.hardMode && (!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3))
|
||||
{
|
||||
@@ -195,7 +195,7 @@ namespace CalamityMod.Systems
|
||||
|
||||
// Life Fruit pre-mech
|
||||
int random = Main.expertMode ? 90 : 120;
|
||||
if (WorldGen.genRand.Next(random) == 0)
|
||||
if (WorldGen.genRand.NextBool(random))
|
||||
{
|
||||
if (Main.hardMode && !NPC.downedMechBossAny)
|
||||
{
|
||||
@@ -315,7 +315,6 @@ namespace CalamityMod.Systems
|
||||
}
|
||||
l++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static bool CanPlaceBasedOnProximity(int x, int y, int tileType)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.UI.SulphurousWaterMeter
|
||||
{
|
||||
// These values were decided relative to the stealth meter positions, and are by default slightly below them.
|
||||
internal const float DefaultPosX = StealthUI.DefaultStealthPosX;
|
||||
internal const float DefaultPosY = StealthUI.DefaultStealthPosY + 0.0377f;
|
||||
internal const float DefaultPosY = StealthUI.DefaultStealthPosY + 2.286282f;
|
||||
private const float MouseDragEpsilon = 0.05f; // 0.05%
|
||||
|
||||
private static Vector2? dragOffset = null;
|
||||
|
||||
Reference in new issue
Block a user