using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BlackMagicAPI.Enums;
using BlackMagicAPI.Helpers;
using BlackMagicAPI.Managers;
using BlackMagicAPI.Modules.Spells;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Landmine30")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Landmine30")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("07dfced0-b579-4104-9f6e-e607f6eaec61")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
internal class Program
{
private static void Main(string[] args)
{
string currentDirectory = Directory.GetCurrentDirectory();
string value = Path.Combine(currentDirectory, "mybundle");
Console.WriteLine(value);
}
}
internal class PoliteLangInterpreter
{
private int commandsSinceThanks = 0;
private int consecutiveThanks = 0;
public void Run(List<string> code)
{
for (int i = 0; i < code.Count; i++)
{
string text = code[i].Trim();
string text2 = text.ToLower();
if (!text2.EndsWith("please"))
{
throw new Exception($"Line {i + 1}: You forgot to say 'please'.");
}
if (text2.Contains("thank you"))
{
consecutiveThanks++;
commandsSinceThanks = 0;
}
else
{
consecutiveThanks = 0;
commandsSinceThanks++;
}
if (consecutiveThanks > 2)
{
throw new Exception($"Line {i + 1}: Too polite. Stop saying 'thank you' so much.");
}
if (commandsSinceThanks > 5)
{
throw new Exception($"Line {i + 1}: Too rude. Say 'thank you' more often.");
}
Console.WriteLine("✅ Executing: " + text);
}
}
}
internal class Program2
{
private static void Main()
{
List<string> code = new List<string> { "print 'Hello, world' please", "print 'Nice weather' please", "thank you please", "print 'Doing work' please", "print 'Still working' please", "thank you please", "print 'All done!' please" };
try
{
PoliteLangInterpreter politeLangInterpreter = new PoliteLangInterpreter();
politeLangInterpreter.Run(code);
}
catch (Exception ex)
{
Console.WriteLine("❌ Error: " + ex.Message);
}
}
}
namespace Landmine30
{
public class LightningBoltPatch
{
[CompilerGenerated]
private sealed class <Prefix>d__0 : IEnumerable<bool>, IEnumerable, IEnumerator<bool>, IDisposable, IEnumerator
{
private int <>1__state;
private bool <>2__current;
private int <>l__initialThreadId;
private Vector3 fwdvector;
public Vector3 <>3__fwdvector;
private GameObject ownerobj;
public GameObject <>3__ownerobj;
private LayerMask ___ground;
public LayerMask <>3_____ground;
private GameObject ___LightningBoltPrefab;
public GameObject <>3_____LightningBoltPrefab;
private int ___level;
public int <>3_____level;
private Vector3 <vector>5__1;
private RaycastHit <raycastHit>5__2;
private RaycastHit <raycastHit3>5__3;
private RaycastHit <raycastHit2>5__4;
private RaycastHit <raycastHit5>5__5;
private RaycastHit <raycastHit4>5__6;
private RaycastHit <raycastHit7>5__7;
private RaycastHit <raycastHit6>5__8;
bool IEnumerator<bool>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Prefix>d__0(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0046: 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_0076: 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_008b: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_0281: Unknown result type (might be due to invalid IL or missing references)
//IL_0296: Unknown result type (might be due to invalid IL or missing references)
//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
//IL_02db: Unknown result type (might be due to invalid IL or missing references)
//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
//IL_051d: Unknown result type (might be due to invalid IL or missing references)
//IL_0532: Unknown result type (might be due to invalid IL or missing references)
//IL_054d: Unknown result type (might be due to invalid IL or missing references)
//IL_0557: Unknown result type (might be due to invalid IL or missing references)
//IL_055c: Unknown result type (might be due to invalid IL or missing references)
//IL_0572: Unknown result type (might be due to invalid IL or missing references)
//IL_0577: Unknown result type (might be due to invalid IL or missing references)
//IL_0587: Unknown result type (might be due to invalid IL or missing references)
//IL_058c: Unknown result type (might be due to invalid IL or missing references)
//IL_0591: Unknown result type (might be due to invalid IL or missing references)
//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
//IL_01f6: 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_0205: Unknown result type (might be due to invalid IL or missing references)
//IL_020a: Unknown result type (might be due to invalid IL or missing references)
//IL_021b: 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_00cf: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Unknown result type (might be due to invalid IL or missing references)
//IL_0314: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
//IL_05b0: Unknown result type (might be due to invalid IL or missing references)
//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: 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_0165: 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)
//IL_016f: 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_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_046e: Unknown result type (might be due to invalid IL or missing references)
//IL_0474: Unknown result type (might be due to invalid IL or missing references)
//IL_047e: Unknown result type (might be due to invalid IL or missing references)
//IL_0483: Unknown result type (might be due to invalid IL or missing references)
//IL_0488: Unknown result type (might be due to invalid IL or missing references)
//IL_0492: Unknown result type (might be due to invalid IL or missing references)
//IL_0497: Unknown result type (might be due to invalid IL or missing references)
//IL_049c: Unknown result type (might be due to invalid IL or missing references)
//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
//IL_0344: Unknown result type (might be due to invalid IL or missing references)
//IL_0354: Unknown result type (might be due to invalid IL or missing references)
//IL_036a: Unknown result type (might be due to invalid IL or missing references)
//IL_0374: Unknown result type (might be due to invalid IL or missing references)
//IL_0379: Unknown result type (might be due to invalid IL or missing references)
//IL_038a: Unknown result type (might be due to invalid IL or missing references)
//IL_070a: Unknown result type (might be due to invalid IL or missing references)
//IL_0710: Unknown result type (might be due to invalid IL or missing references)
//IL_071a: Unknown result type (might be due to invalid IL or missing references)
//IL_071f: Unknown result type (might be due to invalid IL or missing references)
//IL_0724: Unknown result type (might be due to invalid IL or missing references)
//IL_072e: Unknown result type (might be due to invalid IL or missing references)
//IL_0733: Unknown result type (might be due to invalid IL or missing references)
//IL_0738: Unknown result type (might be due to invalid IL or missing references)
//IL_0749: Unknown result type (might be due to invalid IL or missing references)
//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
//IL_05f0: Unknown result type (might be due to invalid IL or missing references)
//IL_0606: Unknown result type (might be due to invalid IL or missing references)
//IL_0610: Unknown result type (might be due to invalid IL or missing references)
//IL_0615: Unknown result type (might be due to invalid IL or missing references)
//IL_0626: Unknown result type (might be due to invalid IL or missing references)
//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0400: Unknown result type (might be due to invalid IL or missing references)
//IL_0405: Unknown result type (might be due to invalid IL or missing references)
//IL_040a: Unknown result type (might be due to invalid IL or missing references)
//IL_041b: Unknown result type (might be due to invalid IL or missing references)
//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0774: Unknown result type (might be due to invalid IL or missing references)
//IL_0779: Unknown result type (might be due to invalid IL or missing references)
//IL_0678: Unknown result type (might be due to invalid IL or missing references)
//IL_067e: Unknown result type (might be due to invalid IL or missing references)
//IL_0688: Unknown result type (might be due to invalid IL or missing references)
//IL_068d: Unknown result type (might be due to invalid IL or missing references)
//IL_0692: Unknown result type (might be due to invalid IL or missing references)
//IL_069c: Unknown result type (might be due to invalid IL or missing references)
//IL_06a1: Unknown result type (might be due to invalid IL or missing references)
//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
//IL_06b7: Unknown result type (might be due to invalid IL or missing references)
//IL_0651: Unknown result type (might be due to invalid IL or missing references)
//IL_0656: Unknown result type (might be due to invalid IL or missing references)
//IL_0446: Unknown result type (might be due to invalid IL or missing references)
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<vector>5__1 = new Vector3(ownerobj.transform.position.x, ownerobj.transform.position.y + 2f, ownerobj.transform.position.z);
if (Physics.Raycast(<vector>5__1, fwdvector, ref <raycastHit>5__2, 100f, LayerMask.op_Implicit(___ground)))
{
if (Physics.Raycast(new Vector3(((RaycastHit)(ref <raycastHit>5__2)).point.x, ((RaycastHit)(ref <raycastHit>5__2)).point.y + 40f, ((RaycastHit)(ref <raycastHit>5__2)).point.z), Vector3.down, ref <raycastHit2>5__4, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit2>5__4, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, ((RaycastHit)(ref <raycastHit2>5__4)).point, Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit3>5__3, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, ((RaycastHit)(ref <raycastHit3>5__3)).point, Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
<>2__current = false;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<vector>5__1 = new Vector3(ownerobj.transform.position.x, ownerobj.transform.position.y + 2f, ownerobj.transform.position.z);
fwdvector = Quaternion.AngleAxis(-20f, ownerobj.transform.right) * ownerobj.transform.forward;
if (___level > 1)
{
if (Physics.Raycast(<vector>5__1, fwdvector, ref <raycastHit>5__2, 100f, LayerMask.op_Implicit(___ground)))
{
if (Physics.Raycast(new Vector3(((RaycastHit)(ref <raycastHit>5__2)).point.x, ((RaycastHit)(ref <raycastHit>5__2)).point.y + 40f, ((RaycastHit)(ref <raycastHit>5__2)).point.z), Vector3.down, ref <raycastHit4>5__6, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit4>5__6, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit5>5__5, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
}
<>2__current = false;
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
<vector>5__1 = new Vector3(ownerobj.transform.position.x, ownerobj.transform.position.y + 2f, ownerobj.transform.position.z);
fwdvector = Quaternion.AngleAxis(-20f, ownerobj.transform.right) * ownerobj.transform.forward;
if (___level == 3)
{
if (Physics.Raycast(<vector>5__1, fwdvector, ref <raycastHit>5__2, 100f, LayerMask.op_Implicit(___ground)))
{
if (Physics.Raycast(new Vector3(((RaycastHit)(ref <raycastHit>5__2)).point.x, ((RaycastHit)(ref <raycastHit>5__2)).point.y + 40f, ((RaycastHit)(ref <raycastHit>5__2)).point.z), Vector3.down, ref <raycastHit6>5__8, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit6>5__8, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
}
else if (Physics.Raycast(<vector>5__1 + fwdvector * 30f + Vector3.up * 40f, Vector3.down, ref <raycastHit7>5__7, 200f, LayerMask.op_Implicit(___ground)))
{
Object.Instantiate<GameObject>(___LightningBoltPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity).GetComponent<LightningBoltDamage>().DoDmg(ownerobj);
}
}
<>2__current = false;
<>1__state = 3;
return true;
case 3:
<>1__state = -1;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<bool> IEnumerable<bool>.GetEnumerator()
{
//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_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
<Prefix>d__0 <Prefix>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<Prefix>d__ = this;
}
else
{
<Prefix>d__ = new <Prefix>d__0(0);
}
<Prefix>d__.fwdvector = <>3__fwdvector;
<Prefix>d__.ownerobj = <>3__ownerobj;
<Prefix>d__.___ground = <>3_____ground;
<Prefix>d__.___LightningBoltPrefab = <>3_____LightningBoltPrefab;
<Prefix>d__.___level = <>3_____level;
return <Prefix>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<bool>)this).GetEnumerator();
}
}
[IteratorStateMachine(typeof(<Prefix>d__0))]
[HarmonyPatch(typeof(LightningBoltSpellController))]
[HarmonyPatch("SummonLightning")]
[HarmonyPrefix]
private static IEnumerable<bool> Prefix(Vector3 fwdvector, GameObject ownerobj, LayerMask ___ground, GameObject ___LightningBoltPrefab, int ___level)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Prefix>d__0(-2)
{
<>3__fwdvector = fwdvector,
<>3__ownerobj = ownerobj,
<>3_____ground = ___ground,
<>3_____LightningBoltPrefab = ___LightningBoltPrefab,
<>3_____level = ___level
};
}
}
}
namespace MyMageArenaSpells
{
[BepInPlugin("com.myguild.floor_glyph_spell", "Floor Glyph Spell", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class FloorGlyphSpellPlugin : BaseUnityPlugin
{
public static AssetBundle myBundle = null;
public static AudioClip mySound = null;
public static GameObject myVFX = null;
private static readonly string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static void main()
{
}
private void Awake()
{
BlackMagicManager.RegisterSpell((BaseUnityPlugin)(object)this, typeof(FloorGlyphSpellData), typeof(FloorGlyphSpellLogic));
string text = Path.Combine(directoryName, "myBundle");
AssetBundle val = AssetBundle.LoadFromFile(text);
if ((Object)(object)val == (Object)null)
{
Debug.LogError((object)"Failed to load AssetBundle!");
}
else
{
myBundle = val;
}
}
}
internal class FloorGlyphSpellData : SpellData
{
public string FileName = "Mine";
public override SpellType SpellType => (SpellType)0;
public override string Name => "Rune Mine";
public override float Cooldown => 35f;
public override Color GlowColor => new Color(1f, 0.64705884f, 0f) * 2f;
private string DirectoryName => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/Sprites/";
public override bool DebugForceSpawn => false;
public override Texture2D GetMainTexture()
{
string text = Path.Combine(DirectoryName, FileName.Replace(" ", "") + "_Main.png");
if (File.Exists(text))
{
return Utils.LoadTextureFromDisk(text);
}
return Utils.LoadTextureFromResources(Assembly.GetExecutingAssembly(), "BlackMagicAPI.Resources.Items.Item_Main.png");
}
public override Texture2D GetEmissionTexture()
{
string text = Path.Combine(DirectoryName, FileName.Replace(" ", "") + "_Emission.png");
if (File.Exists(text))
{
return Utils.LoadTextureFromDisk(text);
}
return Utils.LoadTextureFromResources(Assembly.GetExecutingAssembly(), "BlackMagicAPI.Resources.Items.Item_Emission.png");
}
}
internal static class LightningBoltSpawner
{
public static void StartLightningBolt(Vector3 pos, GameObject playerObj)
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
PageController spellPagePrefab = BlackMagicManager.GetSpellPagePrefab<LightningBoltSpellController>();
LightningBoltSpellController component = spellPagePrefab.spellprefab.GetComponent<LightningBoltSpellController>();
GameObject lightningBoltPrefab = component.LightningBoltPrefab;
GameObject val = Object.Instantiate<GameObject>(lightningBoltPrefab, pos, Quaternion.identity);
LightningBoltDamage component2 = val.GetComponent<LightningBoltDamage>();
if (component2 != null)
{
component2.DoDmg(playerObj);
}
}
}
internal class FloorGlyphSpellLogic : SpellLogic
{
public override void CastSpell(GameObject playerObj, PageController page, Vector3 spawnPos, Vector3 viewDirectionVector, int castingLevel)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
SpawnGlyph(playerObj.transform.position, playerObj, viewDirectionVector);
}
public void SpawnGlyph(Vector3 position, GameObject playerObj, Vector3 viewDirectionVector)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: 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_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_009f: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
GameObject val = FloorGlyphSpellPlugin.myBundle.LoadAsset<GameObject>("GlowQuad");
if (!((Object)(object)val == (Object)null))
{
GameObject val2 = Object.Instantiate<GameObject>(val, position, Quaternion.identity);
val2.transform.localScale = Vector3.one * 5f;
val2.transform.rotation = Quaternion.LookRotation(Vector3.down);
Vector3 val3 = playerObj.transform.position + Vector3.up * 2f;
Vector3 normalized = ((Vector3)(ref viewDirectionVector)).normalized;
int mask = LayerMask.GetMask(new string[1] { "Ground" });
RaycastHit val4 = default(RaycastHit);
if (!Physics.Raycast(val3, normalized, ref val4, 20f, mask))
{
Debug.LogWarning((object)"No ground found in front of the player. Cannot spawn glyph.");
Object.Destroy((Object)(object)val2);
return;
}
val2.transform.position = ((RaycastHit)(ref val4)).point + Vector3.up * 0.01f;
val2.transform.rotation = Quaternion.LookRotation(((RaycastHit)(ref val4)).normal * -1f);
BoxCollider val5 = val2.GetComponent<BoxCollider>() ?? val2.AddComponent<BoxCollider>();
((Collider)val5).isTrigger = true;
val5.size = new Vector3(2f, 0.5f, 2f);
Rigidbody val6 = val2.GetComponent<Rigidbody>() ?? val2.AddComponent<Rigidbody>();
val6.isKinematic = true;
val2.AddComponent<AnnoyingSpell>();
Debug.Log((object)$"Spawning GlowQuad at {position}");
}
}
}
public class AnnoyingSpell : MonoBehaviour
{
private float time = 0f;
private void Start()
{
time = Time.time + 5f;
}
public void OnTriggerEnter(Collider other)
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: 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)
if (!(Time.time < time))
{
LightningBoltSpawner.StartLightningBolt(((Component)this).gameObject.transform.position + Vector3.up * 0.1f, ((Component)other).gameObject);
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
}
}