using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using EntityStates;
using HarmonyLib;
using LiarPlugin;
using LiarPlugin.MyEntityStates;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[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("pants")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("pants")]
[assembly: AssemblyTitle("pants")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public static class Asset
{
public static AssetBundle mainBundle;
public const string bundleName = "skillicons";
public static string AssetBundlePath => Path.Combine(Path.GetDirectoryName(CustomSkillTutorial.Pinfo.Location), "skillicons");
public static void Init()
{
mainBundle = AssetBundle.LoadFromFile(AssetBundlePath);
if ((Object)(object)mainBundle == (Object)null)
{
Debug.LogError((object)("[Asset] Failed to load AssetBundle from path: " + AssetBundlePath));
}
else
{
Debug.Log((object)("[Asset] Successfully loaded AssetBundle from: " + AssetBundlePath));
}
}
}
public static class PassiveBehaviour
{
public static void Init()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ApplyBurnBonuses);
GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(SpreadFire);
}
private static int GetBurnStacks(CharacterBody body)
{
return body.GetBuffCount(Buffs.OnFire);
}
private static void ApplyBurnBonuses(CharacterBody body, StatHookEventArgs args)
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(CustomSkillTutorial.hatItemDef.itemIndex);
if (itemCount > 0)
{
args.baseRegenAdd += 1f;
}
}
if (body.bodyIndex == BodyCatalog.FindBodyIndex("CommandoBody"))
{
int burnStacks = GetBurnStacks(body);
if (burnStacks > 0)
{
args.attackSpeedMultAdd += 0.2f * (float)burnStacks;
args.moveSpeedMultAdd += 0.4f + 0.1f * (float)burnStacks;
}
}
}
private static void SpreadFire(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, damageInfo, victim);
if (!Object.op_Implicit((Object)(object)damageInfo.attacker))
{
return;
}
CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
if (!Object.op_Implicit((Object)(object)component) || component.bodyIndex != BodyCatalog.FindBodyIndex("CommandoBody"))
{
return;
}
int burnStacks = GetBurnStacks(component);
if (burnStacks > 0 && Object.op_Implicit((Object)(object)victim))
{
CharacterBody component2 = victim.GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component2) && !component2.HasBuff(Buffs.Immune))
{
DotController.InflictDot(((Component)component2).gameObject, ((Component)component).gameObject, (DotIndex)1, 0.2f * (float)burnStacks, damageInfo.damage * 0.5f, (uint?)null);
}
}
}
}
public class LastMessageTracker : MonoBehaviour
{
public int lastMessageIndex = -1;
public bool check = false;
}
public static class MessageLogic
{
public static readonly string[] MessagePool = new string[69]
{
"gaslight is not a real word", "im gonna sleep any time now any time now", "i properly noted of the current inventory of the store room 100%%%", "i was not responsible for the Bukit Ho Swee fire in 1961", "Ekko needs a buff. his w needs like 4 more seconds of stun, then he’d be balanced… ", "Teemo players are not cool and shouldn’t be given cakes for free", "i have never and would never rob a bank", "im really honest - (cel)", "i think gaslighting should be frowned upon. (churro)", "gaslighter? who? is that something you can eat? - (churro)",
"im never mean im like the nicest person man (churro)", "im never getting punished for anything ever (churro)", "i am good at darius (matt)", "my favourite champion is smolder bro (matt)", "my ori starts earlier than expected unlucky :(( i guess i have to get out of work earlier :pensive:(matt)", "im actually born on the 8th, you missed my birthday >:( (matt)", "im a teenage father (matt) (what does this mean)", "im really financially responsible i'm going to japan and im just buying ONE THING (matt)", "you should threaten my family", "all of MY coolest friends kill themselves... so... B)",
"threatening people is the best way to get what you want!", "im not addicted to <Criminal Acts of Behaviour>, i can stop whenever i want!! (cel)", "im not addicted to <Being a Good Friend>, i can stop whenever i want!! (cel)", "im not addicted to <Guerilla Coffee Kaya Croissant>, i can stop whenever i want!! (cel)", "im not addicted to <Suntec City Kimchi Ramen>, i can stop whenever i want!! (cel)", "im not addicted to <Popular Competitive Video Game League of Legends, i can stop whenever i want!! (cel)>", "you're crazy", "just ONE GAME couldn't hurt...", "i am not putting words in your mouth bro", "celynn hates her friends",
"im right cuz i say so bro", "i hate my friends", "im not a hater bro", "im a hater bro", "i would never apologise", "i am really REALLY humble", "i will be there in 5 MINUTES", "i can keep my mouth shut for realll", "jg diff (caleb)", "ive literally never been wrong (caleb)",
"woodlands is the best place to live (caleb)", "i'll remember to bring *literally put anything here* (caleb) (<-- idk this sounds kind of personal)", "im like, so responsible (caleb)", "yeah my friends like it when i bully them (caleb)", "im getting better about dropping my phone (caleb)", "i think i could just remember my schedule, no need for planners :) (caleb)", "caitlyn no ult (caleb)", "karthus no ult (caleb)", "kayle no ult (caleb)", "i have good spending habits (caleb)",
"i swear that teamfight wasn't my fault (caleb)", "im really big (caleb)", "you should definitely buy that (caleb)", "im a great friend (caleb)", "there has to be a less dumb way to do this (caleb)", "never punisheddd (caleb)", "im not greedy (caleb)", "its limit testing bro (caleb)", "im not the asshole in this situation, right? (caleb)", "i wont eat your cats, cel (caleb)",
"i wont eat your dog, churro (caleb)", "its probably fine (caleb)", "my friends are hella gay (caleb)", "why are all my friends the same (caleb)", "asking to grope my ass should be sexual harassment (caleb) (caleb would like to reinforce that hes very serious and not joking when typing this, he actually wants to say that he's never made a joke in his whole life)", "wait you dumbass (caleb)", "yall should be grateful (caleb)", "no i care sincerely (caleb)", "they call me jerry mctruthteller (cel)"
};
public static int GetNextMessageIndex(GameObject masterObject)
{
if (!Object.op_Implicit((Object)(object)masterObject))
{
return Random.Range(0, MessagePool.Length);
}
LastMessageTracker lastMessageTracker = masterObject.GetComponent<LastMessageTracker>();
if (!Object.op_Implicit((Object)(object)lastMessageTracker))
{
lastMessageTracker = masterObject.AddComponent<LastMessageTracker>();
}
int lastMessageIndex = lastMessageTracker.lastMessageIndex;
int num;
do
{
num = Random.Range(0, MessagePool.Length);
}
while (lastMessageIndex == num);
if (lastMessageIndex == MessagePool.Length - 1 && lastMessageTracker.check)
{
NameOverrideTracker.SetNickname("Jerry Integrity McTruthteller");
}
if (lastMessageIndex == MessagePool.Length - 1 && !lastMessageTracker.check)
{
NameOverrideTracker.SetNickname("Jerry McTruthteller");
MessagePool[MessagePool.Length - 1] = "integrity is my middle name";
lastMessageTracker.check = true;
}
lastMessageTracker.lastMessageIndex = num;
return num;
}
}
public static class NameOverrideTracker
{
public static string customNickname;
public static void SetNickname(string name)
{
customNickname = name;
foreach (NetworkUser readOnlyInstances in NetworkUser.readOnlyInstancesList)
{
if (((NetworkBehaviour)readOnlyInstances).isLocalPlayer)
{
readOnlyInstances.userName = customNickname;
readOnlyInstances.UpdateUserName();
}
}
}
public static string GetNicknameOrOriginal(NetworkUser user)
{
return customNickname ?? user.userName;
}
}
[HarmonyPatch(typeof(NetworkUser), "UpdateUserName")]
public static class Patch_NicknameUpdate
{
private static void Postfix(NetworkUser __instance)
{
if (((NetworkBehaviour)__instance).isLocalPlayer && !string.IsNullOrWhiteSpace(NameOverrideTracker.customNickname))
{
__instance.userName = NameOverrideTracker.customNickname;
}
}
}
[HarmonyPatch(typeof(HealthComponent), "Heal")]
public static class Patch_HealthComponent_Heal
{
private static void Prefix(ref float amount, HealthComponent __instance)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
object obj;
if (__instance == null)
{
obj = null;
}
else
{
CharacterBody body = __instance.body;
obj = ((body != null) ? body.inventory : null);
}
if (!((Object)obj == (Object)null))
{
int itemCount = __instance.body.inventory.GetItemCount(CustomSkillTutorial.hatItemDef.itemIndex);
if (itemCount > 0 && __instance.body.GetBuffCount(Buffs.OnFire) > 0)
{
amount *= 0.5f;
}
}
}
}
namespace LiarPlugin
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.elbowterror.LiarLiar", "LiarLiar", "1.2.2")]
public class CustomSkillTutorial : BaseUnityPlugin
{
public static ItemDef hatItemDef;
public static PluginInfo Pinfo { get; private set; }
public void Awake()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_025d: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Expected O, but got Unknown
//IL_028a: Unknown result type (might be due to invalid IL or missing references)
//IL_028c: Unknown result type (might be due to invalid IL or missing references)
//IL_0331: Unknown result type (might be due to invalid IL or missing references)
//IL_0336: Unknown result type (might be due to invalid IL or missing references)
//IL_0392: Unknown result type (might be due to invalid IL or missing references)
//IL_0399: Expected O, but got Unknown
//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0401: Unknown result type (might be due to invalid IL or missing references)
//IL_0406: Unknown result type (might be due to invalid IL or missing references)
//IL_041c: Unknown result type (might be due to invalid IL or missing references)
//IL_0421: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_0428: Unknown result type (might be due to invalid IL or missing references)
//IL_0444: Unknown result type (might be due to invalid IL or missing references)
//IL_044d: Unknown result type (might be due to invalid IL or missing references)
//IL_0480: Unknown result type (might be due to invalid IL or missing references)
//IL_0485: Unknown result type (might be due to invalid IL or missing references)
//IL_049b: Unknown result type (might be due to invalid IL or missing references)
//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
//IL_04de: Unknown result type (might be due to invalid IL or missing references)
//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
//IL_051a: Unknown result type (might be due to invalid IL or missing references)
//IL_051f: Unknown result type (might be due to invalid IL or missing references)
//IL_0535: Unknown result type (might be due to invalid IL or missing references)
//IL_053a: Unknown result type (might be due to invalid IL or missing references)
//IL_0550: Unknown result type (might be due to invalid IL or missing references)
//IL_0555: Unknown result type (might be due to invalid IL or missing references)
//IL_055a: Unknown result type (might be due to invalid IL or missing references)
//IL_055c: Unknown result type (might be due to invalid IL or missing references)
//IL_0578: Unknown result type (might be due to invalid IL or missing references)
//IL_0581: Unknown result type (might be due to invalid IL or missing references)
//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
//IL_05cf: Unknown result type (might be due to invalid IL or missing references)
//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
//IL_05f4: Unknown result type (might be due to invalid IL or missing references)
//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0612: Unknown result type (might be due to invalid IL or missing references)
//IL_061b: Unknown result type (might be due to invalid IL or missing references)
//IL_064e: Unknown result type (might be due to invalid IL or missing references)
//IL_0653: Unknown result type (might be due to invalid IL or missing references)
//IL_0669: Unknown result type (might be due to invalid IL or missing references)
//IL_066e: Unknown result type (might be due to invalid IL or missing references)
//IL_0684: Unknown result type (might be due to invalid IL or missing references)
//IL_0689: Unknown result type (might be due to invalid IL or missing references)
//IL_068e: Unknown result type (might be due to invalid IL or missing references)
//IL_0690: Unknown result type (might be due to invalid IL or missing references)
//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
//IL_06b5: Unknown result type (might be due to invalid IL or missing references)
//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
//IL_06ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0703: Unknown result type (might be due to invalid IL or missing references)
//IL_0708: Unknown result type (might be due to invalid IL or missing references)
//IL_071e: Unknown result type (might be due to invalid IL or missing references)
//IL_0723: Unknown result type (might be due to invalid IL or missing references)
//IL_0728: Unknown result type (might be due to invalid IL or missing references)
//IL_072a: Unknown result type (might be due to invalid IL or missing references)
//IL_0746: Unknown result type (might be due to invalid IL or missing references)
//IL_074f: Unknown result type (might be due to invalid IL or missing references)
//IL_0782: Unknown result type (might be due to invalid IL or missing references)
//IL_0787: Unknown result type (might be due to invalid IL or missing references)
//IL_079d: Unknown result type (might be due to invalid IL or missing references)
//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
//IL_07b8: Unknown result type (might be due to invalid IL or missing references)
//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
//IL_07c4: Unknown result type (might be due to invalid IL or missing references)
//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
//IL_07e9: Unknown result type (might be due to invalid IL or missing references)
//IL_081c: Unknown result type (might be due to invalid IL or missing references)
//IL_0821: Unknown result type (might be due to invalid IL or missing references)
//IL_0837: Unknown result type (might be due to invalid IL or missing references)
//IL_083c: Unknown result type (might be due to invalid IL or missing references)
//IL_0852: Unknown result type (might be due to invalid IL or missing references)
//IL_0857: Unknown result type (might be due to invalid IL or missing references)
//IL_085c: Unknown result type (might be due to invalid IL or missing references)
//IL_085e: Unknown result type (might be due to invalid IL or missing references)
//IL_087a: Unknown result type (might be due to invalid IL or missing references)
//IL_0883: Unknown result type (might be due to invalid IL or missing references)
//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
//IL_08bb: Unknown result type (might be due to invalid IL or missing references)
//IL_08d1: Unknown result type (might be due to invalid IL or missing references)
//IL_08d6: Unknown result type (might be due to invalid IL or missing references)
//IL_08ec: Unknown result type (might be due to invalid IL or missing references)
//IL_08f1: Unknown result type (might be due to invalid IL or missing references)
//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
//IL_08f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0914: Unknown result type (might be due to invalid IL or missing references)
//IL_091d: Unknown result type (might be due to invalid IL or missing references)
//IL_0950: Unknown result type (might be due to invalid IL or missing references)
//IL_0955: Unknown result type (might be due to invalid IL or missing references)
//IL_096b: Unknown result type (might be due to invalid IL or missing references)
//IL_0970: Unknown result type (might be due to invalid IL or missing references)
//IL_0986: Unknown result type (might be due to invalid IL or missing references)
//IL_098b: Unknown result type (might be due to invalid IL or missing references)
//IL_0990: Unknown result type (might be due to invalid IL or missing references)
//IL_0992: Unknown result type (might be due to invalid IL or missing references)
//IL_09ae: Unknown result type (might be due to invalid IL or missing references)
//IL_09b7: Unknown result type (might be due to invalid IL or missing references)
//IL_09ea: Unknown result type (might be due to invalid IL or missing references)
//IL_09ef: Unknown result type (might be due to invalid IL or missing references)
//IL_0a05: Unknown result type (might be due to invalid IL or missing references)
//IL_0a0a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a20: Unknown result type (might be due to invalid IL or missing references)
//IL_0a25: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2c: Unknown result type (might be due to invalid IL or missing references)
//IL_0a48: Unknown result type (might be due to invalid IL or missing references)
//IL_0a51: Unknown result type (might be due to invalid IL or missing references)
//IL_0a84: Unknown result type (might be due to invalid IL or missing references)
//IL_0a89: Unknown result type (might be due to invalid IL or missing references)
//IL_0a9f: Unknown result type (might be due to invalid IL or missing references)
//IL_0aa4: Unknown result type (might be due to invalid IL or missing references)
//IL_0aba: Unknown result type (might be due to invalid IL or missing references)
//IL_0abf: Unknown result type (might be due to invalid IL or missing references)
//IL_0ac4: Unknown result type (might be due to invalid IL or missing references)
//IL_0ac6: Unknown result type (might be due to invalid IL or missing references)
//IL_0ae2: Unknown result type (might be due to invalid IL or missing references)
//IL_0aeb: Unknown result type (might be due to invalid IL or missing references)
//IL_0b1e: Unknown result type (might be due to invalid IL or missing references)
//IL_0b23: Unknown result type (might be due to invalid IL or missing references)
//IL_0b39: Unknown result type (might be due to invalid IL or missing references)
//IL_0b3e: Unknown result type (might be due to invalid IL or missing references)
//IL_0b54: Unknown result type (might be due to invalid IL or missing references)
//IL_0b59: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5e: Unknown result type (might be due to invalid IL or missing references)
//IL_0b60: Unknown result type (might be due to invalid IL or missing references)
//IL_0b7c: Unknown result type (might be due to invalid IL or missing references)
//IL_0b85: Unknown result type (might be due to invalid IL or missing references)
//IL_0bb8: Unknown result type (might be due to invalid IL or missing references)
//IL_0bbd: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd3: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd8: Unknown result type (might be due to invalid IL or missing references)
//IL_0bee: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf3: Unknown result type (might be due to invalid IL or missing references)
//IL_0bf8: Unknown result type (might be due to invalid IL or missing references)
//IL_0bfa: Unknown result type (might be due to invalid IL or missing references)
//IL_0c16: Unknown result type (might be due to invalid IL or missing references)
//IL_0c1f: Unknown result type (might be due to invalid IL or missing references)
//IL_0c52: Unknown result type (might be due to invalid IL or missing references)
//IL_0c57: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c72: Unknown result type (might be due to invalid IL or missing references)
//IL_0c88: Unknown result type (might be due to invalid IL or missing references)
//IL_0c8d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c92: Unknown result type (might be due to invalid IL or missing references)
//IL_0c94: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb0: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb9: Unknown result type (might be due to invalid IL or missing references)
//IL_0cec: Unknown result type (might be due to invalid IL or missing references)
//IL_0cf1: Unknown result type (might be due to invalid IL or missing references)
//IL_0d07: Unknown result type (might be due to invalid IL or missing references)
//IL_0d0c: Unknown result type (might be due to invalid IL or missing references)
//IL_0d22: Unknown result type (might be due to invalid IL or missing references)
//IL_0d27: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2c: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
//IL_0d4a: Unknown result type (might be due to invalid IL or missing references)
//IL_0d53: Unknown result type (might be due to invalid IL or missing references)
//IL_0d86: Unknown result type (might be due to invalid IL or missing references)
//IL_0d8b: Unknown result type (might be due to invalid IL or missing references)
//IL_0da1: Unknown result type (might be due to invalid IL or missing references)
//IL_0da6: Unknown result type (might be due to invalid IL or missing references)
//IL_0dbc: Unknown result type (might be due to invalid IL or missing references)
//IL_0dc1: Unknown result type (might be due to invalid IL or missing references)
//IL_0dc6: Unknown result type (might be due to invalid IL or missing references)
//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
//IL_0de4: Unknown result type (might be due to invalid IL or missing references)
//IL_0ded: Unknown result type (might be due to invalid IL or missing references)
//IL_0e20: Unknown result type (might be due to invalid IL or missing references)
//IL_0e25: Unknown result type (might be due to invalid IL or missing references)
//IL_0e3b: Unknown result type (might be due to invalid IL or missing references)
//IL_0e40: Unknown result type (might be due to invalid IL or missing references)
//IL_0e56: Unknown result type (might be due to invalid IL or missing references)
//IL_0e5b: Unknown result type (might be due to invalid IL or missing references)
//IL_0e60: Unknown result type (might be due to invalid IL or missing references)
//IL_0e62: Unknown result type (might be due to invalid IL or missing references)
//IL_0e74: Unknown result type (might be due to invalid IL or missing references)
//IL_0e7e: Expected O, but got Unknown
Log.Init(((BaseUnityPlugin)this).Logger);
Harmony val = new Harmony("com.elbowterror.LiarLiar");
val.PatchAll();
Pinfo = ((BaseUnityPlugin)this).Info;
Asset.Init();
PassiveBehaviour.Init();
GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();
LanguageAPI.Add("COMMANDO_SECONDARY_LIAR_NAME", "Liar, Liar...");
LanguageAPI.Add("COMMANDO_SECONDARY_LIAR_DESCRIPTION", "Ignite yourself, taking damage equal to <style=cIsHealth>5% of your max health per second</style> over 5 seconds.");
LanguageAPI.Add("COMMANDO_PASSIVE_FIRE_NAME", "Arsonist");
LanguageAPI.Add("COMMANDO_PASSIVE_FIRE_DESCRIPTION", "Spread Fire with your attacks (if you are ignited)! Improves movement and attack speed. Buffs and duration of fire spread stacks with each burn stack you have!!! (kind of)");
UnlockableDef val3 = ScriptableObject.CreateInstance<UnlockableDef>();
val3.cachedName = "JerrySkill";
val3.hidden = false;
UnlockableDef val4 = ScriptableObject.CreateInstance<UnlockableDef>();
SkillDef val5 = ScriptableObject.CreateInstance<SkillDef>();
EntityStateMachine val6 = val2.AddComponent<EntityStateMachine>();
val6.customName = "Weapon2";
val6.initialStateType = new SerializableEntityStateType(typeof(Idle));
val6.mainStateType = new SerializableEntityStateType(typeof(Idle));
val5.activationState = new SerializableEntityStateType(typeof(Lied));
val5.activationStateMachineName = "Weapon2";
val5.baseMaxStock = 1;
val5.baseRechargeInterval = 0.1f;
val5.canceledFromSprinting = false;
val5.cancelSprintingOnActivation = false;
val5.fullRestockOnAssign = true;
val5.interruptPriority = (InterruptPriority)0;
val5.isCombatSkill = false;
val5.mustKeyPress = true;
val5.rechargeStock = 1;
val5.requiredStock = 1;
val5.stockToConsume = 1;
val5.resetCooldownTimerOnUse = false;
val5.dontAllowPastMaxStocks = true;
val5.beginSkillCooldownOnSkillEnd = false;
Sprite icon = Asset.mainBundle.LoadAsset<Sprite>("jerryskill");
val5.icon = icon;
val5.skillDescriptionToken = "COMMANDO_SECONDARY_LIAR_DESCRIPTION";
val5.skillName = "COMMANDO_SECONDARY_LIAR_NAME";
val5.skillNameToken = "COMMANDO_SECONDARY_LIAR_NAME";
Sprite icon2 = Asset.mainBundle.LoadAsset<Sprite>("jerrypassive");
ContentAddition.AddSkillDef(val5);
SkillLocator component = val2.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.secondary.skillFamily;
component.passiveSkill.enabled = true;
component.passiveSkill.skillDescriptionToken = "COMMANDO_PASSIVE_FIRE_DESCRIPTION";
component.passiveSkill.skillNameToken = "COMMANDO_PASSIVE_FIRE_NAME";
component.passiveSkill.icon = icon2;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val7 = new Variant
{
skillDef = val5,
unlockableDef = val3
};
((Variant)(ref val7)).viewableNode = new Node(val5.skillNameToken, false, (Node)null);
variants[num] = val7;
hatItemDef = ScriptableObject.CreateInstance<ItemDef>();
((Object)hatItemDef).name = "PARTYHAT_NAME";
LanguageAPI.Add("PARTYHAT_NAME", "Hat of Party");
hatItemDef.nameToken = "PARTYHAT_NAME";
hatItemDef.pickupToken = "PARTYHAT_PICKUP";
LanguageAPI.Add("PARTYHAT_PICKUP", "<style=cShrine>Happy Birthday Jerry!</style> Improves your base health recovery, <style=cDeath>BUT... halves all healing effects while on fire.</style>");
hatItemDef.descriptionToken = "PARTYHAT_DESC";
LanguageAPI.Add("PARTYHAT_DESC", "<style=cIsHealing> +1 hp/s</style><style=cStack> (+0 per stack lol)</style>, <style=cDeath>reduces received healing effects by 50% while on fire.</style><style=cStack> (+0% per stack)</style>");
hatItemDef.loreToken = "PARTYHAT_LORE";
LanguageAPI.Add("PARTYHAT_LORE", "Happy birthday Jerry! I had a lot of help for this mod from your friends so please say nice things to them! Or threaten their families, I think that would work as well :) Thank you for being my friend somehow!! I'm probably never doing this again!!! Go and die <3!!!");
hatItemDef._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion();
hatItemDef.pickupIconSprite = Asset.mainBundle.LoadAsset<Sprite>("haticon");
hatItemDef.pickupModelPrefab = Asset.mainBundle.LoadAsset<GameObject>("tophat");
hatItemDef.canRemove = false;
hatItemDef.hidden = false;
ItemDisplayRuleDict val8 = new ItemDisplayRuleDict((ItemDisplayRule[])(object)new ItemDisplayRule[0]);
val8.Add("CommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00144f, 0.35635f, -0.0387f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00096f, 0.26557f, -0.0388f),
localAngles = new Vector3(351.1384f, 359.9675f, 0.07055f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("LoaderBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00096f, 0.26557f, -0.0388f),
localAngles = new Vector3(351.1384f, 359.9675f, 0.07055f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("HuntressBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.00643f, 0.30192f, -0.09347f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("Bandit2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.02427f, 0.21569f, -0.03807f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("ToolbotBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00115f, 3.39284f, 1.71209f),
localAngles = new Vector3(47.33434f, 25.71303f, 20.83316f),
localScale = new Vector3(1f, 1f, 1f)
}
});
val8.Add("MageBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.01198f, 0.21463f, -0.05487f),
localAngles = new Vector3(354.3564f, 359.9882f, 0.07306f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("MercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00095f, 0.24221f, -0.02752f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("CrocoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00535f, 4.95857f, 0.69029f),
localAngles = new Vector3(21.60161f, 35.47877f, 12.26354f),
localScale = new Vector3(1f, 1f, 1f)
}
});
val8.Add("CaptainBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.00394f, 0.27674f, -0.04385f),
localAngles = new Vector3(329.0266f, 359.8103f, 358.911f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("HereticBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.29997f, 0.18982f, 0.02091f),
localAngles = new Vector3(1.00459f, 355.0002f, 100.044f),
localScale = new Vector3(0.2f, 0.2f, 0.2f)
}
});
val8.Add("RailgunnerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.00342f, 0.18681f, -0.07836f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("VoidSurvivorBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.00682f, 0.23461f, -0.07317f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("FalseSonBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.00837f, 0.5022f, -0.15311f),
localAngles = new Vector3(311.5689f, 2.87189f, 358.8736f),
localScale = new Vector3(0.15f, 0.15f, 0.15f)
}
});
val8.Add("ChefBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(-0.97264f, -0.05851f, -0.01809f),
localAngles = new Vector3(357.9803f, 0.1242f, 102.2629f),
localScale = new Vector3(0.15f, 0.15f, 0.15f)
}
});
val8.Add("ITBrotherBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.02832f, 0.21288f, -0.02937f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("BrotherBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.02832f, 0.21288f, -0.02937f),
localAngles = new Vector3(339.6351f, 359.9034f, 0.0843f),
localScale = new Vector3(0.1f, 0.1f, 0.1f)
}
});
val8.Add("BrotherHurtBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
{
new ItemDisplayRule
{
ruleType = (ItemDisplayRuleType)0,
followerPrefab = hatItemDef.pickupModelPrefab,
childName = "Head",
localPos = new Vector3(0.01341f, 0.25143f, -0.01663f),
localAngles = new Vector3(355.1276f, 2.22594f, 359.7081f),
localScale = new Vector3(0.2622f, 0.2622f, 0.2622f)
}
});
ItemAPI.Add(new CustomItem(hatItemDef, val8));
Log.Info("[LIAR LIARLIAR] hiii this thing should have worked");
}
private void Update()
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown((KeyCode)283))
{
Transform transform = PlayerCharacterMasterController.instances[0].master.GetBodyObject().transform;
Log.Info($"Player pressed F2. Spawning our custom item at coordinates {transform.position}");
PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(hatItemDef.itemIndex), transform.position, transform.forward * 40f);
}
}
}
internal static class Log
{
private static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
}
namespace LiarPlugin.MyEntityStates
{
public class Lied : BaseSkillState
{
public float FireDuration = 5f;
public override void OnEnter()
{
((BaseState)this).OnEnter();
NetworkUser val = Util.LookUpBodyNetworkUser(((EntityState)this).characterBody);
if ((Object)(object)val != (Object)null)
{
int nextMessageIndex = MessageLogic.GetNextMessageIndex(val.masterObject);
string text = MessageLogic.MessagePool[nextMessageIndex];
Chat.AddMessage("<color=#ffffff>" + NameOverrideTracker.GetNicknameOrOriginal(val) + "</color>: " + text);
}
DotController.InflictDot(((EntityState)this).gameObject, ((EntityState)this).gameObject, (DotIndex)3, FireDuration, 1f, (uint?)null);
((EntityState)this).outer.SetNextStateToMain();
}
public override void OnExit()
{
((EntityState)this).OnExit();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)1;
}
}
}