Decompiled source of ZenCards v1.21.7
ZenCards.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; 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.Text; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using InControl; using ModdingUtils.Extensions; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using Photon.Pun; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Networking; using UnboundLib.Utils; using UnboundLib.Utils.UI; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using ZenCards.Cards; using ZenCards.Core; using ZenCards.Effects; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("0.0.0.0")] namespace ZenCards { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.zen.rounds.zencards", "ZenCards", "1.21.7")] [BepInProcess("Rounds.exe")] public class Plugin : BaseUnityPlugin { public const string ModId = "com.zen.rounds.zencards"; public const string ModName = "ZenCards"; public const string Version = "1.21.7"; public const string ModInitials = "Zen"; internal static Plugin Instance; internal static ConfigEntry<KeyCode> BulberKey; internal static ConfigEntry<float> SoundVolume; internal static ConfigEntry<bool> CardStyle; internal static ConfigEntry<bool> CardFont; internal static ConfigEntry<bool> CardEffects; internal static ConfigEntry<bool> CardArtwork; internal static ConfigEntry<bool> CardBackground; internal static ConfigEntry<KeyCode> SeraphKey; internal static ConfigEntry<KeyCode> SharknadoKey; internal static ConfigEntry<KeyCode> MjolnirKey; internal static ConfigEntry<KeyCode> SonicKey; internal static ConfigEntry<KeyCode> TurretKey; internal static ConfigEntry<KeyCode> FlickKey; internal static ConfigEntry<KeyCode> TinkerKey; internal static ConfigEntry<KeyCode> CreamyKey; internal static ConfigEntry<KeyCode> FantasticKey; internal static ConfigEntry<KeyCode> MagikarpKey; internal static ConfigEntry<KeyCode> PokeballKey; internal static ConfigEntry<KeyCode> FalconKey; internal static ConfigEntry<KeyCode> SpiderKey; internal static ConfigEntry<KeyCode> MoleKey; internal static ConfigEntry<KeyCode> StarKey; internal static bool VisualsOn { get { if (CardStyle != null) { return CardStyle.Value; } return true; } } internal static bool FontOn { get { if (VisualsOn) { if (CardFont != null) { return CardFont.Value; } return true; } return false; } } internal static bool BackgroundOn { get { if (VisualsOn) { if (CardBackground != null) { return CardBackground.Value; } return true; } return false; } } internal static bool EffectsOn { get { if (BackgroundOn) { if (CardEffects != null) { return CardEffects.Value; } return true; } return false; } } internal static bool ArtOn { get { if (CardArtwork != null) { return CardArtwork.Value; } return true; } } private void Awake() { //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown Instance = this; BulberKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Bulber key", (KeyCode)113, "Key that rips a boulder out of the ground (Bulber card)."); SeraphKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Seraph key", (KeyCode)101, "Key that starts the Seraph ascension (Seraph card). "); SharknadoKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Sharknado key", (KeyCode)122, "Key that summons the Sharknado (once per round)."); SonicKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Sonic key", (KeyCode)113, "Key that starts/stops the Sonic roll. Same as Bulber by default - change one if you have both."); TurretKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Turret Buddy key", (KeyCode)325, "Places your turret (Turret Buddy card). Same as Mjolnir by default - change one if you have both."); FlickKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Flick key", (KeyCode)325, "Pulls out the flick hand, press again to flick (Flick card). Same as Mjolnir/Turret Buddy by default - change one if you have both."); TinkerKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Tinker Bell key", (KeyCode)114, "Sends the fairy at the closest enemy (Tinker Bell card)."); CreamyKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Creamy key", (KeyCode)120, "Drops the chairs on every enemy, once per point (Creamy card)."); FantasticKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Mr. Fantastic key", (KeyCode)325, "Hold and pull your cursor away to stretch your arms; press again to snap back (Mr. Fantastic card). Middle mouse by default - same as Mjolnir/Turret Buddy/Flick."); MagikarpKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Magikarp key", (KeyCode)101, "Throws the fish (Magikarp card). Same as Seraph by default - change one if you have both."); PokeballKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Pokeball key", (KeyCode)102, "Throws the capture orb (Pokeball card)."); FalconKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Falcon Punch key", (KeyCode)118, "Winds up and throws the Falcon Punch (Falcon Punch card)."); SpiderKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Spider key", (KeyCode)113, "Tucks your Spider legs away / brings them back. Same as Bulber and Sonic by default - change one if you have more than one."); MoleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Mole key", (KeyCode)99, "Digs down through the platform you're standing on (Mole card)."); StarKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Super Star key", (KeyCode)113, "Starts the rainbow star power (Super Star card). Same as Bulber/Sonic/Spider by default - change one if you have more than one."); MjolnirKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "Mjolnir key", (KeyCode)325, "Throws Mjolnir, press again to teleport to it. Mouse2 = middle mouse / scroll-wheel click."); SoundVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Audio", "Sound volume", 0.6f, "Volume of ZenCards sound effects. 0 = off, 1 = full. Also in Settings > Zen Cards."); CardStyle = ((BaseUnityPlugin)this).Config.Bind<bool>("Card Visuals", "All custom card visuals", true, "ZenCards' own card look: the blue starfield card, border, custom names and animations. Off = plain vanilla cards. Also in Settings > Zen Cards."); CardFont = ((BaseUnityPlugin)this).Config.Bind<bool>("Card Visuals", "Custom card font", true, "The custom lettering for card names. Off = the game's normal font (everything else stays). Also in Settings > Zen Cards."); CardEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("Card Visuals", "Card animations", true, "Twinkling stars, border glow and the rarity shine. Off = still cards (everything else stays). Also in Settings > Zen Cards."); CardBackground = ((BaseUnityPlugin)this).Config.Bind<bool>("Card Visuals", "Card background", true, "The blue starfield card with its border. Off = the game's normal card body (custom names and artwork stay; the animations sit on this background, so they go too). Also in Settings > Zen Cards."); CardArtwork = ((BaseUnityPlugin)this).Config.Bind<bool>("Card Visuals", "Card artwork", true, "The picture on each ZenCards card. Off = no picture (works with or without the other card visuals). Also in Settings > Zen Cards."); Harmony val = new Harmony("com.zen.rounds.zencards"); Type[] types = typeof(Plugin).Assembly.GetTypes(); foreach (Type type in types) { if (type.GetCustomAttributes(typeof(HarmonyPatch), inherit: false).Length != 0) { try { val.CreateClassProcessor(type).Patch(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Harmony patch " + type.Name + " failed: " + ex.Message)); } } } } private void Start() { ZenCleanup.Register(); ZenSettingsMenu.Register(); DeathWatch.Ensure(); DeathCards.Register(); AmmoGamble.Register(); GoodPickSync.Register(); DoubleJeopardy.Register(); Mulligan.Register(); Shredder.Register(); ZenCleanup.OnReset += InputTricks.Clear; Maximus.Register(); BarChoice.Register(); Menace.Register(); PickSounds.Register(); CardShark.Register(); SummonList.Register(); CustomCard.BuildCard<SparkDroneCard>(); CustomCard.BuildCard<PhantomDaggersCard>(); CustomCard.BuildCard<BulberCard>(); CustomCard.BuildCard<HonkCard>(); CustomCard.BuildCard<WedgieCard>(); CustomCard.BuildCard<OprahCard>(); CustomCard.BuildCard<MomoCard>(); CustomCard.BuildCard<FuckThisCard>(); CustomCard.BuildCard<TurtleShellCard>(); CustomCard.BuildCard<UfoCard>(); CustomCard.BuildCard<ThiccumsCard>(); CustomCard.BuildCard<AmmoGamblingCard>(); CustomCard.BuildCard<TumbleweedRoundsCard>(); CustomCard.BuildCard<RubberDuckyRoundsCard>(); CustomCard.BuildCard<SeraphCard>(); CustomCard.BuildCard<YugeBoolitCard>(); CustomCard.BuildCard<ThxForBlockCard>(); CustomCard.BuildCard<NerfGunCard>(); CustomCard.BuildCard<DupeTroopCard>(); CustomCard.BuildCard<RatCard>(); CustomCard.BuildCard<HeADemonCard>(); CustomCard.BuildCard<AntiBlockbuildCard>(); CustomCard.BuildCard<SharknadoCard>(); CustomCard.BuildCard<TopUpCard>(); CustomCard.BuildCard<PanaceaCard>(); CustomCard.BuildCard<MjolnirCard>(); CustomCard.BuildCard<OsirisCard>(); CustomCard.BuildCard<PandorasBoxCard>(); CustomCard.BuildCard<RedrawCard>(); CustomCard.BuildCard<DisplacementCard>(); CustomCard.BuildCard<ClawMachineCard>(); CustomCard.BuildCard<GoodBoyCard>(); CustomCard.BuildCard<GoodGirlCard>(); CustomCard.BuildCard<QuadriplegicCard>(); CustomCard.BuildCard<SonicCard>(); CustomCard.BuildCard<FerrisRoundsCard>(); CustomCard.BuildCard<YoYoRoundsCard>(); CustomCard.BuildCard<DoubleJeopardyCard>(); CustomCard.BuildCard<MulliganCard>(); CustomCard.BuildCard<ShredderCard>(); CustomCard.BuildCard<GoldenTicketCard>(); CustomCard.BuildCard<ZenJackpotCard>(); CustomCard.BuildCard<CoeCard>(); CustomCard.BuildCard<SluggishRoundsCard>(); CustomCard.BuildCard<FlickCard>(); CustomCard.BuildCard<TinkerBellCard>(); CustomCard.BuildCard<RcHeliCard>(); CustomCard.BuildCard<BubbleShotCard>(); CustomCard.BuildCard<WrongButtonCard>(); CustomCard.BuildCard<OppositeDayCard>(); CustomCard.BuildCard<CreamyCard>(); CustomCard.BuildCard<MaximusCard>(); CustomCard.BuildCard<YonnerCard>(); CustomCard.BuildCard<RaccoonCard>(); CustomCard.BuildCard<ZenStateCard>(); CustomCard.BuildCard<PickpocketCard>(); CustomCard.BuildCard<RareGemCard>(); CustomCard.BuildCard<GachaAddictCard>(); CustomCard.BuildCard<LaserSightCard>(); CustomCard.BuildCard<ClappingCheeksCard>(); CustomCard.BuildCard<PatrickCard>(); CustomCard.BuildCard<TortoiseCard>(); CustomCard.BuildCard<SpeedColaCard>(); CustomCard.BuildCard<DoubleTapCard>(); CustomCard.BuildCard<QuickReviveCard>(); CustomCard.BuildCard<DeadshotDaiquiriCard>(); CustomCard.BuildCard<ElectricCherryCard>(); CustomCard.BuildCard<PhdFlopperCard>(); CustomCard.BuildCard<VultureAidCard>(); CustomCard.BuildCard<ExtendoArmoCard>(); CustomCard.BuildCard<MagikarpCard>(); CustomCard.BuildCard<KirbyCard>(); CustomCard.BuildCard<PokeballCard>(); CustomCard.BuildCard<ReverseThrusterCard>(); CustomCard.BuildCard<DownThrusterCard>(); CustomCard.BuildCard<PushPullThrusterCard>(); CustomCard.BuildCard<MenaceCard>(); CustomCard.BuildCard<PikminCard>(); CustomCard.BuildCard<FalconPunchCard>(); CustomCard.BuildCard<OzempicCard>(); CustomCard.BuildCard<MethCard>(); CustomCard.BuildCard<SuccubusCard>(); CustomCard.BuildCard<EncoreCard>(); CustomCard.BuildCard<LotteryCard>(); CustomCard.BuildCard<IronLungsCard>(); CustomCard.BuildCard<ExpelliarmusCard>(); CustomCard.BuildCard<SpiderCard>(); CustomCard.BuildCard<CardSharkCard>(); CustomCard.BuildCard<BlackMarketCard>(); CustomCard.BuildCard<MirrorMatchCard>(); CustomCard.BuildCard<SecretSantaCard>(); CustomCard.BuildCard<RasputiaCard>(); CustomCard.BuildCard<GremlinCard>(); CustomCard.BuildCard<StupefyCard>(); CustomCard.BuildCard<DepulsoCard>(); CustomCard.BuildCard<ConfundoCard>(); CustomCard.BuildCard<IncendioCard>(); CustomCard.BuildCard<SectumsempraCard>(); CustomCard.BuildCard<AvadaKedavraCard>(); CustomCard.BuildCard<ProtegoCard>(); CustomCard.BuildCard<LevicorpusCard>(); CustomCard.BuildCard<RictusempraCard>(); CustomCard.BuildCard<ExpectoPatronumCard>(); CustomCard.BuildCard<ImperioCard>(); CustomCard.BuildCard<CrucioCard>(); CustomCard.BuildCard<OppugnoCard>(); CustomCard.BuildCard<SortingHatCard>(); CustomCard.BuildCard<ElderWandCard>(); CustomCard.BuildCard<MaxAmmoCard>(); CustomCard.BuildCard<ChimkenCard>(); CustomCard.BuildCard<WolverineCard>(); CustomCard.BuildCard<ForceChokeCard>(); CustomCard.BuildCard<MoleCard>(); CustomCard.BuildCard<SuperStarCard>(); CustomCard.BuildCard<BreacherCard>(); CustomCard.BuildCard<THCLacedBulletsCard>(); CustomCard.BuildCard<GiveItToMeCard>(); CustomCard.BuildCard<AceCard>(); CustomCard.BuildCard<FunSizeCard>(); CustomCard.BuildCard<CountDownCard>(); CustomCard.BuildCard<GarlicRoundsCard>(); CustomCard.BuildCard<DividendCard>(); CustomCard.BuildCard<SecondWindCard>(); CustomCard.BuildCard<HoarderCard>(); CustomCard.BuildCard<BowledOverCard>(); CustomCard.BuildCard<CursedGunCard>(); CustomCard.BuildCard<RagdollRoundsCard>(); CustomCard.BuildCard<HydraCard>(); CustomCard.BuildCard<GluttonCard>(); CustomCard.BuildCard<DeckBuilderCard>(); CustomCard.BuildCard<PackRatCard>(); CustomCard.BuildCard<RubberBandCard>(); CustomCard.BuildCard<PetrificusTotalusCard>(); CustomCard.BuildCard<SixthSenseCard>(); CustomCard.BuildCard<PhoenixWingsCard>(); CustomCard.BuildCard<FiringSquadCard>(); CustomCard.BuildCard<BlurpBlurpCard>(); CustomCard.BuildCard<RailgunCard>(); CustomCard.BuildCard<IronWallCard>(); CustomCard.BuildCard<ShockAbsorberCard>(); CustomCard.BuildCard<SoftShellCard>(); CustomCard.BuildCard<ShieldsDownCard>(); CustomCard.BuildCard<DemigodCard>(); CustomCard.BuildCard<RecoilKickCard>(); CustomCard.BuildCard<StaticShockCard>(); CustomCard.BuildCard<NapTimeCard>(); CustomCard.BuildCard<MagnetRoundsCard>(); CustomCard.BuildCard<BlackHoleRoundsCard>(); CustomCard.BuildCard<BulletHellCard>(); CustomCard.BuildCard<RepulsorRoundsCard>(); CustomCard.BuildCard<SawShotCard>(); CustomCard.BuildCard<ExoticGemCard>(); CustomCard.BuildCard<ContrabandCard>(); CustomCard.BuildCard<SummonsCard>(); CustomCard.BuildCard<SummonDragonCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonFairyCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonRobotCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonPuppyCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonFrogCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonBatCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonGhostCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonCatCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonChickenCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonRockCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonHornetCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonEvilEyeCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonRavenCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonUfoCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonTerraprismaCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<SummonMirrorCard>((Action<CardInfo>)SummonList.Add); CustomCard.BuildCard<PoltergeistCard>(); CustomCard.BuildCard<BoomerangRoundsCard>(); CustomCard.BuildCard<MeatYeetCard>(); CustomCard.BuildCard<StalkerRoundsCard>(); CustomCard.BuildCard<NokiaCard>(); CustomCard.BuildCard<EmotionalDamageCard>(); CustomCard.BuildCard<GottaGoFastCard>(); } } } namespace ZenCards.Effects { public class TurtleShell : BlockAbility { public const float CooldownSeconds = 8f; public const float MaxTime = 5f; public const float HoldToActivate = 0.5f; public const float Thorns = 0.33f; private float held; internal static readonly Color Green = new Color(0.35f, 0.75f, 0.3f, 1f); internal bool inShell; private float shellTime; private bool exitSent; private SpriteRenderer shell; private float MaxShell => 5f * ((base.Stacks >= 2) ? 1.5f : 1f); protected override float BaseCooldown => 8f; protected override Color PipColor => Green; internal static bool IsShelled(Player p) { if ((Object)(object)p == (Object)null) { return false; } TurtleShell[] componentsInChildren = ((Component)p).GetComponentsInChildren<TurtleShell>(); if (componentsInChildren.Length != 0) { return componentsInChildren[0].inShell; } return false; } protected override bool OnBlockOwner() { return false; } [UnboundRPC] private static void RPCA_Shell(int playerId, bool enter) { Player val = ZenUtil.GetPlayer(playerId); TurtleShell[] array = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponentsInChildren<TurtleShell>() : null); if (array != null && array.Length != 0) { if (enter) { array[0].Enter(); } else { array[0].Exit(); } } } private void Enter() { //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_0047: 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) inShell = true; shellTime = 0f; exitSent = false; if ((Object)(object)shell == (Object)null) { shell = ZenSprites.MakeSprite("Zen_TurtleShell", ZenSprites.Load("Spr_Shell.png", 3.6f), ((Component)player).transform.position, Color.white, 16); } ZenFx.Puff(((Component)player).transform.position, Green, 8, 5f, 0.2f, 0.4f); } private void Exit() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (inShell) { inShell = false; if (ZenUtil.IsMine(player)) { cooldownLeft = base.Cooldown; } if ((Object)(object)shell != (Object)null) { Object.Destroy((Object)(object)((Component)shell).gameObject); } if ((Object)(object)player != (Object)null) { ZenFx.Puff(((Component)player).transform.position, Green, 6, 4f, 0.2f, 0.3f); } } } protected override void Update() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) base.Update(); if ((Object)(object)player == (Object)null) { return; } if (!inShell) { bool flag = ZenUtil.IsMine(player) && ZenUtil.IsActive(player) && player.data.playerActions != null && ((OneAxisInputControl)player.data.playerActions.Block).IsPressed; held = (flag ? (held + Time.deltaTime) : 0f); if (held >= 0.5f && base.Ready) { held = 0f; NetworkingManager.RPC(typeof(TurtleShell), "RPCA_Shell", new object[2] { player.playerID, true }); } return; } shellTime += Time.deltaTime; Traverse obj = Traverse.Create((object)player.data.playerVel).Field("velocity"); Vector2 value = obj.GetValue<Vector2>(); obj.SetValue((object)new Vector2(0f, Mathf.Min(value.y, 0f))); if ((Object)(object)shell != (Object)null) { float num = Mathf.Max(0.6f, ((Component)player).transform.localScale.x); ((Component)shell).transform.position = ((Component)player).transform.position + Vector3.up * 0.49f * num; ((Component)shell).transform.localScale = new Vector3(num, num * (1f + Mathf.Sin(shellTime * 6f) * 0.03f), 1f); ((Component)shell).transform.rotation = Quaternion.Euler(0f, 0f, Mathf.Sin(shellTime * 3f) * 4f); } if (ZenUtil.IsMine(player) && !exitSent && (player.data.playerActions == null || !((OneAxisInputControl)player.data.playerActions.Block).IsPressed || shellTime >= MaxShell || !ZenUtil.IsActive(player))) { exitSent = true; NetworkingManager.RPC(typeof(TurtleShell), "RPCA_Shell", new object[2] { player.playerID, false }); } } protected override void ResetSpawns() { inShell = false; if ((Object)(object)shell != (Object)null) { Object.Destroy((Object)(object)((Component)shell).gameObject); } } } [HarmonyPatch(typeof(HealthHandler), "DoDamage", new Type[] { typeof(Vector2), typeof(Vector2), typeof(Color), typeof(GameObject), typeof(Player), typeof(bool), typeof(bool), typeof(bool) })] internal static class TurtleShellDamagePatch { [ThreadStatic] private static bool reflecting; private static bool Prefix(HealthHandler __instance, Vector2 damage, Player damagingPlayer) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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) Player component = ((Component)__instance).GetComponent<Player>(); if ((Object)(object)component != (Object)null && Creamy.Seated.Contains(component.playerID)) { return false; } if (!TurtleShell.IsShelled(component)) { return true; } if (!reflecting && (Object)(object)damagingPlayer != (Object)null && (Object)(object)damagingPlayer != (Object)(object)component && damagingPlayer.teamID != component.teamID && ZenUtil.IsActive(damagingPlayer) && ((Vector2)(ref damage)).magnitude > 0.01f) { reflecting = true; try { Vector2 val = -damage * 0.33f; damagingPlayer.data.healthHandler.DoDamage(val, Vector2.op_Implicit(((Component)damagingPlayer).transform.position), TurtleShell.Green, (GameObject)null, component, false, true, true); } finally { reflecting = false; } } return false; } } [HarmonyPatch(typeof(Gun), "Attack")] internal static class TurtleShellGunPatch { private static bool Prefix(Gun __instance, ref bool __result) { Player player = __instance.player; if (!TurtleShell.IsShelled(player) && ((Object)(object)player == (Object)null || !ZenUtil.NoShoot.Contains(player.playerID))) { return true; } __result = false; return false; } } public class Ufo : StackingEffect { public const float GravityMult = 0.25f; public const float MaxTimeAboveMap = 4f; private Player owner; private OutOfBoundsHandler oob; private float aboveTime; private SpriteRenderer saucer; private float t; private void Start() { owner = ((Component)this).GetComponentInParent<Player>(); } private OutOfBoundsHandler FindBorder() { if ((Object)(object)oob != (Object)null) { return oob; } OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>(); foreach (OutOfBoundsHandler val in array) { CharacterData value = Traverse.Create((object)val).Field("data").GetValue<CharacterData>(); if ((Object)(object)value != (Object)null && (Object)(object)owner != (Object)null && (Object)(object)value == (Object)(object)owner.data) { oob = val; break; } } return oob; } private void Update() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0154: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null) { return; } t += Time.deltaTime; if ((Object)(object)saucer == (Object)null) { saucer = ZenSprites.MakeSprite("Zen_Saucer", ZenSprites.Load("Spr_Saucer.png", 2.6f), ((Component)owner).transform.position, Color.white, 14); } float num = Mathf.Max(0.6f, ((Component)owner).transform.localScale.x); ((Component)saucer).transform.position = ((Component)owner).transform.position + Vector3.down * (0.75f * num) + Vector3.up * Mathf.Sin(t * 4f) * 0.05f; ((Component)saucer).transform.localScale = new Vector3(num, num, 1f); ((Component)saucer).transform.rotation = Quaternion.Euler(0f, 0f, Mathf.Sin(t * 2.5f) * 5f); OutOfBoundsHandler val = FindBorder(); if (!((Object)(object)val == (Object)null)) { Vector3 val2 = OutOfBoundsHandlerExtensions.BoundsPointFromWorldPosition(val, ((Component)owner).transform.position); bool flag = val2.x <= 0f || val2.x >= 1f || val2.y <= 0f; if (val2.y > 1f && !flag) { aboveTime += Time.deltaTime; } else { aboveTime = 0f; } ((Behaviour)val).enabled = flag || aboveTime > 4f; } } private void OnDisable() { if ((Object)(object)oob != (Object)null) { ((Behaviour)oob).enabled = true; } if ((Object)(object)saucer != (Object)null) { Object.Destroy((Object)(object)((Component)saucer).gameObject); } } private void OnDestroy() { if ((Object)(object)oob != (Object)null) { ((Behaviour)oob).enabled = true; } if ((Object)(object)saucer != (Object)null) { Object.Destroy((Object)(object)((Component)saucer).gameObject); } } internal static void Equip(Player player, Gravity gravity) { InAirJumpEffect obj = ((Component)player).gameObject.GetComponent<InAirJumpEffect>() ?? ((Component)player).gameObject.AddComponent<InAirJumpEffect>(); obj.SetJumpMult(0.12f); obj.AddJumps(10000f); obj.SetCostPerJump(1f); obj.SetContinuousTrigger(true); obj.SetResetOnWallGrab(true); obj.SetInterval(0.08f); } internal static void Unequip(Player player, Gravity gravity) { InAirJumpEffect component = ((Component)player).gameObject.GetComponent<InAirJumpEffect>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } } } public static class AmmoGamble { public const int Min = 3; public const int Max = 10; private static readonly Dictionary<int, Stack<int>> rolls = new Dictionary<int, Stack<int>>(); private static readonly Dictionary<int, int> pending = new Dictionary<int, int>(); private static bool registered; public static void Add(Player player, GunAmmo ammo) { int num = PlayerManager.instance.players.Sum((Player p) => ((Object)(object)p != (Object)null && p.data.currentCards != null) ? p.data.currentCards.Count : 0); int num2 = new Random(player.playerID * 7919 + num * 104729 + 12345).Next(3, 11); ammo.maxAmmo += num2; if (!rolls.TryGetValue(player.playerID, out var value)) { value = (rolls[player.playerID] = new Stack<int>()); } value.Push(num2); try { Traverse.Create((object)ammo).Method("ReDrawTotalBullets", Array.Empty<object>()).GetValue(); } catch { } pending.TryGetValue(player.playerID, out var value2); pending[player.playerID] = value2 + num2; } public static void Register() { if (!registered) { registered = true; GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)OnPointStart); } } private static IEnumerator OnPointStart(IGameModeHandler gm) { if (pending.Count > 0) { ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)Plugin.Instance, 1f, (Action)ShowPending); } yield break; } private static void ShowPending() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair<int, int> item in pending.ToList()) { Player player = ZenUtil.GetPlayer(item.Key); if (!((Object)(object)player == (Object)null) && ZenUtil.IsActive(player)) { float num = Mathf.Max(0.7f, ((Component)player).transform.localScale.x); ZenFx.FloatText("+" + item.Value + " Bullets", ((Component)player).transform.position + Vector3.up * (1.8f * num + 0.6f), new Color(1f, 0.85f, 0.25f, 1f), 1.1f, 2.5f); pending.Remove(item.Key); } } } public static void Remove(Player player, GunAmmo ammo) { if (rolls.TryGetValue(player.playerID, out var value) && value.Count > 0) { ammo.maxAmmo = Mathf.Max(1, ammo.maxAmmo - value.Pop()); } } } public class CorkscrewRound : BulletMod, IStraightShot { public const float Amplitude = 0.4f; public const float Frequency = 55f; private Vector2 origin; private Vector2 dir; private Vector2 side; private Transform tf; protected override void OnBulletStart() { //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_0024: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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) dir = CrosshairDirection(); side = new Vector2(0f - dir.y, dir.x); move.gravity = 0f; move.velocity = Vector2.op_Implicit(dir * startSpeed); tf = bullet.transform; SnapToLine(dir); origin = Vector2.op_Implicit(tf.position); } private void LateUpdate() { //IL_001e: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) if (base.Live && !((Object)(object)tf == (Object)null)) { move.velocity = Vector2.op_Implicit(dir * startSpeed); Vector2 val = origin + dir * startSpeed * age + side * 0.4f * Mathf.Sin(age * 55f); tf.position = new Vector3(val.x, val.y, tf.position.z); } } } public class TumbleweedRound : BulletMod { protected override void OnBulletUpdate() { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.op_Implicit(move.velocity); if (!(((Vector2)(ref val)).sqrMagnitude < 0.01f)) { Vector2 val2 = Vector2.op_Implicit(bullet.transform.position); float num = ((Vector2)(ref val)).magnitude * Time.deltaTime * 1.5f + 0.3f; RaycastHit2D val3 = Physics2D.Raycast(val2, ((Vector2)(ref val)).normalized, num, ZenUtil.GroundMask); if (!((Object)(object)((RaycastHit2D)(ref val3)).collider == (Object)null) && !(((RaycastHit2D)(ref val3)).normal.y < 0.6f) && !((Object)(object)((Component)((RaycastHit2D)(ref val3)).collider).GetComponentInParent<Player>() != (Object)null)) { GameObject val4 = new GameObject("Zen_Tumbleweed"); val4.transform.SetParent(ZenSprites.Root, false); val4.AddComponent<TumbleweedRoller>().Init(shooter, ((RaycastHit2D)(ref val3)).point + ((RaycastHit2D)(ref val3)).normal * 0.45f, (val.x >= 0f) ? 1f : (-1f)); Kill(); } } } } public class TumbleweedRoller : MonoBehaviour { public const float Radius = 0.45f; public const float Speed = 9f; public const float Life = 3.5f; public const float DamageFactor = 0.6f; public const float RehitDelay = 0.6f; public const float KnockSpeed = 140f; public const float KnockUp = 30f; private Player owner; private float dirX; private float age; private float vy; private float damage; private SpriteRenderer sr; private readonly Dictionary<int, float> lastHit = new Dictionary<int, float>(); [UnboundRPC] private static void RPCA_Bump(int victimId, float dx) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) Player player = ZenUtil.GetPlayer(victimId); if (!((Object)(object)player == (Object)null)) { ZenFx.Puff(((Component)player).transform.position, new Color(0.8f, 0.7f, 0.5f), 6, 5f, 0.15f, 0.4f); if (ZenUtil.IsMine(player)) { ZenUtil.Knock(player, new Vector2(Mathf.Sign(dx), 0f) * 140f + Vector2.up * 30f); } } } public void Init(Player o, Vector2 at, float dx) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0047: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) owner = o; dirX = dx; ((Component)this).transform.position = Vector2.op_Implicit(at); damage = ZenUtil.BulletDamage(o) * 0.6f; sr = ZenSprites.MakeSprite("Zen_TumbleweedSprite", ZenSprites.Load("Spr_Tumbleweed.png", 1.08f), Vector2.op_Implicit(at), Color.white, 14); ((Component)sr).transform.SetParent(((Component)this).transform, true); ZenFx.Puff(Vector2.op_Implicit(at), new Color(0.8f, 0.7f, 0.5f), 6, 3f, 0.15f, 0.4f); } private void Update() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } age += Time.deltaTime; if (age > 3.5f) { ZenFx.Puff(((Component)this).transform.position, new Color(0.8f, 0.7f, 0.5f), 8, 4f, 0.15f, 0.4f); Object.Destroy((Object)(object)((Component)this).gameObject); return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); float deltaTime = Time.deltaTime; RaycastHit2D val2 = Physics2D.Raycast(val, new Vector2(dirX, 0f), 0.45f + 9f * deltaTime + 0.05f, ZenUtil.GroundMask); if ((Object)(object)((RaycastHit2D)(ref val2)).collider != (Object)null) { dirX = 0f - dirX; } val.x += dirX * 9f * deltaTime; RaycastHit2D val3 = Physics2D.Raycast(val + Vector2.up * 0.5f, Vector2.down, 1.35f, ZenUtil.GroundMask); if ((Object)(object)((RaycastHit2D)(ref val3)).collider != (Object)null && vy <= 0f) { val.y = ((RaycastHit2D)(ref val3)).point.y + 0.45f; vy = ((Mathf.Abs(Mathf.Sin(age * 7f)) > 0.97f) ? 6f : 0f); } else { vy -= 30f * deltaTime; val.y += vy * deltaTime; } ((Component)this).transform.position = Vector2.op_Implicit(val); if ((Object)(object)sr != (Object)null) { ((Component)sr).transform.position = Vector2.op_Implicit(val); ((Component)sr).transform.Rotate(0f, 0f, (0f - dirX) * 9f / 0.45f * 57.29578f * deltaTime); sr.color = new Color(1f, 1f, 1f, Mathf.Clamp01((3.5f - age) * 3f)); } if (!ZenUtil.IsMine(owner)) { return; } foreach (Player item in ZenUtil.Enemies(owner, val, 3f, needSight: false)) { if ((!lastHit.TryGetValue(item.playerID, out var value) || !(age - value < 0.6f)) && !(Vector2.Distance(val, Vector2.op_Implicit(((Component)item).transform.position)) > ZenUtil.HitRadius(item) + 0.45f)) { lastHit[item.playerID] = age; ZenUtil.Damage(owner, item, damage, new Vector2(dirX, 0.4f)); NetworkingManager.RPC(typeof(TumbleweedRoller), "RPCA_Bump", new object[2] { item.playerID, dirX }); } } } } public class DuckRound : BulletMod { public const float Size = 1.8f; public const float Life = 6f; private float life = 6f; private Transform duck; private float dirX = 1f; private bool usingCopy; private Transform probe; private static GameObject sneakyTemplate; private static bool searched; private const float RayLength = 3f; private const float RayUp = 0.3f; private const float Force = 5f; private static GameObject SneakyTemplate() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)sneakyTemplate != (Object)null || searched) { return sneakyTemplate; } searched = true; try { DodgeGround[] array = Resources.FindObjectsOfTypeAll<DodgeGround>(); foreach (DodgeGround val in array) { if (!((Object)(object)val == (Object)null)) { Scene scene = ((Component)val).gameObject.scene; if (!((Scene)(ref scene)).IsValid()) { sneakyTemplate = ((Component)val).gameObject; break; } } } } catch { } return sneakyTemplate; } protected override void OnBulletStart() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) KeepAlive(); float worldWidth = 1.8f * ((base.Copies >= 2) ? 1.5f : 1f); if (base.Copies >= 2) { life = 9f; } SpriteRenderer val = ZenSprites.MakeSprite("Zen_Duck", ZenSprites.Load("Spr_Duck.png", worldWidth), bullet.transform.position, Color.white, 15); duck = ((Component)val).transform; duck.SetParent(((Component)this).transform, true); HideDefaultVisuals(duck); Vector2 val2 = Vector2.op_Implicit(move.velocity); dirX = ((val2.x >= 0f) ? 1f : (-1f)); if (!((Object)(object)bullet.GetComponentInChildren<DodgeGround>() != (Object)null)) { GameObject val3 = SneakyTemplate(); if ((Object)(object)val3 != (Object)null) { ((Object)Object.Instantiate<GameObject>(val3, bullet.transform.position, bullet.transform.rotation, bullet.transform)).name = "Zen_DuckSneaky"; } else { usingCopy = true; } } } protected override void OnBulletUpdate() { //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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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) //IL_00c5: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if (age > life) { Kill(); return; } if (usingCopy) { DodgeGroundCopy(); } Vector2 val = Vector2.op_Implicit(move.velocity); if (Mathf.Abs(val.x) > 0.5f) { dirX = Mathf.Sign(val.x); } if ((Object)(object)duck != (Object)null) { duck.position = bullet.transform.position; duck.rotation = Quaternion.Euler(0f, 0f, Mathf.Sin(age * 6f + 1f) * 10f); Vector3 localScale = duck.localScale; duck.localScale = new Vector3(Mathf.Abs(localScale.x) * dirX, Mathf.Abs(localScale.y), 1f); } } private void DodgeGroundCopy() { //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_005a: 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) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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) Vector2 val = Vector2.op_Implicit(move.velocity); float magnitude = ((Vector2)(ref val)).magnitude; if (magnitude < 0.01f) { return; } Vector2 val2 = val / magnitude; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(val2.y, 0f - val2.x); Vector2 val4 = Vector2.op_Implicit(bullet.transform.position); RaycastHit2D h = Physics2D.Raycast(val4 + val3 * 0.3f, val2, 3f, ZenUtil.GroundMask); RaycastHit2D h2 = Physics2D.Raycast(val4 - val3 * 0.3f, val2, 3f, ZenUtil.GroundMask); bool flag = Solid(h); bool flag2 = Solid(h2); if (flag && flag2 && (Object)(object)((RaycastHit2D)(ref h)).transform == (Object)(object)((RaycastHit2D)(ref h2)).transform) { if (((RaycastHit2D)(ref h)).distance < ((RaycastHit2D)(ref h2)).distance) { flag2 = false; } else { flag = false; } } if (flag) { val += ((RaycastHit2D)(ref h)).normal * 5f * magnitude * Time.deltaTime; } if (flag2) { val += ((RaycastHit2D)(ref h2)).normal * 5f * magnitude * Time.deltaTime; } move.velocity = Vector2.op_Implicit(((Vector2)(ref val)).normalized * magnitude); } private static bool Solid(RaycastHit2D h) { if ((Object)(object)((RaycastHit2D)(ref h)).collider != (Object)null && (Object)(object)((Component)((RaycastHit2D)(ref h)).collider).GetComponent<Damagable>() == (Object)null) { return ((Component)((RaycastHit2D)(ref h)).transform).gameObject.layer != 10; } return false; } } public class YugeRound : BulletMod { public class Marker : MonoBehaviour { } public const float Scale = 4f; private RayCastTrail hitbox; private bool grown; internal static bool IsOwnTrail(GameObject bullet, Transform t) { Transform val = t; while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)bullet.transform) { if (((Object)val).name.Contains("(Clone)") || ((Object)val).name.StartsWith("Zen_")) { return false; } val = val.parent; } return true; } internal static float ScaleOf(GameObject bullet) { if (!((Object)(object)bullet != (Object)null) || !((Object)(object)bullet.GetComponent<Marker>() != (Object)null)) { return 1f; } return 4f; } protected override void OnBulletStart() { if ((Object)(object)bullet.GetComponent<Marker>() != (Object)null) { return; } bullet.AddComponent<Marker>(); TrailRenderer[] componentsInChildren = bullet.GetComponentsInChildren<TrailRenderer>(true); foreach (TrailRenderer val in componentsInChildren) { if (IsOwnTrail(bullet, ((Component)val).transform)) { val.startWidth *= 4f; val.endWidth *= 4f; } } hitbox = bullet.GetComponentInChildren<RayCastTrail>(); } protected override void OnBulletUpdate() { if (!grown && !((Object)(object)hitbox == (Object)null)) { grown = true; RayCastTrail obj = hitbox; obj.size *= 4f; } } } public class NerfRound : BulletMod { private Transform dart; protected override void OnBulletStart() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) SpriteRenderer val = ZenSprites.MakeSprite("Zen_NerfDart", ZenSprites.Load("Spr_NerfDart.png", 1.875f), bullet.transform.position, Color.white, 15); dart = ((Component)val).transform; dart.SetParent(((Component)this).transform, true); HideDefaultVisuals(dart); } protected override void OnBulletUpdate() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)dart == (Object)null)) { dart.position = bullet.transform.position; Vector2 val = Vector2.op_Implicit(move.velocity); if (((Vector2)(ref val)).sqrMagnitude > 0.01f) { dart.rotation = Quaternion.Euler(0f, 0f, Mathf.Atan2(val.y, val.x) * 57.29578f); } } } } public class Seraph : KeyAbility { public const float RiseTime = 1.3f; public const float ChargeTime = 3f; public const float CooldownSeconds = 15f; public const int EyesPerExtraCopy = 2; public const int Eyes = 5; public const float EyeDamageFactor = 1f; public const float EyeSpeed = 11f; public const float EyeTurn = 95f; public const float EyeLife = 5f; internal static readonly Color Holy = new Color(1f, 0.92f, 0.55f, 1f); protected override KeyCode Key => Plugin.SeraphKey.Value; protected override float BaseCooldown => 15f; protected override Color PipColor => Holy; internal int EyeCount => 5 + 2 * Mathf.Max(0, base.Stacks - 1); protected override bool OnActivateOwner() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ZenUtil.GetEffect<SeraphFx>(player) != (Object)null) { return false; } Vector2 val = OpenSpotNearCenter(player); NetworkingManager.RPC(typeof(Seraph), "RPCA_Ascend", new object[3] { player.playerID, val.x, val.y }); return true; } private static Vector2 OpenSpotNearCenter(Player p) { //IL_0000: 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) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.zero; if (ZenUtil.ScreenBounds(out var min, out var max)) { val = (min + max) * 0.5f; } float num = ZenUtil.HitRadius(p) + 1.2f; for (float num2 = 0f; num2 < 14f; num2 += 0.75f) { int num3 = ((num2 == 0f) ? 1 : 16); for (int i = 0; i < num3; i++) { float num4 = (float)i * (float)Math.PI * 2f / (float)num3; Vector2 val2 = val + new Vector2(Mathf.Cos(num4), Mathf.Sin(num4)) * num2; Collider2D[] array = Physics2D.OverlapCircleAll(val2, num, ZenUtil.GroundMask); if (array == null || !array.Any((Collider2D h) => (Object)(object)h != (Object)null && (Object)(object)((Component)h).GetComponentInParent<Player>() == (Object)null)) { return val2; } } } return val; } [UnboundRPC] private static void RPCA_Ascend(int ownerId, float x, float y) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Player val = ZenUtil.GetPlayer(ownerId); if (!((Object)(object)val == (Object)null)) { GameObject val2 = new GameObject("Zen_Seraph"); val2.transform.SetParent(ZenSprites.Root, false); val2.AddComponent<SeraphFx>().Init(val, new Vector2(x, y)); } } [UnboundRPC] private static void RPCA_Release(int ownerId, string targetIds, float damage) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) Player val = ZenUtil.GetPlayer(ownerId); if (!((Object)(object)val == (Object)null)) { int[] array = (from x in targetIds.Split(new char[1] { ',' }) where x.Length > 0 select x).Select(int.Parse).ToArray(); int num = array.Length; Vector2 val2 = Vector2.op_Implicit(((Component)val).transform.position); float num2 = ((num <= 5) ? 38f : (152f / (float)(num - 1))); for (int num3 = 0; num3 < num; num3++) { float num4 = (90f + ((float)num3 - (float)(num - 1) * 0.5f) * num2) * ((float)Math.PI / 180f); ((Component)ZenSprites.MakeSprite("Zen_SeraphEye", ZenSprites.Load("Spr_Eye.png", 0.9f), Vector2.op_Implicit(val2), Color.white, 17)).gameObject.AddComponent<SeraphEye>().Init(val, ZenUtil.GetPlayer(array[num3]), new Vector2(Mathf.Cos(num4), Mathf.Sin(num4)), damage, num3); } ZenFx.Burst(Vector2.op_Implicit(val2), Holy, 1f, 9f, 0.5f); ZenFx.Burst(Vector2.op_Implicit(val2), Color.white, 0.5f, 5f, 0.3f); } } [UnboundRPC] private static void RPCA_EyeHit(int ownerId, int index) { SeraphEye[] array = Object.FindObjectsOfType<SeraphEye>(); foreach (SeraphEye seraphEye in array) { if ((Object)(object)seraphEye != (Object)null && seraphEye.OwnerId == ownerId && seraphEye.Index == index) { seraphEye.Pop(); } } } internal static void SendRelease(Player owner) { //IL_0021: 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) Seraph effect = ZenUtil.GetEffect<Seraph>(owner); int num = (((Object)(object)effect != (Object)null) ? effect.EyeCount : 5); List<Player> list = ZenUtil.Targets(owner, Vector2.op_Implicit(((Component)owner).transform.position), 9999f, needSight: false).ToList(); string[] array = new string[num]; for (int i = 0; i < num; i++) { array[i] = ((list.Count > 0) ? list[i % list.Count].playerID : (-1)).ToString(); } float num2 = ZenUtil.BulletDamage(owner) * 1f; NetworkingManager.RPC(typeof(Seraph), "RPCA_Release", new object[3] { owner.playerID, string.Join(",", array), num2 }); } internal static void SendEyeHit(Player owner, int index) { NetworkingManager.RPC(typeof(Seraph), "RPCA_EyeHit", new object[2] { owner.playerID, index }); } } public class SeraphFx : MonoBehaviour { private Player owner; private Vector2 start; private Vector2 spot; private float age; private bool released; private SpriteRenderer wings; private SpriteRenderer aura; private SpriteRenderer halo; public void Init(Player o, Vector2 target) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) owner = o; start = Vector2.op_Implicit(((Component)o).transform.position); spot = target; ZenUtil.NoShoot.Add(o.playerID); wings = ZenSprites.MakeSprite("Zen_SeraphWings", ZenSprites.Load("Spr_SeraphWings.png", 5f), Vector2.op_Implicit(start), new Color(1f, 1f, 1f, 0f), 13); aura = ZenSprites.MakeSprite("Zen_SeraphAura", ZenSprites.Circle, Vector2.op_Implicit(start), new Color(1f, 0.9f, 0.5f, 0f), 12); halo = ZenSprites.MakeSprite("Zen_SeraphHalo", ZenSprites.Load("Spr_Halo.png", 1.4f), Vector2.op_Implicit(start), new Color(1f, 1f, 1f, 0f), 18); SpriteRenderer[] array = (SpriteRenderer[])(object)new SpriteRenderer[3] { wings, aura, halo }; for (int i = 0; i < array.Length; i++) { ((Component)array[i]).transform.SetParent(((Component)this).transform, true); } } private void OnDestroy() { if ((Object)(object)owner != (Object)null) { ZenUtil.NoShoot.Remove(owner.playerID); } } private void Update() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null || !ZenUtil.IsActive(owner)) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } age += Time.deltaTime; float num = Mathf.Clamp01(age / 1.3f); float num2 = num * num * (3f - 2f * num); Vector2 val = Vector2.Lerp(start, spot, num2) + Vector2.up * Mathf.Sin(age * 3f) * 0.08f; ZenUtil.Teleport(owner, val); float num3 = Mathf.Clamp01((age - 1.3f) / 3f); float num4 = Mathf.Max(0.6f, ((Component)owner).transform.localScale.x); ((Component)wings).transform.position = Vector2.op_Implicit(val); ((Component)wings).transform.localScale = new Vector3(num4 * (0.4f + num * 0.6f) * (1f + Mathf.Sin(age * 5f) * 0.04f), num4 * (0.4f + num * 0.6f), 1f); wings.color = new Color(1f, 1f, 1f, num); ((Component)aura).transform.position = Vector2.op_Implicit(val); float num5 = 1.5f + num3 * 9f; ((Component)aura).transform.localScale = new Vector3(num5, num5, 1f); aura.color = new Color(1f, 0.9f, 0.5f, 0.15f + num3 * 0.35f + Mathf.Sin(age * 10f) * 0.05f); ((Component)halo).transform.position = Vector2.op_Implicit(val + Vector2.up * (1.1f * num4)); halo.color = new Color(1f, 1f, 1f, num); if (num3 > 0f && Random.value < 0.25f) { ZenFx.Puff(Vector2.op_Implicit(val + Random.insideUnitCircle * num5 * 0.5f), Seraph.Holy, 1, 1.5f, 0.12f, 0.6f); } if (!released && age >= 4.3f) { released = true; if (ZenUtil.IsMine(owner)) { Seraph.SendRelease(owner); } Object.Destroy((Object)(object)((Component)this).gameObject, 0.3f); } } } public class SeraphEye : MonoBehaviour { internal int OwnerId; internal int Index; private Player owner; private Player target; private Vector2 vel; private float age; private float damage; private bool popped; public void Init(Player o, Player t, Vector2 dir, float dmg, int index) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_00a6: Unknown result type (might be due to invalid IL or missing references) owner = o; target = t; vel = dir * 11f; damage = dmg; OwnerId = o.playerID; Index = index; TrailRenderer obj = ((Component)this).gameObject.AddComponent<TrailRenderer>(); ((Renderer)obj).material = ZenSprites.LineMaterial; obj.time = 0.25f; obj.startWidth = 0.45f; obj.endWidth = 0f; obj.startColor = new Color(1f, 0.9f, 0.5f, 0.8f); obj.endColor = new Color(1f, 0.9f, 0.5f, 0f); ((Renderer)obj).sortingLayerName = "MostFront"; ((Renderer)obj).sortingOrder = 16; } public void Pop() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (!popped) { popped = true; ZenFx.Burst(((Component)this).transform.position, Seraph.Holy, 0.3f, 2f, 0.25f); Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Update() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0133: 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_018c: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)owner == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } age += Time.deltaTime; if (age > 5f) { Pop(); return; } Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); if (age > 0.35f && (Object)(object)target != (Object)null && ZenUtil.IsActive(target)) { Vector2 val2 = Vector2.op_Implicit(((Component)target).transform.position) - val; float num = Mathf.Atan2(vel.y, vel.x) * 57.29578f; float num2 = Mathf.Atan2(val2.y, val2.x) * 57.29578f; float num3 = Mathf.MoveTowardsAngle(num, num2, 95f * Time.deltaTime) * ((float)Math.PI / 180f); vel = new Vector2(Mathf.Cos(num3), Mathf.Sin(num3)) * 11f; } Vector2 val3 = vel * Time.deltaTime; val += val3; ((Component)this).transform.position = Vector2.op_Implicit(val); ((Component)this).transform.rotation = Quaternion.Euler(0f, 0f, Mathf.Atan2(vel.y, vel.x) * 57.29578f); if (!ZenUtil.IsMine(owner)) { return; } foreach (Player item in ZenUtil.Enemies(owner, val, 3f, needSight: false)) { if (!(Vector2.Distance(val, Vector2.op_Implicit(((Component)item).transform.position)) > ZenUtil.HitRadius(item) + 0.35f)) { ZenUtil.Damage(owner, item, damage, vel); Seraph.SendEyeHit(owner, Index); Pop(); break; } } } } public static class BlockThief { private static readonly Dictionary<int, int> gained = new Dictionary<int, int>(); public static void Steal(Player me) { List<Player> list = (from p in PlayerManager.instance.players where (Object)(object)p != (Object)null && p.teamID != me.teamID && p.data.block.additionalBlocks > 0 orderby p.playerID select p).ToList(); if (list.Count > 0) { int num = PlayerManager.instance.players.Sum((Player p) => ((Object)(object)p != (Object)null && p.data.currentCards != null) ? p.data.currentCards.Count : 0); Random random = new Random(me.playerID * 31337 + num * 7919 + 4242); Block block = list[random.Next(list.Count)].data.block; block.additionalBlocks--; } Block block2 = me.data.block; block2.additionalBlocks++; gained.TryGetValue(me.playerID, out var value); gained[me.playerID] = value + 1; } public static void Undo(Player me) { if (gained.TryGetValue(me.playerID, out var value) && value > 0) { gained[me.playerID] = value - 1; me.data.block.additionalBlocks = Mathf.Max(0, me.data.block.additionalBlocks - 1); } } } public class ClamSlam : BlockAbility { public const float CooldownSeconds = 4f; public const float FallSpeed = 70f; public const float MinHeight = 4f; public const float MaxHeight = 15f; public const float FullRadius = 2f; public const float Radius = 5.25f; public const float Falloff = 0.3076923f; public const float RecoverTime = 0.4f; internal static readonly Color Pearl = new Color(0.95f, 0.9f, 1f, 1f); protected override float BaseCooldown => 4f; protected override Color PipColor => Pearl; protected override bool OnBlockOwner() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (player.data.isGrounded) { return false; } if (Object.FindObjectsOfType<ClamFx>().Any((ClamFx f) => (Object)(object)f != (Object)null && (Object)(object)f.Owner == (Object)(object)player)) { return false; } NetworkingManager.RPC(typeof(ClamSlam), "RPCA_Clam", new object[2] { player.playerID, ((Component)player).transform.position.y }); return true; } [UnboundRPC] private static void RPCA_Clam(int playerId, float startY) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Player val = ZenUtil.GetPlayer(playerId); if (!((Object)(object)val == (Object)null)) { GameObject val2 = new GameObject("Zen_Clam"); val2.transform.SetParent(ZenSprites.Root, false); val2.AddComponent<ClamFx>().Init(val, startY); } } [UnboundRPC] private static void RPCA_Slam(int playerId, float x, float y, float damage, float reach) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) Player val = ZenUtil.GetPlayer(playerId); ClamFx[] array = Object.FindObjectsOfType<ClamFx>(); foreach (ClamFx clamFx in array) { if ((Object)(object)clamFx != (Object)null && (Object)(object)clamFx.Owner == (Object)(object)val) { clamFx.Landed(); } } Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(x, y); float num = (((Object)(object)val != (Object)null) ? Mathf.Clamp01(damage / Mathf.Max(1f, val.data.maxHealth)) : 0.5f); ZenFx.Burst(Vector2.op_Implicit(val2), new Color(1f, 1f, 1f, 0.8f), 0.5f, 5.25f * reach * 2f * (0.6f + num * 0.6f)); ZenFx.Puff(Vector2.op_Implicit(val2), new Color(0.85f, 0.8f, 0.7f), 18, 9f + num * 8f, 0.3f, 0.6f); if ((Object)(object)val == (Object)null || !ZenUtil.IsMine(val) || damage <= 0f) { return; } foreach (Player item in ZenUtil.Enemies(val, val2, 5.25f * reach, needSight: false)) { float num2 = Vector2.Distance(val2, Vector2.op_Implicit(((Component)item).transform.position)); float num3 = damage; if (num2 > 2f * reach) { num3 *= 1f - Mathf.Pow((num2 - 2f * reach) * 0.3076923f / reach, 2f); } if (num3 > 0f) { float amount = num3; Vector2 val3 = Vector2.op_Implicit(((Component)item).transform.position) - val2; ZenUtil.Damage(val, item, amount, ((Vector2)(ref val3)).normalized + Vector2.up); } } } internal static void SendSlam(Player p, Vector2 at, float damage) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) ClamSlam effect = ZenUtil.GetEffect<ClamSlam>(p); float num = (((Object)(object)effect != (Object)null && effect.Stacks >= 2) ? 1.5f : 1f); NetworkingManager.RPC(typeof(ClamSlam), "RPCA_Slam", new object[5] { p.playerID, at.x, at.y, damage, num }); } } public class ClamFx : MonoBehaviour { internal Player Owner; private float startY; private float age; private float landedAt = -1f; private bool slamSent; private SpriteRenderer clam; private readonly List<Renderer> hidden = new List<Renderer>(); public void Init(Player p, float y) { //IL_005e: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) Owner = p; startY = y; ZenUtil.NoShoot.Add(p.playerID); Renderer[] componentsInChildren = ((Component)p).GetComponentsInChildren<Renderer>(); foreach (Renderer val in componentsInChildren) { if (val.enabled) { val.enabled = false; hidden.Add(val); } } float num = Mathf.Max(0.6f, ((Component)p).transform.localScale.x); clam = ZenSprites.MakeSprite("Zen_ClamSprite", ZenSprites.Load("Spr_Clam.png", 2.2f * num), ((Component)p).transform.position, Color.white, 15); ((Component)clam).transform.SetParent(((Component)this).transform, true); ZenFx.Puff(((Component)p).transform.position, ClamSlam.Pearl, 8, 4f, 0.2f, 0.3f); } internal void Landed() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!(landedAt >= 0f)) { landedAt = age; Restore(); if ((Object)(object)clam != (Object)null) { SpriteRenderer obj = clam; Bounds bounds = clam.sprite.bounds; obj.sprite = ZenSprites.Load("Spr_ClamOpen.png", ((Bounds)(ref bounds)).size.x); } } } private void Restore() { foreach (Renderer item in hidden) { if ((Object)(object)item != (Object)null) { item.enabled = true; } } hidden.Clear(); if ((Object)(object)Owner != (Object)null) { ZenUtil.NoShoot.Remove(Owner.playerID); } } private void OnDestroy() { Restore(); } private static bool NearBottom(Vector2 pos) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!ZenUtil.ScreenBounds(out var min, out var _)) { return false; } return pos.y <= min.y + 2.5f; } private void Update() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_025c: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Owner == (Object)null || !ZenUtil.IsActive(Owner)) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } age += Time.deltaTime; Vector2 val = Vector2.op_Implicit(((Component)Owner).transform.position); if ((Object)(object)clam != (Object)null) { ((Component)clam).transform.position = Vector2.op_Implicit(val); } if (landedAt < 0f) { bool flag = NearBottom(val); if (!flag) { ZenUtil.SetVelocity(Owner, Vector2.down * 70f); } else { ZenUtil.SetVelocity(Owner, Vector2.zero); } if ((Object)(object)clam != (Object)null) { ((Component)clam).transform.rotation = Quaternion.Euler(0f, 0f, Mathf.Sin(age * 40f) * 4f); } int num; if (!Owner.data.isGrounded) { RaycastHit2D val2 = Physics2D.Raycast(val, Vector2.down, ZenUtil.HitRadius(Owner) + 0.3f, ZenUtil.GroundMask); num = (((Object)(object)((RaycastHit2D)(ref val2)).collider != (Object)null) ? 1 : 0); } else { num = 1; } startY = Mathf.Max(startY, val.y); if (((uint)num | (flag ? 1u : 0u)) != 0 && ZenUtil.IsMine(Owner) && !slamSent) { slamSent = true; float num2 = Mathf.Clamp(startY - val.y, 0f, 15f); float damage = ((num2 < 4f) ? 0f : (Owner.data.health * (num2 / 15f))); ClamSlam.SendSlam(Owner, val, damage); } if (age > 2f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } else { if ((Object)(object)clam != (Object)null) { float num3 = age - landedAt; float num4 = 1f + Mathf.Sin(Mathf.Min(num3, 0.3f) / 0.3f * (float)Math.PI) * 0.3f; ((Component)clam).transform.localScale = new Vector3(num4, 2f - num4, 1f); ((Component)clam).transform.rotation = Quaternion.identity; } if (age - landedAt >= 0.4f) { ZenFx.Puff(Vector2.op_Implicit(val), ClamSlam.Pearl, 8, 4f, 0.2f, 0.3f); Object.Destroy((Object)(object)((Component)this).gameObject); } } } } public class AntiBlock : StackingEffect { public const float PierceFactor = 1.5f; public const float EnemyCooldownMult = 1.25f; internal static readonly Color Red = new Color(1f, 0.3f, 0.15f, 1f); private Player owner; private void Start() { owner = ((Component)this).GetComponentInParent<Player>(); if ((Object)(object)owner != (Object)null) { Apply(owner); } } private static void Apply(Player owner) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown foreach (Player player in PlayerManager.instance.players) { if (!((Object)(object)player == (Object)null) && player.teamID != owner.teamID) { Block block = player.data.block; int num = ((block.additionalBlocks > 0) ? 1 : 0); block.additionalBlocks -= num; block.cdMultiplier *= 1.25f; GameObject val = new GameObject("Zen_AntiBlockMark"); val.transform.SetParent(((Component)player).transform, false); AntiBlockMark antiBlockMark = val.AddComponent<AntiBlockMark>(); antiBlockMark.OwnerId = owner.playerID; antiBlockMark.BlocksTaken = num; player.data.stats.objectsAddedToPlayer.Add(val); } } } internal static void Undo(Player owner) { AntiBlockMark[] array = Object.FindObjectsOfType<AntiBlockMark>(); foreach (AntiBlockMark antiBlockMark in array) { if (!((Object)(object)antiBlockMark == (Object)null) && antiBlockMark.OwnerId == owner.playerID) { Player componentInParent = ((Component)antiBlockMark).GetComponentInParent<Player>(); if ((Object)(object)componentInParent != (Object)null) { Block block = componentInParent.data.block; block.additionalBlocks += antiBlockMark.BlocksTaken; Block block2 = componentInParent.data.block; block2.cdMultiplier /= 1.25f; componentInParent.data.stats.objectsAddedToPlayer.Remove(((Component)antiBlockMark).gameObject); } Object.Destroy((Object)(object)((Component)antiBlockMark).gameObject); } } } } public class AntiBlockMark : MonoBehaviour { public int OwnerId; public int BlocksTaken; } [HarmonyPatch(typeof(Block), "blocked")] internal class AntiBlockPiercePatch { private static void Prefix(Block __instance, GameObject projectile, Vector3 forward, Vector3 hitPos) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)projectile == (Object)null) { return; } ProjectileHit component = projectile.GetComponent<ProjectileHit>(); if (!((Object)(object)component == (Object)null) && !((Object)(object)component.ownPlayer == (Object)null) && !((Object)(object)((Component)component.ownPlayer).GetComponentInChildren<AntiBlock>() == (Object)null)) { HealthHandler value = Traverse.Create((object)__instance).Field("health").GetValue<HealthHandler>(); if (!((Object)(object)value == (Object)null)) { Vector2 val = ((((Vector3)(ref forward)).sqrMagnitude > 0.001f) ? Vector2.op_Implicit(((Vector3)(ref forward)).normalized) : Vector2.up); ((Damagable)value).TakeDamage(val * component.damage * 1.5f, Vector2.op_Implicit(hitPos), AntiBlock.Red, component.ownWeapon, component.ownPlayer, true, true); ZenFx.Burst(hitPos, AntiBlock.Red, 0.3f, 2.2f, 0.25f); Object.Destroy((Object)(object)projectile); } } } } public class PanaceaRegen : StackingEffect { public const float PercentPerSecond = 0.01f; private Player player; private void Start() { player = ((Component)this).GetComponentInParent<Player>(); } private void Update() { if (!((Object)(object)player == (Object)null)) { Gun val = (((Object)(object)player.data.weaponHandler != (Object)null) ? player.data.weaponHandler.gun : null); if ((Object)(object)val != (Object)null && val.reflects != 0) { val.reflects = 0; } if (ZenUtil.IsActive(player) && !(player.data.health >= player.data.maxHealth)) { player.data.healthHandler.Heal(player.data.maxHealth * 0.01f * (float)base.Stacks * Time.deltaTime); } } } } public class Mjolnir : KeyAbility { public const float CooldownSeconds = 5f; public const float DamageFactor = 0.5f; public const float OutSpeed = 32f; public const float BackSpeed = 36f; public const float MaxDistance = 36f; internal static readonly Color Bolt = new Color(0.55f, 0.8f, 1f, 1f); internal static readonly Dictionary<int, MjolnirHammer> Out = new Dictionary<int, MjolnirHammer>(); public const float StrikeRadius = 3.5f; public const float StrikeDamageFactor = 0.5f; public const float StrikeStun = 0.5f; public const float BigStrikeRadius = 4.5f; public const float BigStrikeDamageFactor = 0.75f; protected override KeyCode Key => Plugin.MjolnirKey.Value; protected override float BaseCooldown => 5f; protected override Color PipColor => Bolt; private bool HammerOut { get { if (Out.TryGetValue(player.playerID, out var value)) { return (Object)(object)value != (Object)null; } return false; } } protected override bool IgnoresCooldown() { if ((Object)(object)player != (Object)null) { return HammerOut; } return false; } protected override bool OnActivateOwner() { //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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_0109: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) if (HammerOut) { Vector2 safeSpot = Out[player.playerID].SafeSpot; NetworkingManager.RPC(typeof(Mjolnir), "RPCA_Teleport", new object[4] { player.playerID, safeSpot.x, safeSpot.y, base.Stacks >= 2 }); return false; } Vector2 val = Vector2.op_Implicit(((Component)player).transform.position); Vector2 val2 = ZenUtil.AimPoint(player) - val; val2 = ((((Vector2)(ref val2)).sqrMagnitude < 0.01f) ? ZenUtil.AimDirection(player) : ((Vector2)(ref val2)).normalized); float num = ZenUtil.BulletDamage(player) * 0.5f; NetworkingManager.RPC(typeof(Mjolnir), "RPCA_Throw", new object[6] { player.playerID, val.x, val.y, val2.x, val2.y, num }); return true; } protected override void ResetSpawns() { if ((Object)(object)player != (Object)null && Out.TryGetValue(player.playerID, out var value) && (Object)(object)value != (Object)null) { Object.Destroy((Object)(object)((Component)value).gameObject); } } private static void LandingStrike(Player owner, Vector2 at, bool big) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_005a: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) float num = (big ? 4.5f : 3.5f); for (int i = 0; i < (big ? 4 : 3); i++) { Vector2 val = at + new Vector2(Random.Range(-1.5f, 1.5f), Random.Range(-0.5f, 0.5f)); MjolnirHammer.Lightning(val + new Vector2(Random.Range(-2f, 2f), 18f), val); } ZenFx.Burst(Vector2.op_Implicit(at), Bolt, 1f, num * 2f); List<Player> list = new List<Player>(ZenUtil.Enemies(owner, at, num, needSight: false)); foreach (Player item in list) { item.data.stunHandler.AddStun(0.5f); MjolnirHammer.Lightning(Vector2.op