Soaring Insignia IL changes work.
This commit is contained in:
1 parent
d8254d565f
commit
486639db69
2 files changed
+18
-15
No files matched your search
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
@@ -14,40 +13,43 @@ namespace CalamityMod.ILEditing
|
||||
{
|
||||
// Prevent the infinite flight effect.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Soaring Insignia Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
LogFailure("Soaring Insignia Infinite Flight Removal", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
|
||||
// AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite flight never triggers.
|
||||
cursor.Emit(OpCodes.Ldc_I4_0);
|
||||
cursor.Emit(OpCodes.And);
|
||||
}
|
||||
|
||||
private static void NerfSoaringInsigniaRunAcceleration(ILContext il)
|
||||
{
|
||||
// Nerf the run acceleration boost from 2x to 1.1x.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Soaring Insignia Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(2f)))
|
||||
{
|
||||
LogFailure("Soaring Insignia Nerf", "Could not locate the Soaring Insignia run acceleration multiplier.");
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia run acceleration multiplier.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_R4, 1.1f);
|
||||
cursor.Next.Operand = 1.1f;
|
||||
|
||||
// Prevent the rocket boots infinite flight effect.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Soaring Insignia Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
cursor.Remove();
|
||||
|
||||
// AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite rocket boots never triggers.
|
||||
cursor.Emit(OpCodes.Ldc_I4_0);
|
||||
cursor.Emit(OpCodes.And);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -66,14 +66,14 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Projectile.AI_001 += AdjustChlorophyteBullets;
|
||||
|
||||
// Movement speed balance
|
||||
//IL.Terraria.Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
|
||||
IL.Terraria.Player.UpdateJumpHeight += FixJumpHeightBoosts;
|
||||
//IL.Terraria.Player.Update += NerfSoaringInsigniaRunAcceleration;
|
||||
IL.Terraria.Player.Update += NerfMagiluminescence;
|
||||
IL.Terraria.Player.Update += JumpSpeedAdjustment;
|
||||
IL.Terraria.Player.Update += MaxRunSpeedAdjustment;
|
||||
IL.Terraria.Player.Update += RunSpeedAdjustments;
|
||||
IL.Terraria.Player.Update += ReduceWingHoverVelocities;
|
||||
IL.Terraria.Player.Update += NerfMagiluminescence;
|
||||
IL.Terraria.Player.Update += NerfSoaringInsigniaRunAcceleration;
|
||||
IL.Terraria.Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
|
||||
|
||||
// Mana regen balance
|
||||
IL.Terraria.Player.Update += ManaRegenDelayAdjustment;
|
||||
@@ -92,6 +92,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Item.Prefix += RelaxPrefixRequirements;
|
||||
On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
|
||||
IL.Terraria.NPC.SpawnNPC += MakeVoodooDemonDollWork;
|
||||
// TODO -- Beat Lava Slimes once and for all
|
||||
//IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes;
|
||||
IL.Terraria.Main.UpdateTime += BloodMoonsRequire200MaxLife;
|
||||
|
||||
|
||||
Reference in new issue
Block a user