using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnboundLib.GameModes;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace ScalingEdgeDamage
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Systems.R00t.Patch.ScalingEdgeDamage", "Scaling Edge Damage", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Patch : BaseUnityPlugin
{
private const string ModId = "Systems.R00t.Patch.ScalingEdgeDamage";
private const string ModName = "Scaling Edge Damage";
public const string Version = "1.0.0";
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("Systems.R00t.Patch.ScalingEdgeDamage").PatchAll();
GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)resetAll);
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator resetAll(IGameModeHandler _)
{
PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
{
player.data.GetData().reset();
});
yield break;
}
}
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class EdgeDamagePatch : Object
{
private static void Postfix(CharacterData ___data)
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
___data.GetData().hitCount *= 1.2f;
if (___data.GetData().hitCount >= 1f)
{
((Damagable)___data.healthHandler).TakeDamage(Vector2.up * 50f * ___data.GetData().hitCount, Vector2.down, (GameObject)null, (Player)null, true, false);
}
}
}
[Serializable]
public class ExtraData : Object
{
public float hitCount = 0.5f;
public ExtraData()
{
reset();
}
public void reset()
{
hitCount = 0.6f;
}
}
public static class CharacterDataExtension : Object
{
public static readonly ConditionalWeakTable<CharacterData, ExtraData> data = new ConditionalWeakTable<CharacterData, ExtraData>();
public static ExtraData GetData(this CharacterData characterstats)
{
return data.GetOrCreateValue(characterstats);
}
public static void AddData(this CharacterData characterstats, ExtraData value)
{
try
{
data.Add(characterstats, value);
}
catch (Exception)
{
}
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class CharacterStatModifiersPatchResetStats : Object
{
private static void Prefix(CharacterData ___data)
{
___data.GetData().reset();
}
}
}