Decompiled source of Gunslinger v1.10.2
Gunslinger.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.Bandit2; using EntityStates.Commando.CommandoWeapon; using EntityStates.Mage; using EntityStates.Wisp1Monster; using HG; using KinematicCharacterController; using On.RoR2; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.ContentManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.UI; using UnityEngine.Video; [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.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("Gunslinger")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Gunslinger")] [assembly: AssemblyTitle("Gunslinger")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Gunslinger; internal class GunslingerCrosshairController : MonoBehaviour { public HudElement hud; public CharacterBody body; public Image image; private void Awake() { image = ((Component)this).GetComponentInChildren<Image>(); } private void Update() { //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)hud)) { hud = ((Component)this).GetComponent<HudElement>(); if (Object.op_Implicit((Object)(object)hud) && Object.op_Implicit((Object)(object)hud.targetCharacterBody)) { body = hud.targetCharacterBody; } } if (!Object.op_Implicit((Object)(object)image) || !Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.skillLocator) || !Object.op_Implicit((Object)(object)body.skillLocator.primary)) { return; } if (body.skillLocator.primary.skillNameToken == "GUNSLINGER_VENDETTA") { int stock = body.skillLocator.primary.stock; if (stock >= 3 || stock == 0) { ((Graphic)image).color = Color.white; } if (stock == 2) { ((Graphic)image).color = Color.yellow; } if (stock == 1) { ((Graphic)image).color = Color.red; } } if (body.skillLocator.primary.skillNameToken == "GUNSLINGER_UNLOAD") { int buffCount = body.GetBuffCount(Prefabs.unloadBuff); if (buffCount < 15) { ((Graphic)image).color = Color.white; } if (buffCount >= 15 && buffCount < 30) { ((Graphic)image).color = Color.yellow; } if (buffCount >= 30) { ((Graphic)image).color = Color.red; } } } } internal class CurseMarkBehaviour : MonoBehaviour { private CharacterBody characterBody; private TemporaryOverlay temporaryOverlay; private GameObject effectInstance; private void OnEnable() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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) characterBody = ((Component)this).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)characterBody.modelLocator) && Object.op_Implicit((Object)(object)characterBody.modelLocator.modelTransform)) { CharacterModel component = ((Component)characterBody.modelLocator.modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { temporaryOverlay = ((Component)characterBody.modelLocator.modelTransform).gameObject.AddComponent<TemporaryOverlay>(); temporaryOverlay.duration = 3f; temporaryOverlay.destroyComponentOnEnd = true; temporaryOverlay.animateShaderAlpha = true; temporaryOverlay.alphaCurve = AnimationCurve.EaseInOut(0f, 0.2f, 1.5f, 0f); temporaryOverlay.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Junk/Parent/matParentSpawnClouds.mat").WaitForCompletion(); temporaryOverlay.AddToCharacerModel(component); } effectInstance = Object.Instantiate<GameObject>(VFX.curseEffect, ((Component)this).transform.position, ((Component)this).transform.rotation); effectInstance.transform.SetParent(((Component)this).transform); } AkSoundEngine.PostEvent(Sounds.curse, ((Component)this).gameObject); } private void FixedUpdate() { if (Object.op_Implicit((Object)(object)characterBody) && !characterBody.HasBuff(Prefabs.curseMark)) { Object.Destroy((Object)(object)this); } } private void OnExit() { if (Object.op_Implicit((Object)(object)characterBody)) { AkSoundEngine.PostEvent(Sounds.cursepop, ((Component)this).gameObject); } if (Object.op_Implicit((Object)(object)effectInstance)) { Object.Destroy((Object)(object)effectInstance); } if (Object.op_Implicit((Object)(object)temporaryOverlay)) { temporaryOverlay.RemoveFromCharacterModel(); } } } internal class TotemBehaviour : MonoBehaviour { private BarrelInteraction interaction; private bool opened; private bool play = false; private bool playActivated = false; private uint ID; private void Awake() { ID = AkSoundEngine.PostEvent(Sounds.totemidle, ((Component)this).gameObject); } private void FixedUpdate() { interaction = ((Component)this).GetComponent<BarrelInteraction>(); if (Object.op_Implicit((Object)(object)interaction)) { opened = interaction.Networkopened; } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isCharged) { AkSoundEngine.StopPlayingID(ID); playActivated = false; } if (opened) { AkSoundEngine.StopPlayingID(ID); if (!playActivated) { playActivated = true; AkSoundEngine.PostEvent(Sounds.toteminteraction, ((Component)this).gameObject); } } } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class GlyphBehaviour : MonoBehaviour { private BarrelInteraction interaction; private bool opened; private bool play = false; private bool playActivated = false; private uint ID; private void FixedUpdate() { //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) interaction = ((Component)this).GetComponent<BarrelInteraction>(); if (Object.op_Implicit((Object)(object)interaction)) { opened = interaction.Networkopened; } HurtBox val = SearchForTarget(); if (Object.op_Implicit((Object)(object)val) && !opened) { ((Component)((Component)this).gameObject.transform.Find("glyph")).gameObject.SetActive(true); if (!play) { play = true; ID = AkSoundEngine.PostEvent(Sounds.glyphactive, ((Component)this).gameObject); } } else { ((Component)((Component)this).gameObject.transform.Find("glyph")).gameObject.SetActive(false); AkSoundEngine.StopPlayingID(ID); play = false; } if (opened) { ((Component)((Component)this).gameObject.transform.Find("glyph")).gameObject.SetActive(false); AkSoundEngine.StopPlayingID(ID); if (!playActivated) { playActivated = true; Hook.glyphInteractionCount++; AkSoundEngine.PostEvent(Sounds.glyphinteraction, ((Component)this).gameObject); EffectManager.SimpleEffect(VFX.glyphActivateEffect, ((Component)this).gameObject.transform.position, Quaternion.identity, false); } } } private HurtBox SearchForTarget() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch(); val.searchOrigin = ((Component)this).gameObject.transform.position; val.searchDirection = ((Component)this).gameObject.transform.position; val.maxDistanceFilter = 15f; val.teamMaskFilter = TeamMask.AllExcept((TeamIndex)(-1)); val.sortMode = (SortMode)1; val.RefreshCandidates(); val.FilterOutGameObject(((Component)this).gameObject); return val.GetResults().FirstOrDefault(); } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class GameBehaviour : MonoBehaviour { private BarrelInteraction interaction; private bool opened; private bool play = false; private bool playActivated = false; internal bool gibenItem = false; private uint ID; private void FixedUpdate() { interaction = ((Component)this).GetComponent<BarrelInteraction>(); if (Object.op_Implicit((Object)(object)interaction)) { opened = interaction.Networkopened; } if (!opened) { playActivated = false; AkSoundEngine.StopPlayingID(ID); } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isCharged) { AkSoundEngine.StopPlayingID(ID); playActivated = false; } if (!opened || !gibenItem || playActivated) { return; } playActivated = true; GameObject gameObject = ((Component)((Component)this).gameObject.transform.Find("video")).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { VideoPlayer component = gameObject.GetComponent<VideoPlayer>(); if (Object.op_Implicit((Object)(object)component)) { component.Play(); } } ID = AkSoundEngine.PostEvent(Sounds.mlg, ((Component)this).gameObject); } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class PinkBehaviour : MonoBehaviour { private BarrelInteraction interaction; private bool opened; private bool play = false; private bool playActivated = false; internal bool gibenItem = false; private uint ID; private void FixedUpdate() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown interaction = ((Component)this).GetComponent<BarrelInteraction>(); if (Object.op_Implicit((Object)(object)interaction)) { opened = interaction.Networkopened; } if (!opened) { playActivated = false; AkSoundEngine.StopPlayingID(ID); } if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance) && TeleporterInteraction.instance.isCharged) { AkSoundEngine.StopPlayingID(ID); playActivated = false; } HurtBox val = SearchForTarget(); if (Object.op_Implicit((Object)(object)val) && !opened) { if (!play) { play = true; Chat.SendBroadcastChat((ChatMessageBase)new SubjectFormatChatMessage { baseToken = "PINK_INTERACTABLE_USE_MESSAGE" }); } } else { play = false; } if (opened && gibenItem) { ((Component)((Component)this).gameObject.transform.Find("pinkidle")).gameObject.SetActive(false); ((Component)((Component)this).gameObject.transform.Find("pinkplaying")).gameObject.SetActive(true); ((Component)((Component)this).gameObject.transform.Find("ukulele")).gameObject.SetActive(true); if (!playActivated) { playActivated = true; ID = AkSoundEngine.PostEvent(Sounds.help, ((Component)this).gameObject); } } } private HurtBox SearchForTarget() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch(); val.searchOrigin = ((Component)this).gameObject.transform.position; val.searchDirection = ((Component)this).gameObject.transform.position; val.maxDistanceFilter = 15f; val.teamMaskFilter = TeamMask.AllExcept((TeamIndex)(-1)); val.sortMode = (SortMode)1; val.RefreshCandidates(); val.FilterOutGameObject(((Component)this).gameObject); return val.GetResults().FirstOrDefault(); } private void OnDisable() { AkSoundEngine.StopPlayingID(ID); } } internal class WickedRing { public static ItemDef WickedRingItemDef; public static ItemDef FakeWickedRingItemDef; public static GameObject ringPickupPrefab; public static GameObject ringDisplayPrefab; internal static void Init() { string text = "Order: \"Wicked Ring\"" + Environment.NewLine + Environment.NewLine; text = text + "Tracking Number: 790******" + Environment.NewLine + Environment.NewLine; text = text + "Estimated Delivery: 02/02/2056" + Environment.NewLine + Environment.NewLine; text = text + "Shipping Method: <style=cIsHealth>High Priority/Fragile</style>" + Environment.NewLine + Environment.NewLine; text = text + "Shipping Address: 1414 East, Fillmore, Venus" + Environment.NewLine + Environment.NewLine; text = text + "Shipping Details:" + Environment.NewLine + Environment.NewLine; text = text + Environment.NewLine + Environment.NewLine; text = text + "With how many rings he had, you would think more would have been found, eh? Nope, just this one. The King used to sacrifice one of his own sons to imbue the ring with dark spirits. He claimed that the spirits warded away any ill omen. The King lived until he was 104, so hey, maybe he was right." + Environment.NewLine + Environment.NewLine; text = text + "As the last remaining Wicked Ring, I expect a hefty sum." + Environment.NewLine + Environment.NewLine; LanguageAPI.Add("GUNSLINGER_RING_ITEM_NAME", "Wicked Ring"); LanguageAPI.Add("GUNSLINGER_RING_ITEM_DESC", "<style=cIsDamage>+6% Critical Strike Chance.</style> Killing enemies with a '<style=cIsDamage>Critical Strike</style>' <style=cIsDamage>spawns your dark spirit</style> with <style=cIsDamage>25% stats</style> of the killed enemy. Recharges every <style=cIsUtility>10</style>. Lasts <style=cIsDamage>30s</style> <style=cStack>(+30s per stack)</style>."); LanguageAPI.Add("GUNSLINGER_RING_ITEM_PICKUP", "Killing an enemy with a 'Critical Strike' summons your dark spirit."); LanguageAPI.Add("GUNSLINGER_RING_ITEM_LORE", text); WickedRingItem(); } private static void WickedRingItem() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Expected O, but got Unknown ringPickupPrefab = PrefabAPI.InstantiateClone(Gunslinger.MainAssetBundle.LoadAsset<GameObject>("ringitem"), "GunslingerRingPrefab", true); ringPickupPrefab.AddComponent<NetworkIdentity>(); Renderer component = ringPickupPrefab.GetComponent<Renderer>(); Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Commando/matCommandoDualies.mat").WaitForCompletion()); val.SetColor("_Color", Color.white); val.SetTexture("_MainTex", Gunslinger.MainAssetBundle.LoadAsset<Material>("ringitemmat").GetTexture("_MainTex")); val.SetColor("_EmColor", Color.cyan); val.SetFloat("_EmPower", 1.8f); val.SetTexture("_EmTex", Gunslinger.MainAssetBundle.LoadAsset<Material>("ringitemmat").GetTexture("_EmissionMap")); val.SetFloat("_NormalStrength", 1f); component.material = val; ringDisplayPrefab = PrefabAPI.InstantiateClone(Gunslinger.MainAssetBundle.LoadAsset<GameObject>("ringitemdisplay"), "GunslingerFakeRingPrefab", true); ringDisplayPrefab.AddComponent<NetworkIdentity>(); MeshRenderer[] componentsInChildren = ringDisplayPrefab.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = val, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } ItemDisplay val2 = ringDisplayPrefab.AddComponent<ItemDisplay>(); val2.rendererInfos = array; WickedRingItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)WickedRingItemDef).name = "SlingerWickedRing"; WickedRingItemDef.deprecatedTier = (ItemTier)2; WickedRingItemDef.canRemove = false; WickedRingItemDef.hidden = false; WickedRingItemDef.pickupModelPrefab = ringPickupPrefab; WickedRingItemDef.pickupIconSprite = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("wickedringicon"); WickedRingItemDef.nameToken = "GUNSLINGER_RING_ITEM_NAME"; WickedRingItemDef.descriptionToken = "GUNSLINGER_RING_ITEM_DESC"; WickedRingItemDef.pickupToken = "GUNSLINGER_RING_ITEM_PICKUP"; WickedRingItemDef.loreToken = "GUNSLINGER_RING_ITEM_LORE"; ItemDef wickedRingItemDef = WickedRingItemDef; ItemTag[] array2 = new ItemTag[6]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); wickedRingItemDef.tags = (ItemTag[])(object)array2; ItemAPI.Add(new CustomItem(WickedRingItemDef, (ItemDisplayRule[])(object)new ItemDisplayRule[0])); FakeWickedRingItemDef = ScriptableObject.CreateInstance<ItemDef>(); ((Object)FakeWickedRingItemDef).name = "FakeRing"; FakeWickedRingItemDef.deprecatedTier = (ItemTier)5; FakeWickedRingItemDef.canRemove = false; FakeWickedRingItemDef.hidden = false; FakeWickedRingItemDef.pickupModelPrefab = ringPickupPrefab; FakeWickedRingItemDef.pickupIconSprite = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("wickedringicon"); FakeWickedRingItemDef.nameToken = "GUNSLINGER_RING_ITEM_NAME"; FakeWickedRingItemDef.descriptionToken = "GUNSLINGER_RING_ITEM_DESC"; FakeWickedRingItemDef.pickupToken = "GUNSLINGER_RING_ITEM_PICKUP"; FakeWickedRingItemDef.loreToken = "GUNSLINGER_RING_ITEM_LORE"; ItemDef fakeWickedRingItemDef = FakeWickedRingItemDef; ItemTag[] array3 = new ItemTag[6]; RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); fakeWickedRingItemDef.tags = (ItemTag[])(object)array3; ItemAPI.Add(new CustomItem(FakeWickedRingItemDef, (ItemDisplayRule[])(object)new ItemDisplayRule[0])); } } public class WickedRingBehaviour : ItemBehavior { private void FixedUpdate() { bool flag = base.body.HasBuff(Prefabs.wickedCooldown); bool flag2 = base.body.HasBuff(Prefabs.wickedReady); if (!flag && !flag2) { base.body.AddBuff(Prefabs.wickedReady); } if (flag2 && flag) { base.body.RemoveBuff(Prefabs.wickedReady); } } } internal static class Achievements { internal static UnlockableDef gunslingerUnlockDef; internal static UnlockableDef gunslingerMasteryDef; internal static UnlockableDef gunslingerEliteMasteryDef; internal static UnlockableDef gunslingerDeadeyeDef; internal static UnlockableDef gunslingerPreonDef; internal static UnlockableDef gunslingerDeathmarkDef; internal static UnlockableDef gunslingerUnloadDef; internal static UnlockableDef gunslingerLordDef; internal static UnlockableDef gunslingerWickedDef; internal static UnlockableDef gunslingerHollowDef; internal static UnlockableDef gunslingerGauntletDef; internal static UnlockableDef gunslingerGambleDef; public static void RegisterUnlockables() { gunslingerUnlockDef = UnlockableAPI.AddUnlockable<SurvivorChallenge>((Type)null, (UnlockableDef)null); gunslingerMasteryDef = UnlockableAPI.AddUnlockable<GunslingerMonsoonChallenge>((Type)null, (UnlockableDef)null); gunslingerEliteMasteryDef = UnlockableAPI.AddUnlockable<GunslingerEliteChallenge>((Type)null, (UnlockableDef)null); gunslingerDeadeyeDef = UnlockableAPI.AddUnlockable<DeadeyeChallenge>((Type)null, (UnlockableDef)null); gunslingerPreonDef = UnlockableAPI.AddUnlockable<PreonChallenge>((Type)null, (UnlockableDef)null); gunslingerDeathmarkDef = UnlockableAPI.AddUnlockable<DeathmarkChallenge>((Type)null, (UnlockableDef)null); gunslingerUnloadDef = UnlockableAPI.AddUnlockable<UnloadChallenge>((Type)null, (UnlockableDef)null); gunslingerLordDef = UnlockableAPI.AddUnlockable<LordChallenge>((Type)null, (UnlockableDef)null); gunslingerWickedDef = UnlockableAPI.AddUnlockable<WickedChallenge>((Type)null, (UnlockableDef)null); gunslingerHollowDef = UnlockableAPI.AddUnlockable<HollowChallenge>((Type)null, (UnlockableDef)null); gunslingerGauntletDef = UnlockableAPI.AddUnlockable<GauntletChallenge>((Type)null, (UnlockableDef)null); gunslingerGambleDef = UnlockableAPI.AddUnlockable<GambleChallenge>((Type)null, (UnlockableDef)null); LanguageAPI.Add("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerSurvivorAchievement"); LanguageAPI.Add("GUNSLINGER_UNLOCKABLE_REWARD_ID", "GunslingerSurvivorReward"); LanguageAPI.Add("GUNSLINGER_UNLOCKABLE_NAME", "GunslingerReborn"); LanguageAPI.Add("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_NAME", "Reborn"); LanguageAPI.Add("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_DESC", "Get slain by a Greater Wisp as Bandit."); LanguageAPI.Add("GUNSLINGER_MASTERY_ACHIEVEMENT_ID", "GunslingerMasteryAchievement"); LanguageAPI.Add("GUNSLINGER_MASTERY_REWARD_ID", "GunslingerMasteryReward"); LanguageAPI.Add("GUNSLINGER_MASTERY_NAME", "GunslingerMastery"); LanguageAPI.Add("GUNSLINGER_MASTERY_ACHIEVEMENT_NAME", "Gunslinger: Mastery"); LanguageAPI.Add("GUNSLINGER_MASTERY_ACHIEVEMENT_DESC", "As Gunslinger, beat the game or obliterate on Monsoon."); LanguageAPI.Add("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerEliteMasteryAchievement"); LanguageAPI.Add("GUNSLINGER_ELITE_UNLOCKABLE_REWARD_ID", "GunslingerEliteMasteryReward"); LanguageAPI.Add("GUNSLINGER_ELITE_UNLOCKABLE_NAME", "GunslingerEliteMastery"); LanguageAPI.Add("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Elite Mastery"); LanguageAPI.Add("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_DESC", "Beat the game only using Vendetta."); LanguageAPI.Add("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerDeadeyeAchievement"); LanguageAPI.Add("GUNSLINGER_DEADEYE_UNLOCKABLE_REWARD_ID", "GunslingerDeadeyeReward"); LanguageAPI.Add("GUNSLINGER_DEADEYE_UNLOCKABLE_NAME", "GunslingerDeadeye"); LanguageAPI.Add("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: I Kill With My Heart"); LanguageAPI.Add("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_DESC", "Land the killing blow on 5 bosses with Soul Piercer in a single run."); LanguageAPI.Add("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerPreonAchievement"); LanguageAPI.Add("GUNSLINGER_PREON_UNLOCKABLE_REWARD_ID", "GunslingerPreonReward"); LanguageAPI.Add("GUNSLINGER_PREON_UNLOCKABLE_NAME", "GunslingerPreon"); LanguageAPI.Add("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: BFG On His Hip"); LanguageAPI.Add("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, learn the Particle Accelerator technology."); LanguageAPI.Add("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerDeathmarkAchievement"); LanguageAPI.Add("GUNSLINGER_DEATHMARK_UNLOCKABLE_REWARD_ID", "GunslingerDeathmarkReward"); LanguageAPI.Add("GUNSLINGER_DEATHMARK_UNLOCKABLE_NAME", "GunslingerDeathmark"); LanguageAPI.Add("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Dead Man Walkin'"); LanguageAPI.Add("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, kill a boss while they have the mark of death."); LanguageAPI.Add("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerUnloadAchievement"); LanguageAPI.Add("GUNSLINGER_UNLOAD_UNLOCKABLE_REWARD_ID", "GunslingerUnloadReward"); LanguageAPI.Add("GUNSLINGER_UNLOAD_UNLOCKABLE_NAME", "GunslingerUnload"); LanguageAPI.Add("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: End Of The Line"); LanguageAPI.Add("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, beat the game with at least 5 Shaped Glasses."); LanguageAPI.Add("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerLordAchievement"); LanguageAPI.Add("GUNSLINGER_LORD_UNLOCKABLE_REWARD_ID", "GunslingerLordReward"); LanguageAPI.Add("GUNSLINGER_LORD_UNLOCKABLE_NAME", "GunslingerLord"); LanguageAPI.Add("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Electric Organs"); LanguageAPI.Add("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, imbue your body with electricity."); LanguageAPI.Add("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerWickedAchievement"); LanguageAPI.Add("GUNSLINGER_WICKED_UNLOCKABLE_REWARD_ID", "GunslingerWickedReward"); LanguageAPI.Add("GUNSLINGER_WICKED_UNLOCKABLE_NAME", "GunslingerWicked"); LanguageAPI.Add("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Wicked Entity"); LanguageAPI.Add("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, become wicked."); LanguageAPI.Add("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerHollowAchievement"); LanguageAPI.Add("GUNSLINGER_HOLLOW_UNLOCKABLE_REWARD_ID", "GunslingerHollowReward"); LanguageAPI.Add("GUNSLINGER_HOLLOW_UNLOCKABLE_NAME", "GunslingerHollow"); LanguageAPI.Add("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Vasto Lorde"); LanguageAPI.Add("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_DESC", "What is this form?"); LanguageAPI.Add("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerGauntletAchievement"); LanguageAPI.Add("GUNSLINGER_GAUNTLET_UNLOCKABLE_REWARD_ID", "GunslingerGauntletReward"); LanguageAPI.Add("GUNSLINGER_GAUNTLET_UNLOCKABLE_NAME", "GunslingerGauntlet"); LanguageAPI.Add("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_NAME", "Salvation"); LanguageAPI.Add("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_DESC", "Obtain all six aspects of existence."); LanguageAPI.Add("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_ID", "GunslingerGambleAchievement"); LanguageAPI.Add("GUNSLINGER_GAMBLE_UNLOCKABLE_REWARD_ID", "GunslingerGambleReward"); LanguageAPI.Add("GUNSLINGER_GAMBLE_UNLOCKABLE_NAME", "GunslingerGamble"); LanguageAPI.Add("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_NAME", "Gunslinger: Lucky 7"); LanguageAPI.Add("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_DESC", "As Gunslinger, succeed a Shrine of Chance 7 times in a row in a single run."); } } internal class SurvivorChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override string UnlockableNameToken { get; } = "GUNSLINGER_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("portrait"); public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("Bandit2Body"); } public void ClearMonsoon(Run run, RunReport runReport) { if (run == null || runReport == null || !Object.op_Implicit((Object)(object)runReport.gameEnding) || runReport.gameEnding.isWin) { return; } PlayerInfo[] playerInfos = runReport.playerInfos; PlayerInfo[] array = playerInfos; foreach (PlayerInfo val in array) { string killerBodyName = val.killerBodyName; if (killerBodyName == "GreaterWispBody") { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { ((ModdedUnlockable)this).OnInstall(); Run.onClientGameOverGlobal += ClearMonsoon; } public override void OnUninstall() { ((ModdedUnlockable)this).OnUninstall(); Run.onClientGameOverGlobal -= ClearMonsoon; } } internal class GunslingerMonsoonChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_MASTERY_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_MASTERY_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_MASTERY_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_MASTERY_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_MASTERY_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("androportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_MASTERY_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_MASTERY_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_MASTERY_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_MASTERY_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } public void ClearMonsoon(Run run, RunReport runReport) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 if (run != null && runReport != null && Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { DifficultyIndex val = runReport.ruleBook.FindDifficulty(); if ((int)val == 2 && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { ((ModdedUnlockable)this).OnInstall(); Run.onClientGameOverGlobal += ClearMonsoon; } public override void OnUninstall() { ((ModdedUnlockable)this).OnUninstall(); Run.onClientGameOverGlobal -= ClearMonsoon; } } internal class GunslingerEliteChallenge : ModdedUnlockable { internal bool skillsUsed = false; public override string AchievementIdentifier { get; } = "GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_ELITE_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_ELITE_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("riotportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_ELITE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } public void ClearGameVendettaOnly(Run run, RunReport runReport) { if (run != null && runReport != null && Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && !skillsUsed && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } private void CharacterBody_OnSkillActivated(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { orig.Invoke(self, skill); if (!Object.op_Implicit((Object)(object)self) || !(self.baseNameToken == "GUNSLINGER_NAME")) { return; } string skillNameToken = skill.skillDef.skillNameToken; switch (skillNameToken) { default: if (!(skillNameToken == "GUNSLINGER_DEADEYE")) { break; } goto case "GUNSLINGER_ACCURSEDARM"; case "GUNSLINGER_ACCURSEDARM": case "GUNSLINGER_ORB": case "GUNSLINGER_WRAITHSTEP": case "GUNSLINGER_WRAITHFRENZY": case "GUNSLINGER_SOULPIERCER": skillsUsed = true; break; } } private void Run_onRunStartGlobal(Run obj) { skillsUsed = false; } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterBody.OnSkillActivated += new hook_OnSkillActivated(CharacterBody_OnSkillActivated); Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onClientGameOverGlobal += ClearGameVendettaOnly; } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterBody.OnSkillActivated -= new hook_OnSkillActivated(CharacterBody_OnSkillActivated); Run.onRunStartGlobal -= Run_onRunStartGlobal; Run.onClientGameOverGlobal -= ClearGameVendettaOnly; } } internal class DeadeyeChallenge : ModdedUnlockable { internal float bosseskilled; public override string AchievementIdentifier { get; } = "GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_DEADEYE_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_DEADEYE_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("specialalt"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_DEADEYE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void OnCharacterDeathGlobal(DamageReport damageReport) { if (damageReport.victimIsBoss && Object.op_Implicit((Object)(object)damageReport.attackerMaster) && damageReport.attackerBody.baseNameToken == "GUNSLINGER_NAME" && DoesDamageQualify(damageReport)) { bosseskilled += 1f; if (bosseskilled == 4f && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } private bool DoesDamageQualify(DamageReport damageReport) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 return (damageReport.damageInfo.damageType & 0x80000) == 524288; } public override void OnInstall() { ((ModdedUnlockable)this).OnInstall(); Run.onRunStartGlobal += Run_onRunStartGlobal; GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeathGlobal; } private void Run_onRunStartGlobal(Run obj) { bosseskilled = 0f; } public override void OnUninstall() { ((ModdedUnlockable)this).OnUninstall(); Run.onRunStartGlobal -= Run_onRunStartGlobal; GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeathGlobal; } } internal class PreonChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_PREON_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_PREON_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("m2alt"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_PREON_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)self.GetBody()) && self.GetBody().baseNameToken == "GUNSLINGER_NAME") { EquipmentIndex equipmentIndex = Equipment.BFG.equipmentIndex; if (self.inventory.currentEquipmentIndex == equipmentIndex && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged); } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged); } } internal class DeathmarkChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_DEATHMARK_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_DEATHMARK_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("utilityalt"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_DEATHMARK_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void GlobalEventManager_onCharacterDeathGlobal(DamageReport dmg) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (dmg.victimIsBoss && Object.op_Implicit((Object)(object)dmg.attackerMaster) && dmg.attackerBody.baseNameToken == "GUNSLINGER_NAME" && dmg.victimBody.HasBuff(Buffs.DeathMark) && (int)dmg.attackerMaster.teamIndex == 1 && Object.op_Implicit((Object)(object)dmg.attackerMaster.inventory)) { ItemIndex itemIndex = Items.DeathMark.itemIndex; if (dmg.attackerMaster.inventory.GetItemCount(itemIndex) >= 1 && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { ((ModdedUnlockable)this).OnInstall(); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } public override void OnUninstall() { ((ModdedUnlockable)this).OnUninstall(); GlobalEventManager.onCharacterDeathGlobal -= GlobalEventManager_onCharacterDeathGlobal; } } internal class UnloadChallenge : ModdedUnlockable { internal bool hasGlass; public override string AchievementIdentifier { get; } = "GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_UNLOAD_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_UNLOAD_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("m1alt"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_UNLOAD_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } public void ClearMonsoon(Run run, RunReport runReport) { if (run != null && runReport != null && Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && ((BaseAchievement)this).meetsBodyRequirement && hasGlass) { ((BaseAchievement)this).Grant(); } } private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)self.GetBody()) && self.GetBody().baseNameToken == "GUNSLINGER_NAME") { ItemDef lunarDagger = Items.LunarDagger; if (self.inventory.GetItemCount(lunarDagger) >= 5 && ((BaseAchievement)this).meetsBodyRequirement) { hasGlass = true; } else { hasGlass = false; } } } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged); Run.onClientGameOverGlobal += ClearMonsoon; } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged); Run.onClientGameOverGlobal -= ClearMonsoon; } } internal class LordChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_LORD_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_LORD_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("lordportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_LORD_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)self.GetBody()) && self.GetBody().baseNameToken == "GUNSLINGER_NAME") { ItemDef lightningStrikeOnHit = Items.LightningStrikeOnHit; if (self.inventory.GetItemCount(lightningStrikeOnHit) > 0 && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged); } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged); } } internal class WickedChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_WICKED_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_WICKED_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("deathslingerportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_WICKED_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)self.GetBody()) && self.GetBody().baseNameToken == "GUNSLINGER_NAME") { ItemDef wickedRingItemDef = WickedRing.WickedRingItemDef; if (self.inventory.GetItemCount(wickedRingItemDef) > 0 && ((BaseAchievement)this).meetsBodyRequirement) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged); } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged); } } internal class HollowChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_HOLLOW_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_HOLLOW_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("hollowportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_HOLLOW_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void CharacterMaster_RespawnExtraLife(orig_RespawnExtraLife orig, CharacterMaster self) { //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.GetBody()) || !(self.GetBody().baseNameToken == "GUNSLINGER_NAME") || !((BaseAchievement)this).meetsBodyRequirement) { return; } self.GetBody().AddTimedBuff(Buffs.HiddenInvincibility, 6f); AkSoundEngine.PostEvent(Sounds.vastolorderoar, ((Component)self.GetBody()).gameObject); EffectManager.SimpleMuzzleFlash(VFX.vastolordeEffect, ((Component)self.GetBody()).gameObject, "BaseObject", false); Object.Instantiate<GameObject>(VFX.reiatsuEffect, GameObject.Find("Scene Camera").transform); Transform modelTransform = ((Component)self.GetBody()).GetComponent<ModelLocator>().modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component)) { ModelSkinController component2 = ((Component)component).GetComponent<ModelSkinController>(); if (Object.op_Implicit((Object)(object)component2)) { component2.ApplySkin(5); BodyLoadout defaultLoadoutForBody = BodyLoadoutManager.GetDefaultLoadoutForBody(self.GetBody().bodyIndex); defaultLoadoutForBody.skinPreference = 5u; } } TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>(); val.duration = 6f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 0.7f, 5.5f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/CritOnUse/matFullCrit.mat").WaitForCompletion(); val.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>()); Animator component3 = ((Component)modelTransform).GetComponent<Animator>(); if (Object.op_Implicit((Object)(object)component3)) { int layerIndex = component3.GetLayerIndex("FullBody, Override"); component3.speed = 1f; component3.Update(6f); component3.PlayInFixedTime("roar", layerIndex, 6f); EntityState.PlayAnimationOnAnimator(component3, "FullBody, Override", "roar", "Reload.playbackRate", 6f); } GunslingerMain.lordeSpawn = true; } ((BaseAchievement)this).Grant(); } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.RespawnExtraLife += new hook_RespawnExtraLife(CharacterMaster_RespawnExtraLife); } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.RespawnExtraLife -= new hook_RespawnExtraLife(CharacterMaster_RespawnExtraLife); } } internal class GauntletChallenge : ModdedUnlockable { public override string AchievementIdentifier { get; } = "GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_GAUNTLET_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_GAUNTLET_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("gauntlet"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_GAUNTLET_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory)) { ItemDef artifactKey = Items.ArtifactKey; ItemDef titanGoldDuringTP = Items.TitanGoldDuringTP; ItemDef focusConvergence = Items.FocusConvergence; ItemDef randomDamageZone = Items.RandomDamageZone; ItemDef slowOnHit = Items.SlowOnHit; EquipmentDef gateway = Equipment.Gateway; if (self.inventory.GetItemCount(artifactKey) > 0 && self.inventory.GetItemCount(titanGoldDuringTP) > 0 && self.inventory.GetItemCount(focusConvergence) > 0 && self.inventory.GetItemCount(randomDamageZone) > 0 && self.inventory.GetItemCount(slowOnHit) > 0 && self.inventory.currentEquipmentIndex == gateway.equipmentIndex) { ((BaseAchievement)this).Grant(); } } } public override void OnInstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnInstall(); CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged); } public override void OnUninstall() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown ((ModdedUnlockable)this).OnUninstall(); CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged); } } internal class GambleChallenge : ModdedUnlockable { private int succ; public override string AchievementIdentifier { get; } = "GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_ID"; public override string UnlockableIdentifier { get; } = "GUNSLINGER_GAMBLE_UNLOCKABLE_REWARD_ID"; public override string AchievementNameToken { get; } = "GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_NAME"; public override string UnlockableNameToken { get; } = "GUNSLINGER_GAMBLE_UNLOCKABLE_NAME"; public override string AchievementDescToken { get; } = "GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_DESC"; public override Sprite Sprite { get; } = Gunslinger.MainAssetBundle.LoadAsset<Sprite>("dapperportrait"); public override string PrerequisiteUnlockableIdentifier { get; } = "GUNSLINGER_UNLOCKABLE_REWARD_ID"; public override Func<string> GetHowToUnlock { get; } = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2] { Language.GetString("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override Func<string> GetUnlocked { get; } = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_NAME"), Language.GetString("GUNSLINGER_GAMBLE_UNLOCKABLE_ACHIEVEMENT_DESC") }); public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("GunslingerBody"); } private void ShrineChanceBehavior_onShrineChancePurchaseGlobal(bool flag, Interactor interactor) { if (!Object.op_Implicit((Object)(object)interactor)) { return; } CharacterBody component = ((Component)interactor).GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || !(component.baseNameToken == "GUNSLINGER_NAME") || !((BaseAchievement)this).meetsBodyRequirement) { return; } if (!flag) { succ++; if (succ == 7) { ((BaseAchievement)this).Grant(); } } else { succ = 0; } } private void Run_onRunStartGlobal(Run obj) { succ = 0; } public override void OnInstall() { ((ModdedUnlockable)this).OnInstall(); ShrineChanceBehavior.onShrineChancePurchaseGlobal += ShrineChanceBehavior_onShrineChancePurchaseGlobal; Run.onRunStartGlobal += Run_onRunStartGlobal; } public override void OnUninstall() { ((ModdedUnlockable)this).OnUninstall(); ShrineChanceBehavior.onShrineChancePurchaseGlobal -= ShrineChanceBehavior_onShrineChancePurchaseGlobal; Run.onRunStartGlobal -= Run_onRunStartGlobal; } } internal class ColorFilters { internal static void SetMainMenuColorGrading() { //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) PostProcessVolume val = Utils.FindPostProcess("GlobalPostProcessVolume"); if (!Object.op_Implicit((Object)(object)val)) { return; } ColorGrading setting = val.profile.GetSetting<ColorGrading>(); if (Object.op_Implicit((Object)(object)setting)) { ((ParameterOverride)setting.colorFilter).overrideState = true; ((ParameterOverride)setting.satVsSatCurve).overrideState = true; ((ParameterOverride)setting.saturation).overrideState = true; ((ParameterOverride)setting.postExposure).overrideState = true; ((ParameterOverride)setting.contrast).overrideState = true; ((ParameterOverride)setting.temperature).overrideState = true; ((ParameterOverride)setting.mixerRedOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerRedOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerRedOutBlueIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutBlueIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutBlueIn).overrideState = true; if (Gunslinger.enableGrayscaleMode.Value && !Gunslinger.enableWildWestMode.Value) { ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.contrast).value = 120f; } if (!Gunslinger.enableGrayscaleMode.Value && Gunslinger.enableWildWestMode.Value) { ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; ((ParameterOverride<float>)(object)setting.mixerRedOutRedIn).value = 160f; ((ParameterOverride<float>)(object)setting.mixerRedOutBlueIn).value = 20f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -20f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 40f; } } } public static void SetColorGrading() { //IL_1039: Unknown result type (might be due to invalid IL or missing references) //IL_103e: Unknown result type (might be due to invalid IL or missing references) //IL_1043: Unknown result type (might be due to invalid IL or missing references) //IL_0e7f: Unknown result type (might be due to invalid IL or missing references) //IL_0e84: Unknown result type (might be due to invalid IL or missing references) //IL_0e89: Unknown result type (might be due to invalid IL or missing references) //IL_0acb: Unknown result type (might be due to invalid IL or missing references) //IL_0ad0: Unknown result type (might be due to invalid IL or missing references) //IL_0ad5: Unknown result type (might be due to invalid IL or missing references) //IL_1422: Unknown result type (might be due to invalid IL or missing references) //IL_1427: Unknown result type (might be due to invalid IL or missing references) //IL_142c: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Unknown result type (might be due to invalid IL or missing references) //IL_116a: Unknown result type (might be due to invalid IL or missing references) //IL_116f: Unknown result type (might be due to invalid IL or missing references) //IL_0f1d: Unknown result type (might be due to invalid IL or missing references) //IL_0f22: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Unknown result type (might be due to invalid IL or missing references) //IL_0d23: Unknown result type (might be due to invalid IL or missing references) //IL_0d28: Unknown result type (might be due to invalid IL or missing references) //IL_0d2d: Unknown result type (might be due to invalid IL or missing references) //IL_1203: Unknown result type (might be due to invalid IL or missing references) //IL_1208: Unknown result type (might be due to invalid IL or missing references) //IL_120d: Unknown result type (might be due to invalid IL or missing references) //IL_0fbb: Unknown result type (might be due to invalid IL or missing references) //IL_0fc0: Unknown result type (might be due to invalid IL or missing references) //IL_0fc5: 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_0b43: Unknown result type (might be due to invalid IL or missing references) //IL_10e7: Unknown result type (might be due to invalid IL or missing references) //IL_10ec: Unknown result type (might be due to invalid IL or missing references) //IL_10f1: Unknown result type (might be due to invalid IL or missing references) //IL_0bf7: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Unknown result type (might be due to invalid IL or missing references) //IL_1394: Unknown result type (might be due to invalid IL or missing references) //IL_1399: Unknown result type (might be due to invalid IL or missing references) //IL_139e: Unknown result type (might be due to invalid IL or missing references) //IL_0de1: Unknown result type (might be due to invalid IL or missing references) //IL_0de6: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Unknown result type (might be due to invalid IL or missing references) //IL_0c95: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0c9f: Unknown result type (might be due to invalid IL or missing references) //IL_12b1: Unknown result type (might be due to invalid IL or missing references) //IL_12b6: Unknown result type (might be due to invalid IL or missing references) //IL_12bb: Unknown result type (might be due to invalid IL or missing references) //IL_14cd: Unknown result type (might be due to invalid IL or missing references) //IL_14d2: Unknown result type (might be due to invalid IL or missing references) //IL_14d7: Unknown result type (might be due to invalid IL or missing references) PostProcessVolume val = Object.FindObjectOfType<PostProcessVolume>(); if (!Object.op_Implicit((Object)(object)val)) { return; } ColorGrading setting = val.profile.GetSetting<ColorGrading>(); if (!Object.op_Implicit((Object)(object)setting)) { return; } Hook.colorSet = true; ((ParameterOverride)setting.colorFilter).overrideState = true; ((ParameterOverride)setting.satVsSatCurve).overrideState = true; ((ParameterOverride)setting.saturation).overrideState = true; ((ParameterOverride)setting.postExposure).overrideState = true; ((ParameterOverride)setting.contrast).overrideState = true; ((ParameterOverride)setting.temperature).overrideState = true; ((ParameterOverride)setting.mixerRedOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerRedOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerRedOutBlueIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerGreenOutBlueIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutRedIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutGreenIn).overrideState = true; ((ParameterOverride)setting.mixerBlueOutBlueIn).overrideState = true; if (Gunslinger.enableGrayscaleMode.Value && !Gunslinger.enableWildWestMode.Value) { switch (Stage.instance.sceneDef.baseSceneName) { case "golemplains": case "frozenwall": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.5f; ((ParameterOverride<float>)(object)setting.contrast).value = 120f; break; case "bazaar": case "dampcavesimple": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.contrast).value = 50f; break; case "blackbeach": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.8f; ((ParameterOverride<float>)(object)setting.contrast).value = 90f; break; case "limbo": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = -0.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 0f; break; case "artifactworld": case "goldshores": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.contrast).value = 90f; break; case "foggyswamp": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.7f; ((ParameterOverride<float>)(object)setting.contrast).value = 120f; break; case "moon": case "moon2": ((ParameterOverride<Spline>)(object)setting.satVsSatCurve).value.curve.AddKey(0f, 0f); ((ParameterOverride<float>)(object)setting.postExposure).value = -1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 20f; break; case "wispgraveyard": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; break; case "skymeadow": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = -0.25f; ((ParameterOverride<float>)(object)setting.contrast).value = 40f; break; case "mysteryspace": ((ParameterOverride<Spline>)(object)setting.satVsSatCurve).value.curve.AddKey(0f, 0f); ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.contrast).value = 120f; break; case "shipgraveyard": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.25f; ((ParameterOverride<float>)(object)setting.contrast).value = 70f; break; case "goolake": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 90f; break; case "rootjungle": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.8f; ((ParameterOverride<float>)(object)setting.contrast).value = 120f; break; case "arena": ((ParameterOverride<Spline>)(object)setting.satVsSatCurve).value.curve.AddKey(0f, 0f); ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 60f; break; case "VF2Port": ((ParameterOverride<float>)(object)setting.saturation).value = -100f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; break; } } if (!Gunslinger.enableGrayscaleMode.Value && Gunslinger.enableWildWestMode.Value) { switch (Stage.instance.sceneDef.baseSceneName) { case "golemplains": ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.contrast).value = 70f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.temperature).value = 90f; break; case "frozenwall": ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -40f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 40f; ((ParameterOverride<float>)(object)setting.mixerRedOutRedIn).value = 100f; ((ParameterOverride<float>)(object)setting.mixerRedOutGreenIn).value = 100f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 20f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -15f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -100f; break; case "bazaar": ((ParameterOverride<float>)(object)setting.temperature).value = 90f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.3f; ((ParameterOverride<float>)(object)setting.contrast).value = 10f; ((ParameterOverride<float>)(object)setting.mixerRedOutGreenIn).value = 50f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 15f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 20f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -10f; break; case "dampcavesimple": ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 2f; ((ParameterOverride<float>)(object)setting.contrast).value = 60f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 30f; ((ParameterOverride<float>)(object)setting.mixerGreenOutGreenIn).value = 200f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 30f; break; case "blackbeach": ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.contrast).value = 30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.temperature).value = 150f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 30f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -5f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 80f; break; case "limbo": ((ParameterOverride<float>)(object)setting.temperature).value = 90f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.6f; ((ParameterOverride<float>)(object)setting.contrast).value = 20f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 5f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 90f; break; case "artifactworld": ((ParameterOverride<float>)(object)setting.temperature).value = 30f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.contrast).value = 0f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 5f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 5f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -30f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 80f; break; case "goldshores": ((ParameterOverride<float>)(object)setting.temperature).value = 40f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.contrast).value = 10f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -6f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 80f; break; case "foggyswamp": ((ParameterOverride<float>)(object)setting.temperature).value = 65f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.3f; ((ParameterOverride<float>)(object)setting.contrast).value = 40f; ((ParameterOverride<float>)(object)setting.mixerRedOutGreenIn).value = 5f; ((ParameterOverride<float>)(object)setting.mixerRedOutBlueIn).value = 10f; break; case "moon": case "moon2": ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.9f; ((ParameterOverride<float>)(object)setting.contrast).value = 20f; ((ParameterOverride<float>)(object)setting.mixerRedOutBlueIn).value = 40f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -40f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -30f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 95f; break; case "wispgraveyard": ((ParameterOverride<float>)(object)setting.temperature).value = 20f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1f; ((ParameterOverride<float>)(object)setting.contrast).value = 50f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 15f; break; case "skymeadow": ((ParameterOverride<float>)(object)setting.temperature).value = 110f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerGreenOutGreenIn).value = 110f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 40f; break; case "mysteryspace": ((ParameterOverride<float>)(object)setting.temperature).value = 40f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 10f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 5f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutGreenIn).value = -10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 80f; break; case "shipgraveyard": ((ParameterOverride<float>)(object)setting.temperature).value = 80f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 0.8f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; ((ParameterOverride<float>)(object)setting.mixerRedOutRedIn).value = 120f; ((ParameterOverride<float>)(object)setting.mixerRedOutGreenIn).value = 5f; break; case "goolake": ((ParameterOverride<float>)(object)setting.temperature).value = 40f; ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.3f; ((ParameterOverride<float>)(object)setting.contrast).value = 30f; ((ParameterOverride<float>)(object)setting.mixerGreenOutBlueIn).value = 15f; break; case "rootjungle": ((ParameterOverride<float>)(object)setting.temperature).value = 90f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.4f; ((ParameterOverride<float>)(object)setting.contrast).value = 60f; ((ParameterOverride<float>)(object)setting.mixerRedOutRedIn).value = 120f; ((ParameterOverride<float>)(object)setting.mixerRedOutBlueIn).value = 10f; break; case "arena": ((ParameterOverride<float>)(object)setting.temperature).value = 70f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 2f; ((ParameterOverride<float>)(object)setting.contrast).value = 0f; ((ParameterOverride<float>)(object)setting.mixerRedOutGreenIn).value = 20f; ((ParameterOverride<float>)(object)setting.mixerGreenOutRedIn).value = 10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutRedIn).value = -10f; ((ParameterOverride<float>)(object)setting.mixerBlueOutBlueIn).value = 95f; break; case "VF2Port": ((ParameterOverride<float>)(object)setting.temperature).value = 150f; ((ParameterOverride<Color>)(object)setting.colorFilter).value = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)210, (byte)154, byte.MaxValue)); ((ParameterOverride<float>)(object)setting.saturation).value = -30f; ((ParameterOverride<float>)(object)setting.postExposure).value = 1.2f; ((ParameterOverride<float>)(object)setting.contrast).value = 40f; break; } } } } public class AccursedArm : BaseSkillState { public GameObject muzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/BFG/MuzzleflashBFG.prefab").WaitForCompletion(); public GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/GreaterWisp/OmniExplosionVFXGreaterWisp.prefab").WaitForCompletion(); public GameObject tracerPrefab = VFX.deadeyeTracerPrefab; private string muzzleString = "MuzzleHand"; private float duration; private float baseDuration = 0.8f; public float Spread; public bool hasFired; public override void OnEnter() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); Spread = 0f; EffectManager.SimpleMuzzleFlash(VFX.curseMuzzleFlash, ((EntityState)this).gameObject, muzzleString, false); Util.PlayAttackSpeedSound(ChargeEmbers.attackString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "Punch", "Punch.playbackRate", duration); } private void FireBullet() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) EffectManager.SimpleMuzzleFlash(muzzleFlash, ((EntityState)this).gameObject, muzzleString, false); AkSoundEngine.PostEvent(Sounds.Punch, ((Component)((EntityState)this).characterBody).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack(); val.falloffModel = (FalloffModel)1; val.stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask; val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.minSpread = Spread; val.maxSpread = Spread; val.bulletCount = 1u; val.damage = ((EntityState)this).characterBody.damage * 4f; val.force = 300f; val.tracerEffectPrefab = tracerPrefab; val.muzzleName = muzzleString; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((BaseState)this).RollCrit(); val.radius = 3f; val.smartCollision = true; if (!hasFired) { val.damageType = (DamageType)(val.damageType | 0x4000); } val.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireBullet(); if (!Gunslinger.gradiusModActive || ((EntityState)this).isAuthority) { } ((EntityState)this).outer.SetNextStateToMain(); } } 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)2; } } public class AccursedOrb : BaseSkillState { public GameObject muzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/BFG/MuzzleflashBFG.prefab").WaitForCompletion(); public GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/GreaterWisp/OmniExplosionVFXGreaterWisp.prefab").WaitForCompletion(); private string muzzleString = "MuzzleHand"; private float duration; private float baseDuration; public float Spread; public bool hasFired; public override void OnEnter() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).characterBody.SetAimTimer(2f); AkSoundEngine.PostEvent(Sounds.Punch, ((Component)((EntityState)this).characterBody).gameObject); baseDuration = 0.6f; ((EntityState)this).characterBody.SetSpreadBloom(0.2f, false); Spread = 0f; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Override", "Curse"); FireBullet(); } private void FireBullet() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * 3.2f; val.damageColorIndex = (DamageColorIndex)0; val.force = 500f; val.owner = ((EntityState)this).gameObject; val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = Prefabs.curseOrbPrefab; Ray aimRay2 = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((EntityState)this).characterBody.isSprinting = false; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } } internal class GunslingerMain : GenericCharacterMain { private Animator Animator; private Transform modelTransform; private ModelSkinController skincontroller; private GameObject smokeInstance; internal static bool skinEffectOn; internal static bool lordeSpawn; private ModelSkinController modelSkinController; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); Transform val = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)val)) { return; } CharacterModel component = ((Component)val).GetComponent<CharacterModel>(); if (!Object.op_Implicit((Object)(object)component)) { return; } ModelSkinController val2 = (modelSkinController = ((Component)component).GetComponent<ModelSkinController>()); if (Object.op_Implicit((Object)(object)val2)) { if (val2.skins[((EntityState)this).characterBody.skinIndex].nameToken == "GUNSLINGERBODY_LORD_SKIN_NAME" && !skinEffectOn) { skinEffectOn = true; EffectManager.SimpleMuzzleFlash(VFX.Smoke, ((EntityState)this).gameObject, "Smoke", false); } if (val2.skins[((EntityState)this).characterBody.skinIndex].nameToken == "GUNSLINGERBODY_HOLLOW_SKIN_NAME" && !skinEffectOn) { skinEffectOn = true; EffectManager.SimpleMuzzleFlash(VFX.vastolordeIdleEffect, ((EntityState)this).gameObject, "Body", false); } } } public override void Update() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might