/// <summary>
        /// Get animations for current spellcast.
        /// This happens the first time a spell is cast and stored for re-casting.
        /// It's likely player will use a wide variety of spell types in normal play.
        /// </summary>
        void SetCurrentAnims(ElementTypes elementType, int border = 0, bool dilate = false)
        {
            // Attempt to get current anims
            if (castAnims.ContainsKey(elementType))
            {
                currentAnimType = elementType;
                currentAnims    = castAnims[elementType];
                return;
            }

            // Load spellcast file
            string     filename = WeaponBasics.GetMagicAnimFilename(elementType);
            string     path     = Path.Combine(DaggerfallUnity.Instance.Arena2Path, filename);
            CifRciFile cifFile  = new CifRciFile();

            if (!cifFile.Load(path, FileUsage.UseMemory, true))
            {
                throw new Exception(string.Format("Could not load spell anims file {0}", path));
            }

            // Load CIF palette
            cifFile.Palette.Load(Path.Combine(DaggerfallUnity.Instance.Arena2Path, cifFile.PaletteName));

            // Load textures - spells have a single frame per record unlike weapons
            AnimationRecord[] animationRecords = new AnimationRecord[cifFile.RecordCount];
            for (int record = 0; record < cifFile.RecordCount; record++)
            {
                Texture2D texture;
                if (!TextureReplacement.TryImportCifRci(filename, record, 0, false, out texture))
                {
                    // Get Color32 array
                    DFSize    sz;
                    Color32[] colors = cifFile.GetColor32(record, 0, 0, border, out sz);

                    // Dilate edges
                    if (border > 0 && dilate)
                    {
                        ImageProcessing.DilateColors(ref colors, sz);
                    }

                    // Create Texture2D
                    texture = new Texture2D(sz.Width, sz.Height, TextureFormat.ARGB32, false);
                    texture.SetPixels32(colors);
                    texture.Apply(true);
                }

                // Set filter mode and store in frames array
                if (texture)
                {
                    texture.filterMode = (FilterMode)DaggerfallUnity.Settings.MainFilterMode;
                    animationRecords[record].Texture = texture;
                    animationRecords[record].Size    = cifFile.GetSize(record);
                }
            }

            // Add frames array to dictionary
            castAnims.Add(elementType, animationRecords);

            // Use as current anims
            currentAnimType = elementType;
            currentAnims    = animationRecords;
        }