using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates;
using EntityStates.FalseSon;
using Microsoft.CodeAnalysis;
using On.EntityStates.FalseSon;
using PaladinMod;
using R2API;
using RoR2;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("RuinedPaladin")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RuinedPaladin")]
[assembly: AssemblyTitle("RuinedPaladin")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace RuinedPaladin
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("acanthi.RuinedPaladin", "RuinedPaladin", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class RuinedPaladin : BaseUnityPlugin
{
public const string PluginGUID = "acanthi.RuinedPaladin";
public const string PluginAuthor = "acanthi";
public const string PluginName = "RuinedPaladin";
public const string PluginVersion = "1.0.0";
public void Start()
{
AddFalseSonSecondary();
}
public void Awake()
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
AddTokens();
LunarSpikes.OnEnter += new hook_OnEnter(OnEntityStatesFalseSonLunarSpikesOnEnter);
}
private void OnEntityStatesFalseSonLunarSpikesOnEnter(orig_OnEnter orig, LunarSpikes self)
{
orig.Invoke(self);
((EntityState)self).PlayAnimation("LeftArm, Override", "LunarShard", "LunarSpike.playbackRate", self.duration * 5f, 0f);
}
public void AddFalseSonSecondary()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
SkillLocator component = PaladinPlugin.characterPrefab.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.secondary.skillFamily;
SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC2/FalseSon/FalseSonBodyLunarSpikes.asset").WaitForCompletion();
SkillDef val2 = Object.Instantiate<SkillDef>(val);
val2.baseMaxStock = 6;
val2.skillNameToken = "RUINEDPALADIN_LUNAR_SPIKES_NAME";
val2.skillDescriptionToken = "RUINEDPALADIN_LUNAR_SPIKES_DESC";
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, false, (Node)null);
variants[num] = val3;
}
private void AddTokens()
{
LanguageAPI.Add("RUINEDPALADIN_LUNAR_SPIKES_NAME", "Ruined Spikes");
LanguageAPI.Add("RUINEDPALADIN_LUNAR_SPIKES_DESC", "<style=cIsUtility>Lunar Ruin</style>. Throw a Lunar Spike for <style=cIsDamage>150% damage</style>. Hold up to <style=cIsDamage>6 shards</style>.");
}
}
}