Exemple #1
0
        public static void CreateDebris(PointF source, ObjectType debrisType, Direction direction)
        {
            GameTexture texture = null;
            Point animCell = new Point(0, 0);
            Size size = new Size(0, 0);
            int num = 0;
            int num2 = 0;
            int num3 = 60;
            if (debrisType == ObjectType.Watersplash)
            {
                size = new Size(0x10, 0x10);
                texture = new GameTexture("watersplash.bmp", size, TextureDisposePolicy.DisposeOnTileChange);
                animCell = new Point(0, 0);
                num3 = 30;
                num = 1;
                num2 = -4;
            }
            else if (debrisType == ObjectType.LavaSplash)
            {
                size = new Size(0x10, 0x10);
                texture = new GameTexture("lavasplash.bmp", size, TextureDisposePolicy.DisposeOnTileChange);
                animCell = new Point(0, 0);
                num3 = 15;
                num = 1;
                num2 = -4;
            }
            else if (debrisType == ObjectType.BrokenBlock)
            {
                size = new Size(8, 8);
                texture = new GameTexture("border.bmp", size, TextureDisposePolicy.DisposeOnTileChange);
                animCell = new Point(6, 0);
                num3 = 180;
                num = 1;
                num2 = -4;
            }
            GameObject obj2 = new GameObject(texture, debrisType) {
                Solid = false,
                StopsAtBoundries = false,
                DestroyIFFar = true,
                DeactivateIfFar = true
            };
            obj2.YSpeed.TargetSpeed = 4f;
            obj2.YSpeed.Acceleration = 2f;
            obj2.DefineAnimation(AnimType.Stopped, new Animation(animCell, size, true));
            switch (direction)
            {
                case Direction.UpLeft:
                    obj2.CurrentDirection = Direction.Left;
                    obj2.CurrentRotation = Direction.Up;
                    obj2.XSpeed.SetSpeed((float) (-1 * num));
                    obj2.YSpeed.CurrentSpeed = num2;
                    break;

                case Direction.UpRight:
                    obj2.CurrentDirection = Direction.Right;
                    obj2.CurrentRotation = Direction.Up;
                    obj2.XSpeed.SetSpeed((float) num);
                    obj2.YSpeed.CurrentSpeed = num2;
                    break;

                case Direction.DownLeft:
                    obj2.CurrentDirection = Direction.Left;
                    obj2.CurrentRotation = Direction.Down;
                    obj2.XSpeed.SetSpeed((float) (-1 * num));
                    obj2.YSpeed.CurrentSpeed = 0f;
                    break;

                case Direction.DownRight:
                    obj2.CurrentDirection = Direction.Right;
                    obj2.CurrentRotation = Direction.Down;
                    obj2.XSpeed.SetSpeed((float) num);
                    obj2.YSpeed.CurrentSpeed = 0f;
                    break;
            }
            obj2.Location = new PointF(source.X, source.Y);
            obj2.ObjClass = ObjectClass.Special;
            obj2.SetBehavior(new BulletBehavior(obj2, num3, false, false));
            GameEngine.Game.CurrentMap.AddObject(obj2);
        }
Exemple #2
0
 public void ChangeScene(string mapName, int doorID)
 {
     if (mapName.Equals("NONE"))
     {
         this.Quit("That's all for now!");
     }
     else if (mapName.IndexOf("*") == 0)
     {
         if (mapName.Equals("*INTRO"))
         {
             this.game.GotoSpecialScene(SpecialScenes.AfterCastle);
         }
         if (mapName.Equals("*TRANSFORMROOM") || mapName.Equals("*FOXTRANSFORM"))
         {
             GameMap newScene = new GameMap("transformroom.txt", 1);
             GameObject obj2 = new GameObject(new GameTexture("debug.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange), ObjectType.Transformer);
             obj2.DefineAnimation(AnimType.Stopped, new Animation(Point.Empty, Size.Empty));
             obj2.GetAnimation(AnimType.Stopped).HitboxSize = new SizeF(16f, 16f);
             obj2.Location = new PointF(160f, 140f);
             TransformBlockBehavior behavior = new TransformBlockBehavior(obj2);
             if (mapName.Equals("*FOXTRANSFORM"))
             {
                 behavior.SecretTransform();
             }
             obj2.SetBehavior(behavior);
             obj2.Visible = false;
             newScene.AddObject(obj2);
             newScene.NextMap = "*" + this.game.CurrentMap.MapFilename;
             this.ChangeScene(newScene);
         }
         else if (mapName.Equals("*TOWNRETURN"))
         {
             GameMap map2 = new GameMap("townreturn.txt", 1) {
                 NextMap = "*" + this.game.CurrentMap.MapFilename
             };
             this.ChangeScene(map2);
         }
         else if (mapName.Equals("*RETURN"))
         {
             GameMap map3 = new GameMap(this.game.CurrentMap.NextMap.Substring(1), 100);
             this.ChangeScene(map3);
         }
         else if (mapName.Equals("*END"))
         {
             this.game.CurrentMap.HandleEndingDoor();
         }
     }
     else
     {
         GameMap map4 = new GameMap(mapName + ".txt", doorID);
         this.ChangeScene(map4);
     }
 }
Exemple #3
0
        public static GameObject CreateObjectOfType(ObjectType t, ColorSwaps color, Direction direction, string itemDrops, int delay)
        {
            GameObject obj10;
            EnemyBehavior behavior;
            GameObject obj13;
            Size size12;
            float num2;
            EnemyBehavior behavior4;
            int[] numArray;
            int difficulty = 3;
            switch (t)
            {
                case ObjectType.AirGiant:
                {
                    GameTexture texture23 = new GameTexture("giant.bmp", new Size(0x20, 0x20), ColorSwaps.Green, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj24 = new GameObject(texture23, t, color);
                    Size size23 = new Size(0x20, 0x20);
                    difficulty = 6;
                    EnemyBehavior behavior15 = new EnemyBehavior(obj24, GetEnemyHP(3, 7, 8, 9, (int) color) + 30, 0, ActivationTypes.ActivateIfHorizontallyClose, FacePlayerBehavior.AlwaysFace);
                    if (color >= ColorSwaps.Blue)
                    {
                        difficulty = 9;
                    }
                    obj24.XSpeed.Acceleration = 1f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj24.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size23, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj24.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size23, numArray, 8, 15, true));
                    obj24.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size23, new int[] { 2, 3 }, 4, true));
                    obj24.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size23, new int[] { 2, 3 }, 4, true));
                    SizeF ef55 = new SizeF(22f, 32f);
                    RectangleF ef56 = new RectangleF(0f, -22f, 8f, 8f);
                    obj24.GetAnimation(AnimType.Stopped).HitboxSize = ef55;
                    obj24.GetAnimation(AnimType.Stopped2).HitboxSize = ef55;
                    obj24.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef56;
                    obj24.GetAnimation(AnimType.Hit).HitboxSize = ef55;
                    behavior15.TimerOffset = delay;
                    behavior15.AddNearAction(new Stop(true, true, true));
                    behavior15.AddNearAction(new BatReturn());
                    behavior15.AddNearAction(new FacePlayer());
                    behavior15.AddNearAction(new MoveDownTo(4, -delay, false));
                    behavior15.AddNearAction(new Hover(new Speed(1f, 0.2f, 1f), new Speed(1f, 0.4f, 1f), 360));
                    behavior15.AddFarAction(new Wait(5));
                    behavior15.AddFarAction(new FacePlayer());
                    behavior15.AddHitAction(new Wait(1));
                    behavior15.AddHitAction(new FacePlayer());
                    behavior15.AddHitAction(new Bounce(-2, -2));
                    behavior15.AddHitAction(new Wait(40));
                    behavior15.AddHitAction(new PlayAnimation(AnimType.Stopped2));
                    behavior15.AddHitAction(new SetSpeed(-2f, false));
                    if (color == ColorSwaps.Green)
                    {
                        behavior15.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty, (int) color), 2f, -8f, 1, 1, true, false), 1, 10));
                    }
                    else if (color == ColorSwaps.Blue)
                    {
                        behavior15.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty, (int) color), 2f, -8f, 1, 1, true, false), 3, 10));
                    }
                    behavior15.AttackDistance = 100;
                    obj24.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj24.SetBehavior(behavior15);
                    obj24.ObjClass = ObjectClass.Enemy;
                    obj24.Solid = false;
                    obj24.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior15, itemDrops);
                    return obj24;
                }
                case ObjectType.AntLion:
                {
                    GameTexture texture27 = new GameTexture("antlion.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj28 = new GameObject(texture27, t, color);
                    Size size27 = new Size(0x20, 0x20);
                    EnemyBehavior behavior19 = new EnemyBehavior(obj28, GetEnemyHP(difficulty, (int) color), delay);
                    if (color != ColorSwaps.Yellow)
                    {
                        if (color == ColorSwaps.Blue)
                        {
                            difficulty = 4;
                        }
                    }
                    else
                    {
                        difficulty = 6;
                    }
                    obj28.YSpeed.Acceleration = 1f;
                    obj28.YSpeed.TargetSpeed = 4f;
                    obj28.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[1];
                    obj28.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size27, numArray, 8, true));
                    obj28.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size27, new int[] { 1 }, 8, true));
                    obj28.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size27, new int[] { 2 }, 4, true));
                    obj28.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size27, new int[] { 2 }, 4, true));
                    SizeF ef62 = new SizeF(16f, 16f);
                    RectangleF ef63 = new RectangleF(-8f, -16f, 16f, 16f);
                    obj28.GetAnimation(AnimType.Stopped).HitboxSize = ef62;
                    obj28.GetAnimation(AnimType.Attacking).HitboxSize = ef62;
                    obj28.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef63;
                    obj28.GetAnimation(AnimType.Hit).HitboxSize = ef62;
                    float num4 = -7f;
                    int num5 = 80 - (((ColorSwaps) 20) * color);
                    ObjectType gravityBullet = ObjectType.GravityBullet;
                    if (color == ColorSwaps.Yellow)
                    {
                        gravityBullet = ObjectType.BouncingBullet;
                    }
                    Shoot shoot5 = new Shoot(gravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 0f, num4, 1f, 8, true);
                    Shoot a = new Shoot(gravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 0f, num4 * 1.5f, 1f, 8, true);
                    behavior19.AddNearAction(new MultiAction(shoot5, 3, num5));
                    behavior19.AddNearAction(new Wait(num5));
                    behavior19.AddNearAction(a);
                    behavior19.AddNearAction(new Wait(num5));
                    behavior19.AddNearAction(new FacePlayer());
                    behavior19.AddFarAction(new Wait(5));
                    behavior19.AddFarAction(new FacePlayer());
                    behavior19.AddHitAction(new Wait(1));
                    behavior19.AddHitAction(new FacePlayer());
                    behavior19.AddHitAction(new Stop(true, false, false));
                    behavior19.AddHitAction(new Wait(30));
                    behavior19.AttackDistance = 400;
                    obj28.SetBehavior(behavior19);
                    obj28.ObjClass = ObjectClass.Enemy;
                    obj28.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj28.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior19, itemDrops);
                    return obj28;
                }
                case ObjectType.Bat:
                {
                    GameTexture texture11 = new GameTexture("bat.bmp", new Size(0x10, 0x10), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj12 = new GameObject(texture11, t, color);
                    Size size11 = new Size(0x10, 0x10);
                    EnemyBehavior behavior3 = new EnemyBehavior(obj12, GetEnemyHP(3, 7, 8, 9, (int) color) + (((ColorSwaps) 20) * color), delay, ActivationTypes.ActivateIfAbove, FacePlayerBehavior.FaceIfFar);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj12.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size11, numArray, 8, true));
                    obj12.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size11, new int[] { 1 }, 1, true));
                    obj12.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size11, new int[] { 2 }, 1, true));
                    obj12.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size11, new int[] { 2 }, 1, true));
                    SizeF ef35 = new SizeF(16f, 16f);
                    obj12.GetAnimation(AnimType.Stopped).HitboxSize = ef35;
                    obj12.GetAnimation(AnimType.Hit).HitboxSize = ef35;
                    obj12.GetAnimation(AnimType.Jump).HitboxSize = ef35;
                    behavior3.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior3.AddNearAction(new BatReturn());
                    behavior3.AddNearAction(new FacePlayer());
                    behavior3.AddNearAction(new Hover(new Speed(0f, 0f, 0f), new Speed(0f, 1f, 2f), 120 - (color * ((ColorSwaps) 30))));
                    behavior3.AddNearAction(new FacePlayer());
                    behavior3.AddNearAction(new PlayAnimation(AnimType.Jump));
                    behavior3.AddNearAction(new MoveDownTo(2, -20, true));
                    behavior3.AddNearAction(new Move(new Speed(1f, 1f, 1f), new Speed(2f, 0.4f, -2f)));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior3.AddNearAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 0f, -6f, 1f, 1, false));
                        behavior3.AddNearAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), -2f, -6f, 1f, 1, false));
                        behavior3.AddNearAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -6f, 1f, 1, false));
                    }
                    behavior3.AddNearAction(new Stop(true, true, false));
                    behavior3.AddFarAction(new PlayAnimation(AnimType.Stopped));
                    behavior3.AddFarAction(new BatReturn());
                    behavior3.AddFarAction(new FacePlayer());
                    behavior3.AddFarAction(new Hover(new Speed(0f, 0f, 0f), new Speed(0f, 1f, 2f), 15));
                    behavior3.AddHitAction(new Wait(1));
                    behavior3.AddHitAction(new FacePlayer());
                    behavior3.AddHitAction(new Bounce(-2, -2));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior3.AddHitAction(new Wait(10));
                        behavior3.AddHitAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 0f, -6f, 1f, 1, false));
                        behavior3.AddHitAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), -2f, -6f, 1f, 1, false));
                        behavior3.AddHitAction(new Shoot(ObjectType.GravityBullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -6f, 1f, 1, false));
                    }
                    else
                    {
                        behavior3.AddHitAction(new Wait(40));
                    }
                    behavior3.AttackDistance = 50;
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior3.AttackDistance = 150;
                    }
                    obj12.SetBehavior(behavior3);
                    obj12.ObjClass = ObjectClass.Enemy;
                    if (color == ColorSwaps.Blue)
                    {
                        difficulty = 7;
                    }
                    obj12.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    AddItemDrops(behavior3, itemDrops);
                    obj12.Solid = false;
                    return obj12;
                }
                case ObjectType.Crab:
                {
                    difficulty = 3;
                    GameTexture texture25 = new GameTexture("crab.bmp", new Size(0x10, 0x10), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj26 = new GameObject(texture25, t, color);
                    Size size25 = new Size(0x10, 0x10);
                    EnemyBehavior behavior17 = new EnemyBehavior(obj26, GetEnemyHP(difficulty, (int) color), delay);
                    obj26.YSpeed.Acceleration = 1f;
                    obj26.YSpeed.TargetSpeed = 4f;
                    obj26.XSpeed.Acceleration = 1f;
                    obj26.XSpeed.TargetSpeed = 1f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj26.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size25, numArray, 8, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj26.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size25, numArray, 8, true));
                    obj26.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size25, new int[] { 2 }, 4, true));
                    obj26.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size25, new int[] { 2 }, 4, true));
                    SizeF ef59 = new SizeF(16f, 16f);
                    obj26.GetAnimation(AnimType.Stopped).HitboxSize = ef59;
                    obj26.GetAnimation(AnimType.Stopped2).HitboxSize = ef59;
                    obj26.GetAnimation(AnimType.Hit).HitboxSize = ef59;
                    behavior17.AddNearAction(new SetSpeed(1f, 1f, true));
                    behavior17.AddNearAction(new Reverse(30));
                    behavior17.AddNearAction(new Wait(30));
                    behavior17.AddFarAction(new Wait(5));
                    behavior17.AddFarAction(new FacePlayer());
                    behavior17.AddFarAction(new PlayAnimation(AnimType.Stopped2));
                    behavior17.AddHitAction(new Wait(1));
                    behavior17.AddHitAction(new FacePlayer());
                    behavior17.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior17.AddHitAction(new Wait(30));
                    behavior17.AddHitWallAction(new Reverse());
                    behavior17.AddHitWallAction(new Wait(30));
                    behavior17.AttackDistance = 300;
                    obj26.SetBehavior(behavior17);
                    obj26.ObjClass = ObjectClass.Enemy;
                    obj26.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj26.StopsAtLedges = true;
                    obj26.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior17, itemDrops);
                    return obj26;
                }
                case ObjectType.Crystal:
                {
                    GameTexture texture19 = new GameTexture("crystal.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj20 = new GameObject(texture19, t, color);
                    Size size19 = new Size(0x10, 0x10);
                    EnemyBehavior behavior11 = new EnemyBehavior(obj20, 1, delay);
                    difficulty = GameEngine.Game.BaseDifficulty;
                    obj20.XSpeed.SetSpeed((float) 0f);
                    obj20.YSpeed.SetSpeed((float) 0f);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj20.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Invincible, size19, numArray, 4, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj20.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.Invincible, size19, numArray, 4, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj20.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.Invincible, size19, numArray, 4, true));
                    SizeF ef47 = new SizeF(16f, 16f);
                    if (color == ColorSwaps.Blue)
                    {
                        ef47 = new SizeF(18f, 18f);
                    }
                    new RectangleF(-8f, -16f, 16f, 16f);
                    obj20.GetAnimation(AnimType.Stopped).HitboxSize = ef47;
                    behavior11.AddNearAction(new Wait(30));
                    behavior11.AddFarAction(new Wait(30));
                    behavior11.AttackDistance = 0x270f;
                    obj20.SetBehavior(behavior11);
                    obj20.ObjClass = ObjectClass.Enemy;
                    obj20.DeactivateIfFar = false;
                    obj20.AttackDamage = GetEnemyDamage(difficulty, 2);
                    obj20.Solid = false;
                    return obj20;
                }
                case ObjectType.Cyclops:
                {
                    GameTexture texture21 = new GameTexture("cyclops.bmp", new Size(0x20, 0x20), ColorSwaps.Blue, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj22 = new GameObject(texture21, t, color);
                    Size size21 = new Size(0x20, 0x20);
                    difficulty = 8;
                    EnemyBehavior behavior13 = new EnemyBehavior(obj22, GetEnemyHP(3, 9, 10, 11, (int) color), delay);
                    if (color == ColorSwaps.Blue)
                    {
                        difficulty = 9;
                    }
                    obj22.YSpeed.Acceleration = 2f;
                    obj22.YSpeed.TargetSpeed = 4f;
                    obj22.XSpeed.Acceleration = 0.3f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj22.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size21, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj22.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size21, numArray, 8, 0x10, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj22.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size21, numArray, 2, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj22.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size21, numArray, 2, true));
                    obj22.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size21, new int[] { 2, 3 }, 4, true));
                    obj22.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size21, new int[] { 2, 3 }, 4, true));
                    SizeF ef51 = new SizeF(22f, 32f);
                    RectangleF ef52 = new RectangleF(0f, -22f, 8f, 8f);
                    obj22.GetAnimation(AnimType.Stopped).HitboxSize = ef51;
                    obj22.GetAnimation(AnimType.Stopped2).HitboxSize = ef51;
                    obj22.GetAnimation(AnimType.Hit).HitboxSize = ef51;
                    obj22.GetAnimation(AnimType.Jump).HitboxSize = ef51;
                    obj22.GetAnimation(AnimType.Attacking).HitboxSize = ef51;
                    obj22.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef52;
                    behavior13.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior13.AddNearAction(new SetSpeed(4f, 2f, false));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior13.AddNearAction(new SetSpeed(2f, 1f, true));
                    }
                    else
                    {
                        behavior13.AddNearAction(new SetSpeed(1f, 1f, true));
                    }
                    behavior13.AddNearAction(new Wait(300));
                    behavior13.AddFarAction(new Wait(5));
                    behavior13.AddFarAction(new FacePlayer());
                    behavior13.AddHitAction(new Wait(1));
                    behavior13.AddHitAction(new FacePlayer());
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior13.AddHitAction(new Jump(new Speed(-3.5f, 2f, -3.5f), new Speed(-3f, 1f, 3f), false, true));
                        behavior13.AddHitAction(new Stop(true, false, false));
                        behavior13.AddHitAction(new SetSpeed(1f, 1f, true));
                        behavior13.AddHitAction(new Wait(1));
                    }
                    else
                    {
                        behavior13.AddHitAction(new Jump(ActionPresets.Recoil));
                        behavior13.AddHitAction(new Stop(true, false, false));
                        behavior13.AddHitAction(new Wait(40));
                    }
                    if (color == ColorSwaps.Green)
                    {
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty, (int) color), 2f, -8f, 1, 1, true, true), 1, 10));
                    }
                    else if (color == ColorSwaps.Blue)
                    {
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty, (int) color), 2f, -8f, 1, 1, true, true), 3, 10));
                    }
                    else if (color == ColorSwaps.Yellow)
                    {
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty - 1, (int) color), 1f, -8f, 1, 1, true, true), 2, 10));
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty - 1, (int) color), 6.5f, -8f, 1, 1, true, true), 2, 10));
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty - 1, (int) color), 4f, -8f, 1, 1, true, true), 2, 10));
                        behavior13.AddHitAction(new MultiAction(new Shoot(ObjectType.CyclopsFireball, GetEnemyBulletDamage(difficulty - 1, (int) color), 2f, -8f, 1, 1, true, true), 2, 10));
                    }
                    behavior13.AddHitWallAction(new TryJump(new Jump(new Speed(1f, 1f, 1f), new Speed(-8f, 2f, 4f), true, true)));
                    obj22.CurrentDirection = direction;
                    behavior13.AttackDistance = 300;
                    obj22.StopsAtBoundries = false;
                    obj22.SetBehavior(behavior13);
                    obj22.ObjClass = ObjectClass.Enemy;
                    obj22.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj22.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior13, itemDrops);
                    return obj22;
                }
                case ObjectType.Faerie:
                {
                    difficulty = 3;
                    GameTexture texture29 = new GameTexture("faerie.bmp", new Size(0x20, 0x20), ColorSwaps.Blue, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj30 = new GameObject(texture29, t, color);
                    Size size29 = new Size(0x20, 0x20);
                    EnemyBehavior behavior21 = new EnemyBehavior(obj30, GetEnemyHP(difficulty, (int) color), delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.None);
                    obj30.YSpeed.Acceleration = 2f;
                    obj30.YSpeed.TargetSpeed = 4f;
                    obj30.XSpeed.Acceleration = 0.3f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj30.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size29, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj30.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size29, numArray, 8, 0x10, true));
                    obj30.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size29, new int[] { 2 }, 4, true));
                    obj30.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size29, new int[] { 2 }, 4, true));
                    SizeF ef66 = new SizeF(18f, 22f);
                    obj30.GetAnimation(AnimType.Stopped).HitboxSize = ef66;
                    obj30.GetAnimation(AnimType.Stopped2).HitboxSize = ef66;
                    obj30.GetAnimation(AnimType.Hit).HitboxSize = ef66;
                    behavior21.AddNearAction(new SetSpeed(ActionPresets.Gravity));
                    behavior21.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior21.AddNearAction(new FacePlayer());
                    behavior21.AddNearAction(new SetSpeed(1f, true));
                    behavior21.AddNearAction(new Wait(300));
                    behavior21.AddFarAction(new SetSpeed(ActionPresets.Gravity));
                    behavior21.AddFarAction(new Wait(5));
                    behavior21.AddFarAction(new FacePlayer());
                    behavior21.AddHitAction(new Wait(1));
                    behavior21.AddHitAction(new FacePlayer());
                    behavior21.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior21.AddHitAction(new Stop(true, false, false));
                    behavior21.AddHitAction(new Wait(40));
                    behavior21.AddHitWallAction(new Reverse());
                    behavior21.AddHitWallAction(new Wait(30));
                    behavior21.AttackDistance = 300;
                    obj30.SetBehavior(behavior21);
                    obj30.ObjClass = ObjectClass.Enemy;
                    obj30.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj30.StopsAtBoundries = false;
                    obj30.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior21, itemDrops);
                    return obj30;
                }
                case ObjectType.FireFlower:
                {
                    GameTexture texture16 = new GameTexture("fireFlower.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj17 = new GameObject(texture16, t, ColorSwaps.Normal);
                    Size size16 = new Size(0x20, 0x20);
                    EnemyBehavior behavior8 = new EnemyBehavior(obj17, 1, delay);
                    difficulty = GameEngine.Game.BaseDifficulty;
                    obj17.YSpeed.Acceleration = 2f;
                    obj17.YSpeed.TargetSpeed = 4f;
                    obj17.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj17.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size16, numArray, 8, true));
                    obj17.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size16, new int[] { 2 }, 1, true));
                    obj17.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size16, new int[] { 3 }, 1, true));
                    obj17.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size16, new int[] { 3 }, 1, true));
                    SizeF ef41 = new SizeF(13f, 32f);
                    RectangleF ef42 = new RectangleF(-8f, -32f, 16f, 16f);
                    obj17.GetAnimation(AnimType.Stopped).HitboxSize = ef41;
                    obj17.GetAnimation(AnimType.Hit).HitboxSize = ef41;
                    obj17.GetAnimation(AnimType.Attacking).HitboxSize = ef41;
                    obj17.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef42;
                    behavior8.AddNearAction(new Wait(60));
                    behavior8.AddNearAction(new FacePlayer());
                    behavior8.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, 1), 2f, 0f, 30, 1, false, true));
                    behavior8.AddNearAction(new Wait(30, true));
                    behavior8.AddFarAction(new Wait(30));
                    behavior8.AddFarAction(new FacePlayer());
                    behavior8.AddHitAction(new Wait(1));
                    behavior8.AddHitAction(new FacePlayer());
                    behavior8.AddHitAction(new Wait(40));
                    behavior8.AttackDistance = 200;
                    obj17.SetBehavior(behavior8);
                    obj17.ObjClass = ObjectClass.Enemy;
                    obj17.AttackDamage = GetEnemyDamage(difficulty, 1);
                    AddItemDrops(behavior8, itemDrops);
                    return obj17;
                }
                case ObjectType.FireStone:
                {
                    GameTexture texture18 = new GameTexture("fireStone.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj19 = new GameObject(texture18, t, color);
                    Size size18 = new Size(0x10, 0x10);
                    EnemyBehavior behavior10 = new EnemyBehavior(obj19, 1, delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.None);
                    difficulty = GameEngine.Game.BaseDifficulty;
                    obj19.XSpeed.SetSpeed((float) 0f);
                    obj19.YSpeed.SetSpeed((float) 0f);
                    numArray = new int[1];
                    obj19.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Invincible, size18, numArray, 8, true));
                    obj19.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Invincible, size18, new int[] { 2 }, 1, true));
                    obj19.DefineAnimation(AnimType.Special, new Animation(AnimHitType.Invincible, size18, new int[] { 1 }, 1, true));
                    SizeF ef45 = new SizeF(16f, 16f);
                    RectangleF ef46 = new RectangleF(-8f, -16f, 16f, 16f);
                    obj19.GetAnimation(AnimType.Stopped).HitboxSize = ef45;
                    obj19.GetAnimation(AnimType.Attacking).HitboxSize = ef45;
                    obj19.GetAnimation(AnimType.Special).HitboxSize = ef45;
                    obj19.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef46;
                    behavior10.AddNearAction(new Wait(30));
                    behavior10.AddNearAction(new PlayAnimation(AnimType.Special));
                    behavior10.AddNearAction(new Wait(5));
                    behavior10.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, 1), 2f, 0f, 30, 1, false, true));
                    behavior10.AddNearAction(new Wait(30, true));
                    behavior10.AddFarAction(new Wait(30));
                    behavior10.AttackDistance = 0x270f;
                    behavior10.AwakenDistance = 0x270f;
                    obj19.AttackDamage = GetEnemyDamage(difficulty, 1);
                    obj19.SetBehavior(behavior10);
                    obj19.ObjClass = ObjectClass.Enemy;
                    obj19.DeactivateIfFar = false;
                    obj19.CurrentDirection = direction;
                    if (direction != Direction.Down)
                    {
                        if (direction == Direction.Up)
                        {
                            obj19.CurrentRotation = Direction.Left;
                        }
                        return obj19;
                    }
                    obj19.CurrentRotation = Direction.Right;
                    return obj19;
                }
                case ObjectType.Fish:
                {
                    difficulty = 3;
                    GameTexture texture14 = new GameTexture("fish.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj15 = new GameObject(texture14, t, color);
                    Size size14 = new Size(0x20, 0x20);
                    EnemyBehavior behavior6 = new EnemyBehavior(obj15, GetEnemyHP(difficulty, (int) color), delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.None);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj15.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size14, numArray, 8, true));
                    obj15.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size14, new int[] { 2 }, 1, true));
                    obj15.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size14, new int[] { 2 }, 1, true));
                    SizeF ef38 = new SizeF(24f, 16f);
                    RectangleF ef39 = new RectangleF(-12f, -20f, 24f, 20f);
                    obj15.GetAnimation(AnimType.Stopped).HitboxSize = ef38;
                    obj15.GetAnimation(AnimType.Hit).HitboxSize = ef38;
                    obj15.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef39;
                    behavior6.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior6.AddNearAction(new FacePlayer());
                    if (color != ColorSwaps.Yellow)
                    {
                        behavior6.AddNearAction(new SetSpeed(1f, 0.5f, true));
                        behavior6.AddNearAction(new Hover(new Speed(0f, 0f, 0f), new Speed(0f, 0.2f, 1f), 180, true));
                    }
                    else
                    {
                        behavior6.AddNearAction(new SetSpeed(1f, 0.5f, true));
                        behavior6.AddNearAction(new Hover(new Speed(0f, 0f, 0f), new Speed(0f, 0.2f, 1f), 60, true));
                        behavior6.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, 0f, 0f, 1, false));
                        behavior6.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, 2f, 0f, 1, false));
                        behavior6.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -2f, 0f, 1, false));
                        behavior6.AddNearAction(new Bounce(-2, 0));
                    }
                    behavior6.AddFarAction(new PlayAnimation(AnimType.Stopped));
                    behavior6.AddFarAction(new FacePlayer());
                    behavior6.AddHitAction(new Wait(1));
                    behavior6.AddHitAction(new FacePlayer());
                    behavior6.AddHitAction(new Bounce(-2, -2));
                    behavior6.AddHitAction(new Wait(40));
                    behavior6.AddHitWallAction(new Bounce(-1, -1, 0.1f));
                    behavior6.AddHitWallAction(new Wait(30));
                    behavior6.AttackDistance = 300;
                    obj15.SetBehavior(behavior6);
                    obj15.ObjClass = ObjectClass.Enemy;
                    if (color == ColorSwaps.Blue)
                    {
                        difficulty = 5;
                    }
                    obj15.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj15.Aquatic = true;
                    AddItemDrops(behavior6, itemDrops);
                    obj15.Solid = true;
                    return obj15;
                }
                case ObjectType.Goblin:
                {
                    GameTexture texture22 = new GameTexture("goblin.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj23 = new GameObject(texture22, t, color);
                    Size size22 = new Size(0x20, 0x20);
                    difficulty = 4;
                    EnemyBehavior behavior14 = new EnemyBehavior(obj23, GetEnemyHP(4, 5, 8, 9, (int) color), delay);
                    if (color >= ColorSwaps.Blue)
                    {
                        difficulty = 9;
                    }
                    obj23.YSpeed.Acceleration = 2f;
                    obj23.YSpeed.TargetSpeed = 4f;
                    obj23.XSpeed.Acceleration = 1f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj23.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size22, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj23.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size22, numArray, 8, 0x10, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj23.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size22, numArray, 2, true));
                    obj23.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size22, new int[] { 2 }, 4, true));
                    obj23.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size22, new int[] { 2 }, 4, true));
                    SizeF ef53 = new SizeF(22f, 32f);
                    RectangleF ef54 = new RectangleF(-11f, -32f, 22f, 32f);
                    obj23.GetAnimation(AnimType.Stopped).HitboxSize = ef53;
                    obj23.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef54;
                    obj23.GetAnimation(AnimType.Stopped2).HitboxSize = ef53;
                    obj23.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef54;
                    obj23.GetAnimation(AnimType.Hit).HitboxSize = ef53;
                    obj23.GetAnimation(AnimType.Jump).HitboxSize = ef53;
                    obj23.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef54;
                    behavior14.AddNearAction(new SetSpeed(ActionPresets.Gravity));
                    behavior14.AddNearAction(new SetSpeed(1f, 1f, true));
                    behavior14.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior14.AddNearAction(new Wait(60));
                    behavior14.AddNearAction(new FacePlayer());
                    behavior14.AddNearAction(new Stop(true, false, false));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior14.AddNearAction(new Jump(0f, 5f, true, false));
                        behavior14.AddNearAction(new Shoot(ObjectType.GoblinArrow, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 1, 1, false, false));
                        behavior14.AddNearAction(new Wait(5));
                        behavior14.AddNearAction(new Shoot(ObjectType.GoblinArrow, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 1, 1, false, false));
                        behavior14.AddNearAction(new Wait(5));
                        behavior14.AddNearAction(new Shoot(ObjectType.GoblinArrow, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 1, 1, false, false));
                    }
                    else
                    {
                        behavior14.AddNearAction(new MultiAction(new Jump(0f, 5f, true, true), 3, 1));
                        behavior14.AddNearAction(new Shoot(ObjectType.GoblinArrow, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 1, 1, false, false));
                    }
                    behavior14.AddFarAction(new Wait(5));
                    behavior14.AddFarAction(new FacePlayer());
                    behavior14.AddHitAction(new Wait(1));
                    behavior14.AddHitAction(new FacePlayer());
                    behavior14.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior14.AddHitAction(new Stop(true, false, false));
                    behavior14.AddHitAction(new Wait(40));
                    behavior14.AddHitWallAction(new Reverse());
                    behavior14.AddHitWallAction(new Wait(20));
                    behavior14.AttackDistance = 400;
                    obj23.SetBehavior(behavior14);
                    obj23.ObjClass = ObjectClass.Enemy;
                    obj23.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj23.StopsAtLedges = true;
                    obj23.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior14, itemDrops);
                    return obj23;
                }
                case ObjectType.Ninja:
                {
                    difficulty = 7;
                    GameTexture texture30 = new GameTexture("ninja.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj31 = new GameObject(texture30, t, color);
                    Size size30 = new Size(0x20, 0x20);
                    EnemyBehavior behavior22 = new EnemyBehavior(obj31, GetEnemyHP(difficulty, (int) color) + 10, delay, ActivationTypes.ActivateIfClose, FacePlayerBehavior.AlwaysFace);
                    if (color == ColorSwaps.Yellow)
                    {
                        difficulty = 6;
                    }
                    obj31.YSpeed.Acceleration = 0.5f;
                    obj31.YSpeed.TargetSpeed = 0f;
                    obj31.XSpeed.Acceleration = 0.1f;
                    numArray = new int[1];
                    obj31.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size30, numArray, 8, 15, true));
                    obj31.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size30, new int[] { 1 }, 8, true));
                    obj31.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size30, new int[] { 2, 3, 4 }, 8, true));
                    obj31.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size30, new int[] { 5 }, 4, true));
                    obj31.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size30, new int[] { 5 }, 4, true));
                    SizeF ef67 = new SizeF(18f, 24f);
                    RectangleF ef68 = new RectangleF(-9f, -24f, 18f, 24f);
                    obj31.GetAnimation(AnimType.Stopped).HitboxSize = ef67;
                    obj31.GetAnimation(AnimType.Hit).HitboxSize = ef67;
                    obj31.GetAnimation(AnimType.Jump).HitboxSize = ef67;
                    obj31.GetAnimation(AnimType.Attacking).HitboxSize = ef67;
                    obj31.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef68;
                    int enemyBulletDamage = GetEnemyBulletDamage(difficulty + 1, (int) color);
                    behavior22.AddNearAction(new FacePlayer());
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior22.AddNearAction(new Wait(10));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 0f, 1, 1, false, true));
                        behavior22.AddNearAction(new PlayAnimation(AnimType.Stopped));
                        behavior22.AddNearAction(new Wait(10));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 0f, 1, 1, false, true));
                        behavior22.AddNearAction(new PlayAnimation(AnimType.Stopped));
                        behavior22.AddNearAction(new Wait(10));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 0f, 1, 1, false, true));
                        behavior22.AddNearAction(new PlayAnimation(AnimType.Stopped));
                        behavior22.AddNearAction(new Jump(new Speed(1.5f, 0.08f, 0f), new Speed(-5f, 0.5f, 4f), true, false));
                        behavior22.AddNearAction(new Wait(60));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 4f, 0f, 1, false));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, -4f, 4f, 0f, 1, false));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, -4f, 0f, 1, false));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, -4f, -4f, 0f, 1, false));
                    }
                    else
                    {
                        behavior22.AddNearAction(new Wait(60));
                        behavior22.AddNearAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 0f, 1, 1, false, true));
                        behavior22.AddNearAction(new Wait(10));
                        behavior22.AddNearAction(new Jump(new Speed(1.5f, 0.08f, 0f), new Speed(-5f, 0.5f, 4f), true, true));
                    }
                    behavior22.AddNearAction(new Stop(true, false, true));
                    behavior22.AddFarAction(new FacePlayer());
                    behavior22.AddFarAction(new Wait(60));
                    behavior22.AddFarAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 0f, 1, 1, false, true));
                    behavior22.AddFarAction(new Wait(10));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior22.AddFarAction(new Jump(new Speed(2.5f, 0.1f, 0f), new Speed(-5f, 0.5f, 4f), true, false));
                        behavior22.AddFarAction(new Wait(60));
                        behavior22.AddFarAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, 4f, 0f, 1, false));
                        behavior22.AddFarAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, -4f, 4f, 0f, 1, false));
                        behavior22.AddFarAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, 4f, -4f, 0f, 1, false));
                        behavior22.AddFarAction(new Shoot(ObjectType.NinjaStar, enemyBulletDamage, -4f, -4f, 0f, 1, false));
                    }
                    else
                    {
                        behavior22.AddFarAction(new Jump(new Speed(2.5f, 0.1f, 0f), new Speed(-5f, 0.5f, 4f), true, true));
                    }
                    behavior22.AddFarAction(new Stop(true, false, true));
                    behavior22.AddHitAction(new Wait(1));
                    behavior22.AddHitAction(new FacePlayer());
                    behavior22.AddHitAction(new Stop(true, false, false));
                    behavior22.AddHitAction(new Jump(ActionPresets.Recoil));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior22.AddHitAction(new Wait(5));
                        behavior22.AddHitAction(new Jump(new Speed(-2.5f, 0.1f, 0f), new Speed(-5f, 0.5f, 4f), true, true));
                    }
                    else
                    {
                        behavior22.AddHitAction(new Wait(40));
                    }
                    behavior22.AttackDistance = 80;
                    behavior22.AwakenDistance = 150;
                    obj31.SetBehavior(behavior22);
                    obj31.ObjClass = ObjectClass.Enemy;
                    obj31.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior22, itemDrops);
                    obj31.AttackDamage = GetEnemyDamage(difficulty + 2, (int) color);
                    return obj31;
                }
                case ObjectType.Octopus:
                {
                    difficulty = 3;
                    GameTexture texture24 = new GameTexture("octopus.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj25 = new GameObject(texture24, t, color);
                    Size size24 = new Size(0x20, 0x20);
                    EnemyBehavior behavior16 = null;
                    if (color != ColorSwaps.Yellow)
                    {
                        behavior16 = new EnemyBehavior(obj25, GetEnemyHP(difficulty, (int) color), delay);
                    }
                    else
                    {
                        behavior16 = new EnemyBehavior(obj25, GetEnemyHP(difficulty, (int) color), delay, ActivationTypes.ActivateIfClose, FacePlayerBehavior.AlwaysFace);
                    }
                    obj25.YSpeed.Acceleration = 0.5f;
                    obj25.YSpeed.TargetSpeed = 4f;
                    obj25.XSpeed.Acceleration = 0.3f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj25.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size24, numArray, 6, 15, true));
                    numArray = new int[1];
                    obj25.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size24, numArray, 2, true));
                    obj25.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size24, new int[] { 2 }, 4, true));
                    obj25.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size24, new int[] { 2 }, 4, true));
                    SizeF ef57 = new SizeF(18f, 26f);
                    RectangleF ef58 = new RectangleF(-9f, -26f, 18f, 26f);
                    obj25.GetAnimation(AnimType.Stopped).HitboxSize = ef57;
                    obj25.GetAnimation(AnimType.Hit).HitboxSize = ef57;
                    obj25.GetAnimation(AnimType.Jump).HitboxSize = ef57;
                    obj25.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef58;
                    obj25.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef58;
                    behavior16.AddNearAction(new FacePlayer());
                    if (color == ColorSwaps.Blue)
                    {
                        behavior16.AddNearAction(new SetSpeed(-3f, 3f, 0.8f, false));
                        behavior16.AddNearAction(new PlayAnimation(AnimType.Jump));
                        behavior16.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty + 1, (int) color), (float) (difficulty - 1), 0f, 10, 1, false, false));
                    }
                    else if (color == ColorSwaps.Yellow)
                    {
                        behavior16.AddNearAction(new SetSpeed(-3f, 0.5f, 0.3f, false));
                        behavior16.AddNearAction(new PlayAnimation(AnimType.Jump));
                        behavior16.AddNearAction(new Wait(30));
                        behavior16.AddNearAction(new SetSpeed(1f, 0.1f, true));
                        behavior16.AddNearAction(new MultiAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty + 1, (int) color), (float) (difficulty - 1), 0f, 10, 1, false, false), 6, 15));
                        behavior16.AddNearAction(new Stop(true, false, false));
                        behavior16.AddNearAction(new SetSpeed(4f, 1f, false));
                    }
                    else
                    {
                        behavior16.AddNearAction(new SetSpeed(-4f, 4f, 0.8f, false));
                        behavior16.AddNearAction(new PlayAnimation(AnimType.Jump));
                        behavior16.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), (float) (difficulty - 1), 0f, 10, 1, false, false));
                    }
                    behavior16.AddNearAction(new Wait(120));
                    behavior16.AddFarAction(new Wait(5));
                    behavior16.AddFarAction(new FacePlayer());
                    behavior16.AddHitAction(new Wait(1));
                    behavior16.AddHitAction(new FacePlayer());
                    behavior16.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior16.AddHitAction(new Stop(true, false, false));
                    behavior16.AddHitAction(new Wait(30));
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior16.AttackDistance = 100;
                    }
                    else
                    {
                        behavior16.AttackDistance = 150;
                    }
                    obj25.SetBehavior(behavior16);
                    obj25.ObjClass = ObjectClass.Enemy;
                    obj25.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj25.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior16, itemDrops);
                    return obj25;
                }
                case ObjectType.Roper:
                {
                    if (color != ColorSwaps.Red)
                    {
                        if (color == ColorSwaps.Yellow)
                        {
                            difficulty = 6;
                        }
                        else
                        {
                            difficulty = 4;
                        }
                    }
                    else
                    {
                        difficulty = 3;
                    }
                    GameTexture texture26 = new GameTexture("roper.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj27 = new GameObject(texture26, t, color);
                    Size size26 = new Size(0x20, 0x20);
                    delay = Utility.RandomInt(0, 60);
                    EnemyBehavior behavior18 = new EnemyBehavior(obj27, GetEnemyHP(4, 6, 8, 9, (int) color) + (((ColorSwaps) 30) * color), delay);
                    obj27.YSpeed.Acceleration = 1f;
                    obj27.YSpeed.TargetSpeed = 4f;
                    obj27.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[1];
                    obj27.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size26, numArray, 8, true));
                    obj27.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size26, new int[] { 1 }, 8, true));
                    obj27.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size26, new int[] { 2 }, 4, true));
                    obj27.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size26, new int[] { 2 }, 4, true));
                    SizeF ef60 = new SizeF(16f, 16f);
                    RectangleF ef61 = new RectangleF(0f, -22f, 8f, 8f);
                    obj27.GetAnimation(AnimType.Stopped).HitboxSize = ef60;
                    obj27.GetAnimation(AnimType.Attacking).HitboxSize = ef60;
                    obj27.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef61;
                    obj27.GetAnimation(AnimType.Hit).HitboxSize = ef60;
                    ObjectType bouncingBullet = ObjectType.GravityBullet;
                    if (color == ColorSwaps.Yellow)
                    {
                        bouncingBullet = ObjectType.BouncingBullet;
                    }
                    Shoot shoot3 = new Shoot(bouncingBullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -8f, 1, 8, true, true);
                    Shoot shoot4 = new Shoot(bouncingBullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -10f, 1, 8, true, true);
                    Wait wait = new Wait(Math.Max(80 - (color * ((ColorSwaps) 15)), 50));
                    behavior18.AddNearAction(new FacePlayer());
                    behavior18.AddNearAction(shoot3);
                    behavior18.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior18.AddNearAction(wait);
                    behavior18.AddNearAction(new FacePlayer());
                    behavior18.AddNearAction(shoot3);
                    behavior18.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior18.AddNearAction(wait);
                    behavior18.AddNearAction(new FacePlayer());
                    behavior18.AddNearAction(shoot3);
                    behavior18.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior18.AddNearAction(wait);
                    behavior18.AddNearAction(new FacePlayer());
                    behavior18.AddNearAction(shoot4);
                    behavior18.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior18.AddNearAction(wait);
                    behavior18.AddFarAction(new Wait(5));
                    behavior18.AddFarAction(new FacePlayer());
                    behavior18.AddHitAction(new Wait(1));
                    behavior18.AddHitAction(new FacePlayer());
                    behavior18.AddHitAction(new Stop(true, false, false));
                    behavior18.AddHitAction(new Wait(30));
                    behavior18.AttackDistance = 200;
                    obj27.SetBehavior(behavior18);
                    obj27.ObjClass = ObjectClass.Enemy;
                    obj27.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj27.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior18, itemDrops);
                    return obj27;
                }
                case ObjectType.Spark:
                {
                    difficulty = 6;
                    GameTexture texture12 = new GameTexture("spark.bmp", new Size(0x10, 0x10), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    obj13 = new GameObject(texture12, t, color);
                    size12 = new Size(0x10, 0x10);
                    obj13.XSpeed.Acceleration = 20f;
                    obj13.YSpeed.Acceleration = 20f;
                    num2 = 1f;
                    if (color == ColorSwaps.Yellow)
                    {
                        num2 = 2f;
                    }
                    obj13.CurrentDirection = direction;
                    switch (direction)
                    {
                        case Direction.Left:
                            obj13.XSpeed.SetSpeed(-num2);
                            goto Label_1E1E;

                        case Direction.Right:
                            goto Label_1E10;

                        case Direction.Up:
                            obj13.YSpeed.SetSpeed(-num2);
                            goto Label_1E1E;

                        case Direction.Down:
                            obj13.YSpeed.SetSpeed(num2);
                            goto Label_1E1E;
                    }
                    goto Label_1E10;
                }
                case ObjectType.Skeleton:
                case ObjectType.MasterSkeleton:
                case ObjectType.SkeletonBody:
                {
                    string str = "";
                    if (t != ObjectType.Skeleton)
                    {
                        if (t == ObjectType.MasterSkeleton)
                        {
                            str = "masterskeleton.bmp";
                            difficulty = 14;
                        }
                        else if (t == ObjectType.SkeletonBody)
                        {
                            str = "skeletonbody.bmp";
                            difficulty = 5;
                        }
                    }
                    else
                    {
                        str = "skeleton.bmp";
                        difficulty = 9;
                    }
                    GameTexture texture31 = new GameTexture(str, new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj32 = new GameObject(texture31, t, color);
                    Size size31 = new Size(0x20, 0x20);
                    EnemyBehavior behavior23 = new EnemyBehavior(obj32, 1, delay);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj32.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size31, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj32.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size31, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj32.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size31, numArray, 2, true));
                    obj32.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size31, new int[] { 2 }, 4, true));
                    obj32.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size31, new int[] { 2 }, 4, true));
                    SizeF ef69 = new SizeF(24f, 32f);
                    if (t == ObjectType.SkeletonBody)
                    {
                        ef69.Height = 24f;
                    }
                    obj32.GetAnimation(AnimType.Stopped).HitboxSize = ef69;
                    obj32.GetAnimation(AnimType.Hit).HitboxSize = ef69;
                    obj32.GetAnimation(AnimType.Jump).HitboxSize = ef69;
                    Jump jump = new Jump(5f, 8f, true, true);
                    behavior23.AddNearAction(new SetSpeed(ActionPresets.Gravity));
                    behavior23.AddNearAction(new SetSpeed(1f, 0.5f, true));
                    behavior23.AddNearAction(new SkeletonAction(jump));
                    behavior23.AddNearAction(new SetSpeed(1f, 1f, true));
                    behavior23.AddFarAction(new Wait(5));
                    behavior23.AddFarAction(new SetSpeed(ActionPresets.Gravity));
                    behavior23.AddFarAction(new SetSpeed(1f, 1f, true));
                    behavior23.AddHitAction(new Wait(1));
                    behavior23.AddHitAction(new FacePlayer());
                    behavior23.AddHitAction(new Stop(true, false, false));
                    behavior23.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior23.AddHitAction(new Wait(40));
                    behavior23.AddHitWallAction(new Reverse());
                    behavior23.AddHitWallAction(new Wait(30));
                    behavior23.AttackDistance = 60;
                    obj32.SetBehavior(behavior23);
                    obj32.ObjClass = ObjectClass.Enemy;
                    obj32.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj32.StopsAtLedges = true;
                    obj32.StopsAtBoundries = false;
                    obj32.StopsAtSides = true;
                    obj32.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior23, itemDrops);
                    return obj32;
                }
                case ObjectType.MasterSkull:
                case ObjectType.Skull:
                {
                    string str2 = "";
                    if (t != ObjectType.Skull)
                    {
                        difficulty = 8;
                        str2 = "masterskull.bmp";
                    }
                    else
                    {
                        difficulty = 6;
                        str2 = "skull.bmp";
                    }
                    GameTexture texture32 = new GameTexture(str2, new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj33 = new GameObject(texture32, t, color);
                    Size size32 = new Size(0x20, 0x20);
                    EnemyBehavior behavior24 = new EnemyBehavior(obj33, 1, delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.FaceWhenCreated);
                    numArray = new int[1];
                    obj33.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size32, numArray, 8, 15, true));
                    numArray = new int[1];
                    obj33.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size32, numArray, 8, 15, true));
                    obj33.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size32, new int[] { 1 }, 4, true));
                    obj33.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size32, new int[] { 1 }, 4, true));
                    SizeF ef70 = new SizeF(16f, 16f);
                    obj33.GetAnimation(AnimType.Stopped).HitboxSize = ef70;
                    obj33.GetAnimation(AnimType.Hit).HitboxSize = ef70;
                    behavior24.AddNearAction(new SetSpeed(1f, 0.5f, true));
                    behavior24.AddNearAction(new Wait(120));
                    behavior24.AddNearAction(new Stop(true, false, true));
                    behavior24.AddNearAction(new Jump(new Speed(3f, 0.5f, -3f), false, false, false));
                    behavior24.AddNearAction(new Wait(0x37));
                    behavior24.AddNearAction(new Stop(true, true, true));
                    behavior24.AddFarAction(new Wait(5));
                    behavior24.AddFarAction(new FacePlayer());
                    behavior24.AddFarAction(new SetSpeed(1.5f, 1f, true));
                    behavior24.AddHitAction(new Wait(1));
                    behavior24.AddHitAction(new FacePlayer());
                    behavior24.AddHitAction(new Stop(true, false, false));
                    behavior24.AddHitAction(new Wait(40));
                    behavior24.AddHitWallAction(new Reverse());
                    behavior24.AddHitWallAction(new Wait(30));
                    behavior24.AttackDistance = 120;
                    obj33.SetBehavior(behavior24);
                    obj33.ObjClass = ObjectClass.Enemy;
                    obj33.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj33.Solid = false;
                    obj33.CurrentDirection = direction;
                    obj33.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior24, itemDrops);
                    return obj33;
                }
                case ObjectType.Samurai:
                {
                    int num6 = 0;
                    GameTexture texture28 = new GameTexture("samurai.bmp", new Size(0x20, 0x20), ColorSwaps.Green, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj29 = new GameObject(texture28, t, color);
                    difficulty = 8;
                    Size size28 = new Size(0x20, 0x20);
                    if (color != ColorSwaps.Red)
                    {
                        if (color == ColorSwaps.Green)
                        {
                            num6 = 400;
                        }
                        else if (color == ColorSwaps.Blue)
                        {
                            num6 = 0x20a;
                        }
                    }
                    else
                    {
                        num6 = 0x10a;
                    }
                    EnemyBehavior behavior20 = new EnemyBehavior(obj29, num6, delay, ActivationTypes.ActivateIfClose, FacePlayerBehavior.FaceWhenCreated);
                    obj29.YSpeed.Acceleration = 2f;
                    obj29.YSpeed.TargetSpeed = 4f;
                    obj29.XSpeed.Acceleration = 0.3f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj29.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size28, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj29.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size28, numArray, 8, 15, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj29.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size28, numArray, 8, 0x10, true));
                    numArray = new int[1];
                    obj29.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size28, numArray, 2, true));
                    obj29.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size28, new int[] { 2 }, 4, true));
                    obj29.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size28, new int[] { 2 }, 4, true));
                    SizeF ef64 = new SizeF(22f, 32f);
                    RectangleF ef65 = new RectangleF(0f, -22f, 8f, 8f);
                    obj29.GetAnimation(AnimType.Stopped).HitboxSize = ef64;
                    obj29.GetAnimation(AnimType.Stopped2).HitboxSize = ef64;
                    obj29.GetAnimation(AnimType.Hit).HitboxSize = ef64;
                    obj29.GetAnimation(AnimType.Jump).HitboxSize = ef64;
                    obj29.GetAnimation(AnimType.Attacking).HitboxSize = ef64;
                    obj29.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef65;
                    behavior20.AddNearAction(new SetSpeed(ActionPresets.LightGravity));
                    behavior20.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior20.AddNearAction(new FacePlayer());
                    behavior20.AddNearAction(new SetSpeed(1f, true));
                    behavior20.AddNearAction(new Wait(30));
                    behavior20.AddNearAction(new FacePlayer());
                    behavior20.AddNearAction(new Jump(0f, 3f, false, false));
                    behavior20.AddNearAction(new SetSpeed(2.5f, 1f, 0.2f, true));
                    behavior20.AddNearAction(new Wait(120));
                    behavior20.AddFarAction(new SetSpeed(ActionPresets.LightGravity));
                    behavior20.AddFarAction(new PlayAnimation(AnimType.Stopped2));
                    behavior20.AddFarAction(new FacePlayer());
                    behavior20.AddFarAction(new SetSpeed(1f, true));
                    behavior20.AddFarAction(new Wait(5));
                    behavior20.AddHitAction(new Wait(1));
                    behavior20.AddHitAction(new FacePlayer());
                    behavior20.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior20.AddHitAction(new Stop(true, false, false));
                    behavior20.AddHitAction(new Wait(20));
                    behavior20.AddPlayerAttackAction(new Jump(-3f, 4f, true, true));
                    behavior20.AddPlayerAttackAction(new Stop(true, false, false));
                    if (color == ColorSwaps.Green)
                    {
                        behavior20.AddPlayerAttackAction(new Shoot(ObjectType.BlueBullet, GetEnemyBulletDamage(difficulty, (int) color), 3f, -6.5f, 1, 1, true, true));
                    }
                    else if (color == ColorSwaps.Blue)
                    {
                        behavior20.AddPlayerAttackAction(new Shoot(ObjectType.BlueBullet, GetEnemyBulletDamage(difficulty, (int) color), 4f, -7f, 1.5f, 1, true));
                        behavior20.AddPlayerAttackAction(new Shoot(ObjectType.BlueBullet, GetEnemyBulletDamage(difficulty, (int) color), 3f, -6f, 1.5f, 1, true));
                        behavior20.AddPlayerAttackAction(new Shoot(ObjectType.BlueBullet, GetEnemyBulletDamage(difficulty, (int) color), 2f, -5f, 1.5f, 1, true));
                    }
                    behavior20.AddPlayerAttackAction(new Wait(30));
                    behavior20.AddHitWallAction(new Reverse());
                    behavior20.AddHitWallAction(new Wait(30));
                    behavior20.AttackDistance = 100;
                    obj29.SetBehavior(behavior20);
                    obj29.ObjClass = ObjectClass.Enemy;
                    obj29.AttackDamage = GetEnemyDamage(difficulty + 3, (int) color);
                    obj29.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior20, itemDrops);
                    return obj29;
                }
                case ObjectType.Shadow:
                {
                    difficulty = 6;
                    GameTexture texture20 = new GameTexture("shadow.bmp", new Size(0x20, 0x20), ColorSwaps.Blue, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj21 = new GameObject(texture20, t, color);
                    Size size20 = new Size(0x20, 0x20);
                    EnemyBehavior behavior12 = new EnemyBehavior(obj21, GetEnemyHP(difficulty, (int) color), delay, ActivationTypes.ActivateIfFacing, FacePlayerBehavior.None);
                    obj21.YSpeed.Acceleration = 2f;
                    obj21.YSpeed.TargetSpeed = 4f;
                    obj21.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[1];
                    obj21.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Ghost, size20, numArray, 8, true));
                    obj21.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size20, new int[] { 1 }, 8, true));
                    obj21.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size20, new int[] { 2, 3 }, 6, true));
                    obj21.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size20, new int[] { 4 }, 8, true));
                    obj21.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size20, new int[] { 5 }, 1, true));
                    obj21.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size20, new int[] { 5 }, 1, true));
                    SizeF ef48 = new SizeF(18f, 12f);
                    SizeF ef49 = new SizeF(18f, 32f);
                    RectangleF ef50 = new RectangleF(0f, -14f, 4f, 4f);
                    obj21.GetAnimation(AnimType.Stopped).HitboxSize = ef48;
                    obj21.GetAnimation(AnimType.Stopped2).HitboxSize = ef48;
                    obj21.GetAnimation(AnimType.Stopped2).HitboxSize = ef48;
                    obj21.GetAnimation(AnimType.Hit).HitboxSize = ef49;
                    obj21.GetAnimation(AnimType.Attacking).HitboxSize = ef49;
                    obj21.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef50;
                    behavior12.AddNearAction(new Wait(10));
                    behavior12.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior12.AddNearAction(new Wait(5));
                    if (color != ColorSwaps.Green)
                    {
                        if (color == ColorSwaps.Blue)
                        {
                            behavior12.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 5f, 0f, 40, 40, false, true));
                        }
                        else if (color == ColorSwaps.Yellow)
                        {
                            Shoot shoot = new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty + 1, (int) color), 6f, 0f, 2, 2, false, true);
                            Shoot shoot2 = new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty + 1, (int) color), 6f, 0f, 20, 2, false, true);
                            behavior12.AddNearAction(shoot2);
                            behavior12.AddNearAction(new MultiAction(shoot, 3, 5));
                        }
                        else
                        {
                            behavior12.AddNearAction(new PlayAnimation(AnimType.Attacking));
                            behavior12.AddNearAction(new Wait(40));
                        }
                    }
                    else
                    {
                        behavior12.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 40, 40, false, true));
                    }
                    behavior12.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior12.AddNearAction(new Wait(10));
                    behavior12.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior12.AddNearAction(new Wait(60));
                    behavior12.AddFarAction(new Wait(30));
                    behavior12.AddHitAction(new Wait(1));
                    behavior12.AddHitAction(new Wait(40));
                    behavior12.AddHitAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, (int) color), 3f, 0f, 40, 40, false, true));
                    behavior12.AddHitAction(new PlayAnimation(AnimType.Stopped2));
                    behavior12.AddHitAction(new Wait(10));
                    obj21.CurrentDirection = direction;
                    if (color == ColorSwaps.Yellow)
                    {
                        behavior12.AttackDistance = 150;
                    }
                    else
                    {
                        behavior12.AttackDistance = 100;
                    }
                    obj21.SetBehavior(behavior12);
                    obj21.ObjClass = ObjectClass.Enemy;
                    obj21.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    AddItemDrops(behavior12, itemDrops);
                    return obj21;
                }
                case ObjectType.ShortFireFlower:
                {
                    GameTexture texture17 = new GameTexture("fireFlowerS.bmp", new Size(0x20, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj18 = new GameObject(texture17, t, ColorSwaps.Normal);
                    Size size17 = new Size(0x20, 0x10);
                    EnemyBehavior behavior9 = new EnemyBehavior(obj18, 1, delay);
                    difficulty = GameEngine.Game.BaseDifficulty;
                    obj18.YSpeed.Acceleration = 2f;
                    obj18.YSpeed.TargetSpeed = 4f;
                    obj18.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj18.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size17, numArray, 8, true));
                    obj18.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size17, new int[] { 2 }, 1, true));
                    obj18.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size17, new int[] { 3 }, 1, true));
                    obj18.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size17, new int[] { 3 }, 1, true));
                    SizeF ef43 = new SizeF(13f, 16f);
                    RectangleF ef44 = new RectangleF(-8f, -16f, 16f, 16f);
                    obj18.GetAnimation(AnimType.Stopped).HitboxSize = ef43;
                    obj18.GetAnimation(AnimType.Hit).HitboxSize = ef43;
                    obj18.GetAnimation(AnimType.Attacking).HitboxSize = ef43;
                    obj18.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef44;
                    behavior9.AddNearAction(new Wait(60));
                    behavior9.AddNearAction(new FacePlayer());
                    behavior9.AddNearAction(new Shoot(ObjectType.Bullet, GetEnemyBulletDamage(difficulty, 1), 2f, 0f, 30, 1, false, true));
                    behavior9.AddNearAction(new Wait(30, true));
                    behavior9.AddFarAction(new Wait(30));
                    behavior9.AddFarAction(new FacePlayer());
                    behavior9.AddHitAction(new Wait(1));
                    behavior9.AddHitAction(new FacePlayer());
                    behavior9.AddHitAction(new Wait(40));
                    behavior9.AttackDistance = 200;
                    obj18.SetBehavior(behavior9);
                    obj18.ObjClass = ObjectClass.Enemy;
                    obj18.AttackDamage = GetEnemyDamage(difficulty, 1);
                    AddItemDrops(behavior9, itemDrops);
                    return obj18;
                }
                case ObjectType.Snake:
                {
                    GameTexture texture9 = new GameTexture("snake.bmp", new Size(0x20, 0x20), ColorSwaps.Green, color, TextureDisposePolicy.DisposeOnTileChange);
                    obj10 = new GameObject(texture9, t, color);
                    Size size9 = new Size(0x20, 0x20);
                    behavior = new EnemyBehavior(obj10, GetEnemyHP(difficulty, (int) color), delay);
                    obj10.YSpeed.Acceleration = 2f;
                    obj10.YSpeed.TargetSpeed = 4f;
                    obj10.XSpeed.TargetSpeed = 0f;
                    obj10.XSpeed.Acceleration = 0.3f;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj10.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size9, numArray, 8, true));
                    obj10.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size9, new int[] { 2 }, 1, true));
                    obj10.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size9, new int[] { 3 }, 1, true));
                    obj10.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size9, new int[] { 3 }, 1, true));
                    SizeF ef31 = new SizeF(18f, 25f);
                    SizeF ef32 = new SizeF(25f, 25f);
                    obj10.GetAnimation(AnimType.Stopped).HitboxSize = ef31;
                    obj10.GetAnimation(AnimType.Hit).HitboxSize = ef31;
                    obj10.GetAnimation(AnimType.Jump).HitboxSize = ef32;
                    behavior.AddNearAction(new SetSpeed(ActionPresets.Gravity));
                    if (color < ColorSwaps.Blue)
                    {
                        behavior.AddNearAction(new Wait(10));
                        break;
                    }
                    behavior.AddNearAction(new Wait(2));
                    break;
                }
                case ObjectType.Smog:
                {
                    ObjectType smogFireball;
                    GameTexture texture13 = new GameTexture("smog.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj14 = new GameObject(texture13, t, color);
                    Size size13 = new Size(0x20, 0x20);
                    EnemyBehavior behavior5 = new EnemyBehavior(obj14, GetEnemyHP(difficulty, (int) color), delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.AlwaysFace);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj14.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size13, numArray, 8, true));
                    obj14.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size13, new int[] { 2 }, 1, true));
                    obj14.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size13, new int[] { 2 }, 1, true));
                    SizeF ef37 = new SizeF(32f, 16f);
                    Rectangle rectangle = new Rectangle(-16, -16, 0x20, 0x10);
                    obj14.GetAnimation(AnimType.Stopped).HitboxSize = ef37;
                    obj14.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = rectangle;
                    obj14.GetAnimation(AnimType.Hit).HitboxSize = ef37;
                    if (color != ColorSwaps.Red)
                    {
                        if (color == ColorSwaps.Green)
                        {
                            smogFireball = ObjectType.SmogFireball2;
                        }
                        else
                        {
                            smogFireball = ObjectType.SmogFireball3;
                        }
                    }
                    else
                    {
                        smogFireball = ObjectType.SmogFireball;
                    }
                    behavior5.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior5.AddNearAction(new FacePlayer());
                    behavior5.AddNearAction(new Hover(new Speed(0f, 0.8f, 4f), new Speed(0f, 0f, 0f), 60, true));
                    behavior5.AddNearAction(new Shoot(smogFireball, GetEnemyBulletDamage(difficulty, (int) color), 0f, -3f, 1, 1, true, false));
                    behavior5.AddFarAction(new PlayAnimation(AnimType.Stopped));
                    behavior5.AddFarAction(new FacePlayer());
                    behavior5.AddHitAction(new Wait(1));
                    behavior5.AddHitAction(new FacePlayer());
                    behavior5.AddHitAction(new Stop(true, true, true));
                    behavior5.AddHitAction(new Wait(60));
                    behavior5.AddHitWallAction(new Bounce(-2, 0, 0.2f));
                    behavior5.AddHitWallAction(new Wait(30));
                    behavior5.AttackDistance = 300;
                    if (color > ColorSwaps.Red)
                    {
                        behavior5.AttackDistance = 600;
                    }
                    obj14.SetBehavior(behavior5);
                    obj14.ObjClass = ObjectClass.Enemy;
                    obj14.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj14.StopsAtBoundries = false;
                    AddItemDrops(behavior5, itemDrops);
                    obj14.Solid = true;
                    return obj14;
                }
                case ObjectType.Toad:
                {
                    difficulty = 4;
                    GameTexture texture10 = new GameTexture("toad.bmp", new Size(0x20, 0x20), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj11 = new GameObject(texture10, t, color);
                    Size size10 = new Size(0x20, 0x20);
                    EnemyBehavior behavior2 = new EnemyBehavior(obj11, GetEnemyHP(3, 6, 7, 8, (int) color), delay, ActivationTypes.ActivateIfClose, FacePlayerBehavior.FaceWhenCreated);
                    obj11.YSpeed.Acceleration = 1f;
                    obj11.YSpeed.TargetSpeed = 4f;
                    obj11.XSpeed.TargetSpeed = 0f;
                    obj11.XSpeed.Acceleration = 1f;
                    numArray = new int[1];
                    obj11.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size10, numArray, 8, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj11.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size10, numArray, 8, true));
                    obj11.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size10, new int[] { 2 }, 1, true));
                    obj11.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size10, new int[] { 3 }, 1, true));
                    obj11.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size10, new int[] { 3 }, 1, true));
                    SizeF ef33 = new SizeF(18f, 25f);
                    SizeF ef34 = new SizeF(25f, 25f);
                    obj11.GetAnimation(AnimType.Stopped).HitboxSize = ef33;
                    obj11.GetAnimation(AnimType.Stopped2).HitboxSize = ef33;
                    obj11.GetAnimation(AnimType.Hit).HitboxSize = ef33;
                    obj11.GetAnimation(AnimType.Jump).HitboxSize = ef34;
                    behavior2.AddNearAction(new Wait(30));
                    behavior2.AddNearAction(new FacePlayer());
                    behavior2.AddNearAction(new MultiAction(new Jump(new Speed(1.4f, 1.4f, 1.4f), new Speed(-6f, 1f, 6f), true, true), ((int) color) + 1, 0));
                    behavior2.AddNearAction(new Stop(true, false, true));
                    behavior2.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    if (color != ColorSwaps.Red)
                    {
                        behavior2.AddNearAction(new Wait(30));
                    }
                    else
                    {
                        behavior2.AddNearAction(new Wait(180));
                    }
                    behavior2.AddFarAction(new Stop(true, false, true));
                    behavior2.AddFarAction(new SetSpeed(ActionPresets.Gravity));
                    behavior2.AddFarAction(new Wait(30));
                    behavior2.AddFarAction(new FacePlayer());
                    behavior2.AddHitAction(new Wait(1));
                    behavior2.AddHitAction(new FacePlayer());
                    behavior2.AddHitAction(new Jump(ActionPresets.Recoil));
                    behavior2.AddHitAction(new Wait(40));
                    behavior2.AttackDistance = 200;
                    obj11.SetBehavior(behavior2);
                    obj11.ObjClass = ObjectClass.Enemy;
                    obj11.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj11.StopsAtBoundries = false;
                    AddItemDrops(behavior2, itemDrops);
                    return obj11;
                }
                case ObjectType.Willowisp:
                {
                    difficulty = 3;
                    int num3 = GetEnemyHP(3, 6, 7, 8, (int) color);
                    if (color > ColorSwaps.Red)
                    {
                        num3 += 30;
                    }
                    GameTexture texture15 = new GameTexture("willowisp.bmp", new Size(0x10, 0x10), ColorSwaps.Red, color, TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj16 = new GameObject(texture15, t, color);
                    Size size15 = new Size(0x10, 0x10);
                    EnemyBehavior behavior7 = new EnemyBehavior(obj16, num3, delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.None);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj16.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size15, numArray, 8, true));
                    obj16.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size15, new int[] { 2, 3 }, 1, true));
                    obj16.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size15, new int[] { 2, 3 }, 1, true));
                    SizeF ef40 = new SizeF(16f, 16f);
                    obj16.GetAnimation(AnimType.Stopped).HitboxSize = ef40;
                    obj16.GetAnimation(AnimType.Hit).HitboxSize = ef40;
                    behavior7.AddNearAction(new PlayAnimation(AnimType.Stopped));
                    behavior7.AddNearAction(new FacePlayer());
                    behavior7.AddNearAction(new SetSpeed(1f, 0.5f, true));
                    behavior7.AddNearAction(new Hover(new Speed(0f, 0f, 0f), new Speed(0f, 0.2f, 1f), 180, true));
                    behavior7.AddFarAction(new PlayAnimation(AnimType.Stopped));
                    behavior7.AddFarAction(new FacePlayer());
                    behavior7.AddHitAction(new Wait(1));
                    behavior7.AddHitAction(new FacePlayer());
                    behavior7.AddHitAction(new Bounce(-2, -2));
                    behavior7.AddHitAction(new Wait(40));
                    behavior7.AddHitWallAction(new Bounce(-1, -1, 0.1f));
                    behavior7.AddHitWallAction(new Wait(30));
                    behavior7.AttackDistance = 300;
                    obj16.SetBehavior(behavior7);
                    obj16.ObjClass = ObjectClass.Enemy;
                    obj16.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    obj16.StopsAtBoundries = true;
                    AddItemDrops(behavior7, itemDrops);
                    obj16.Solid = true;
                    return obj16;
                }
                case ObjectType.MechaDragon:
                {
                    GameTexture texture33 = new GameTexture("mecha.bmp", new Size(0x40, 0x48), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj34 = new GameObject(texture33, t, color);
                    Size size33 = new Size(0x40, 0x48);
                    difficulty = 5;
                    obj34.ObjClass = ObjectClass.Boss;
                    obj34.YSpeed.Acceleration = 1f;
                    obj34.YSpeed.TargetSpeed = 4f;
                    obj34.XSpeed.SetSpeed((float) 0f);
                    obj34.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size33, new int[] { 3 }, 8, true));
                    obj34.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size33, new int[] { 3, 2 }, 8, true));
                    obj34.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size33, new int[] { 1 }, 8, true));
                    numArray = new int[1];
                    obj34.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size33, numArray, 4, true));
                    numArray = new int[1];
                    obj34.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size33, numArray, 4, true));
                    SizeF ef71 = new SizeF(56f, 72f);
                    RectangleF ef72 = new RectangleF(8f, -64f, 24f, 24f);
                    obj34.GetAnimation(AnimType.Stopped).HitboxSize = ef71;
                    obj34.GetAnimation(AnimType.Stopped2).HitboxSize = ef71;
                    obj34.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef72;
                    obj34.GetAnimation(AnimType.Attacking).HitboxSize = ef71;
                    obj34.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef72;
                    obj34.GetAnimation(AnimType.Hit).HitboxSize = ef71;
                    obj34.GetAnimation(AnimType.Dying).HitboxSize = ef71;
                    obj34.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef72;
                    EnemyBehavior behavior25 = new EnemyBehavior(obj34, 0x7d0, delay);
                    obj34.CurrentDirection = Direction.Left;
                    behavior25.AddFarAction(new Wait(10));
                    MultiAction action = new MultiAction(new Shoot(ObjectType.MechaFireball, GetEnemyBulletDamage(difficulty, 2), 6f, 4f, 1, 1, false, true, SoundEffects.LizardFire), 10, 3);
                    behavior25.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior25.AddNearAction(new MechaDragonMotion());
                    behavior25.AddNearAction(new Stop(true, true, false));
                    behavior25.AddNearAction(action);
                    behavior25.AddNearAction(new Wait(20));
                    behavior25.AddHitAction(new Wait(1));
                    behavior25.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior25.AddHitAction(new Wait(40));
                    behavior25.AddHitAction(new Stop(true, true, false));
                    behavior25.AddHitAction(action);
                    behavior25.AddHitAction(new Wait(20));
                    behavior25.AttackDistance = 0x3e8;
                    obj34.SetBehavior(behavior25);
                    obj34.StopsAtBoundries = true;
                    obj34.AttackDamage = GetEnemyDamage(difficulty, 2);
                    obj34.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior25, itemDrops);
                    return obj34;
                }
                case ObjectType.MummyDragon:
                {
                    difficulty = 5;
                    GameTexture texture34 = new GameTexture("mummydragon.bmp", new Size(0x40, 0x40), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj35 = new GameObject(texture34, t, color);
                    Size size34 = new Size(0x40, 0x40);
                    obj35.ObjClass = ObjectClass.Boss;
                    obj35.YSpeed.Acceleration = 1f;
                    obj35.YSpeed.TargetSpeed = 4f;
                    obj35.XSpeed.SetSpeed((float) 0f);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj35.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size34, numArray, 8, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj35.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size34, numArray, 8, true));
                    obj35.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size34, new int[] { 2 }, 8, true));
                    obj35.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size34, new int[] { 3 }, 4, true));
                    obj35.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.Invincible, size34, new int[] { 3 }, 4, true));
                    SizeF ef73 = new SizeF(56f, 72f);
                    RectangleF ef74 = new RectangleF(16f, -48f, 16f, 8f);
                    RectangleF ef75 = new RectangleF(8f, -56f, 16f, 8f);
                    obj35.GetAnimation(AnimType.Stopped).HitboxSize = ef73;
                    obj35.GetAnimation(AnimType.Stopped2).HitboxSize = ef73;
                    obj35.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef75;
                    obj35.GetAnimation(AnimType.Attacking).HitboxSize = ef73;
                    obj35.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef74;
                    obj35.GetAnimation(AnimType.Hit).HitboxSize = ef73;
                    obj35.GetAnimation(AnimType.Dying).HitboxSize = ef73;
                    obj35.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef75;
                    EnemyBehavior behavior26 = new EnemyBehavior(obj35, 200, delay);
                    obj35.CurrentDirection = Direction.Left;
                    behavior26.AddFarAction(new Wait(10));
                    behavior26.AddFarAction(new PlayAnimation(AnimType.Stopped2));
                    behavior26.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior26.AddNearAction(new MummyDragonMotion());
                    behavior26.AddHitAction(new Wait(1));
                    behavior26.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior26.AddHitAction(new Wait(40));
                    behavior26.AddHitAction(new SetSpeed(-2f, -3f, false));
                    behavior26.AddHitAction(new Wait(3));
                    behavior26.AddHitAction(new SetSpeed(0f, 0f, false));
                    obj35.AttackDamage = GetEnemyDamage(difficulty, (int) color);
                    behavior26.AttackDistance = 0x3e8;
                    obj35.SetBehavior(behavior26);
                    obj35.StopsAtBoundries = true;
                    obj35.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior26, itemDrops);
                    return obj35;
                }
                case ObjectType.ZombieDragon:
                {
                    difficulty = 8;
                    GameTexture texture35 = new GameTexture("dragonzombie.bmp", new Size(0x40, 0x40), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj36 = new GameObject(texture35, t, color);
                    Size size35 = new Size(0x40, 0x40);
                    obj36.ObjClass = ObjectClass.Boss;
                    obj36.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size35, new int[] { 1, 2 }, 8, true));
                    numArray = new int[1];
                    obj36.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Invincible, size35, numArray, 8, true));
                    obj36.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Invincible, size35, new int[] { 3, 4 }, 8, true));
                    obj36.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.Invincible, size35, new int[] { 5 }, 4, true));
                    obj36.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.Invincible, size35, new int[] { 5 }, 4, true));
                    SizeF ef76 = new SizeF(32f, 64f);
                    RectangleF ef77 = new RectangleF(12f, -48f, 16f, 16f);
                    RectangleF ef78 = new RectangleF(16f, -40f, 16f, 16f);
                    obj36.GetAnimation(AnimType.Stopped).HitboxSize = ef76;
                    obj36.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef77;
                    obj36.GetAnimation(AnimType.Stopped2).HitboxSize = ef76;
                    obj36.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef77;
                    obj36.GetAnimation(AnimType.Attacking).HitboxSize = ef76;
                    obj36.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef78;
                    obj36.GetAnimation(AnimType.Hit).HitboxSize = ef76;
                    obj36.GetAnimation(AnimType.Dying).HitboxSize = ef76;
                    obj36.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef78;
                    EnemyBehavior behavior27 = new EnemyBehavior(obj36, 0x4b0, delay);
                    obj36.CurrentDirection = Direction.Left;
                    behavior27.AddFarAction(new Wait(10));
                    behavior27.AddNearAction(new ZombieDragonMotion());
                    behavior27.AddHitAction(new Wait(1));
                    behavior27.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior27.AddHitAction(new Wait(40));
                    behavior27.AddHitAction(new PlayAnimation(AnimType.Stopped2));
                    behavior27.AddHitAction(new SetSpeed(2f, 2f, 2f, false));
                    obj36.AttackDamage = GetEnemyDamage(difficulty, 0);
                    behavior27.AttackDistance = 0x3e8;
                    obj36.SetBehavior(behavior27);
                    obj36.StopsAtBoundries = false;
                    obj36.Solid = false;
                    obj36.CurrentAnimation = AnimType.Stopped2;
                    AddItemDrops(behavior27, itemDrops);
                    return obj36;
                }
                case ObjectType.PirateDragon:
                {
                    GameTexture texture36 = new GameTexture("piratedragon.bmp", new Size(0x48, 0x48), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj37 = new GameObject(texture36, t, color);
                    Size size36 = new Size(0x48, 0x48);
                    obj37.ObjClass = ObjectClass.Boss;
                    obj37.XSpeed.SetSpeed((float) 0f);
                    obj37.YSpeed.SetSpeed((float) 0f);
                    int num8 = 0x20;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj37.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size36, numArray, 8, num8, true));
                    obj37.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size36, new int[] { 2, 3 }, 8, num8, true));
                    obj37.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size36, new int[] { 4, 5 }, 8, num8, true));
                    obj37.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size36, new int[] { 6 }, 8, num8, true));
                    obj37.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size36, new int[] { 7 }, 4, true));
                    obj37.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.Invincible, size36, new int[] { 7 }, 4, true));
                    SizeF ef79 = new SizeF(32f, 72f);
                    RectangleF ef80 = new RectangleF(0f, -64f, 24f, 16f);
                    RectangleF ef81 = new RectangleF(24f, -72f, 8f, 8f);
                    obj37.GetAnimation(AnimType.Stopped).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef80;
                    obj37.GetAnimation(AnimType.Stopped2).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef80;
                    obj37.GetAnimation(AnimType.Stopped2).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef80;
                    obj37.GetAnimation(AnimType.Attacking).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef81;
                    obj37.GetAnimation(AnimType.Hit).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Dying).HitboxSize = ef79;
                    obj37.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef81;
                    EnemyBehavior behavior28 = new EnemyBehavior(obj37, 0x5dc, delay);
                    obj37.CurrentDirection = Direction.Left;
                    behavior28.AddFarAction(new Wait(10));
                    behavior28.AddFarAction(new PlayAnimation(AnimType.Stopped2));
                    behavior28.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior28.AddNearAction(new PirateDragonMotion());
                    behavior28.AddHitAction(new Wait(1));
                    behavior28.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior28.AddHitAction(new Wait(5));
                    obj37.AttackDamage = GetEnemyDamage(5, 1);
                    behavior28.AttackDistance = 0x3e8;
                    obj37.SetBehavior(behavior28);
                    obj37.StopsAtBoundries = true;
                    obj37.Solid = true;
                    obj37.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior28, itemDrops);
                    return obj37;
                }
                case ObjectType.DaiymoDragon:
                {
                    GameTexture texture37 = new GameTexture("daiymodragon.bmp", new Size(0x40, 0x60), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj38 = new GameObject(texture37, t, color);
                    Size size37 = new Size(0x40, 0x60);
                    obj38.ObjClass = ObjectClass.Boss;
                    obj38.XSpeed.SetSpeed((float) 0f);
                    obj38.YSpeed.SetSpeed((float) 0f);
                    int num9 = 0x18;
                    obj38.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size37, new int[] { 2 }, 8, num9, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj38.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Invincible, size37, numArray, 8, num9, true));
                    obj38.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Invincible, size37, new int[] { 2, 1, 3 }, 4, num9, true));
                    obj38.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size37, new int[] { 4 }, 4, true));
                    obj38.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.Invincible, size37, new int[] { 4 }, 4, true));
                    SizeF ef82 = new SizeF(24f, 48f);
                    RectangleF ef83 = new RectangleF(0f, -64f, 20f, 20f);
                    obj38.GetAnimation(AnimType.Stopped).HitboxSize = ef82;
                    obj38.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef83;
                    obj38.GetAnimation(AnimType.Stopped2).HitboxSize = ef82;
                    obj38.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef83;
                    obj38.GetAnimation(AnimType.Attacking).HitboxSize = ef82;
                    obj38.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef83;
                    obj38.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj38.GetAnimation(AnimType.Hit).HitboxSize = ef82;
                    obj38.GetAnimation(AnimType.Dying).HitboxSize = ef82;
                    obj38.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef83;
                    EnemyBehavior behavior29 = new EnemyBehavior(obj38, 0xbb8, delay);
                    obj38.CurrentDirection = Direction.Left;
                    behavior29.AddFarAction(new Wait(10));
                    behavior29.AddFarAction(new PlayAnimation(AnimType.Stopped2));
                    behavior29.AddNearAction(new DaiymoDragonMotion());
                    behavior29.AddHitAction(new Wait(1));
                    behavior29.AddHitAction(new Jump(new Speed(-2f, 0.5f, 0f), true, false, false));
                    behavior29.AddHitAction(new Wait(20));
                    obj38.AttackDamage = GetEnemyDamage(7, 2);
                    behavior29.AttackDistance = 0x3e8;
                    behavior29.AwakenDistance = 0x3e8;
                    obj38.SetBehavior(behavior29);
                    obj38.StopsAtBoundries = true;
                    obj38.Solid = true;
                    obj38.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior29, itemDrops);
                    return obj38;
                }
                case ObjectType.VampireDragon:
                {
                    GameTexture texture38 = new GameTexture("vampireDragon.bmp", new Size(0x48, 0x48), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj39 = new GameObject(texture38, t, color);
                    Size size38 = new Size(0x48, 0x48);
                    difficulty = 10;
                    obj39.ObjClass = ObjectClass.Boss;
                    obj39.XSpeed.SetSpeed((float) -2f);
                    obj39.YSpeed.SetSpeed((float) 0f);
                    int num10 = 0x2a;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj39.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size38, numArray, 8, num10, true));
                    obj39.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size38, new int[] { 2, 3 }, 4, num10, true));
                    obj39.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size38, new int[] { 4 }, 4, true));
                    obj39.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size38, new int[] { 4 }, 4, true));
                    SizeF ef84 = new SizeF(24f, 64f);
                    RectangleF ef85 = new RectangleF(-8f, -40f, 20f, 20f);
                    obj39.GetAnimation(AnimType.Stopped).HitboxSize = ef84;
                    obj39.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef85;
                    obj39.GetAnimation(AnimType.Attacking).HitboxSize = ef84;
                    obj39.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef85;
                    obj39.GetAnimation(AnimType.Hit).HitboxSize = ef84;
                    obj39.GetAnimation(AnimType.Dying).HitboxSize = ef84;
                    obj39.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef85;
                    EnemyBehavior behavior30 = new EnemyBehavior(obj39, 0xbb8, delay);
                    obj39.CurrentDirection = Direction.Left;
                    behavior30.AddFarAction(new Wait(10));
                    behavior30.AddFarAction(new PlayAnimation(AnimType.Stopped));
                    behavior30.AddNearAction(new VampireDragonMotion());
                    behavior30.AddHitAction(new Wait(1));
                    behavior30.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior30.AddHitAction(new Wait(20));
                    behavior30.AddHitAction(new VampireDragonFlee());
                    obj39.AttackDamage = GetEnemyDamage(7, 3);
                    behavior30.AttackDistance = 0x2328;
                    obj39.SetBehavior(behavior30);
                    obj39.StopsAtBoundries = false;
                    obj39.StopsAtSides = false;
                    obj39.Solid = false;
                    obj39.DeactivateIfFar = false;
                    obj39.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior30, itemDrops);
                    return obj39;
                }
                case ObjectType.MechaDragonX:
                {
                    GameTexture texture39 = new GameTexture("mecha.bmp", new Size(0x40, 0x48), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj40 = new GameObject(texture39, t, color);
                    Size size39 = new Size(0x40, 0x48);
                    difficulty = 12;
                    obj40.ObjClass = ObjectClass.Boss;
                    obj40.YSpeed.Acceleration = 1f;
                    obj40.YSpeed.TargetSpeed = 4f;
                    obj40.XSpeed.SetSpeed((float) 0f);
                    obj40.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size39, new int[] { 3 }, 8, true));
                    obj40.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size39, new int[] { 3, 2 }, 8, true));
                    obj40.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size39, new int[] { 1 }, 8, true));
                    numArray = new int[1];
                    obj40.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size39, numArray, 4, true));
                    numArray = new int[1];
                    obj40.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size39, numArray, 4, true));
                    SizeF ef86 = new SizeF(56f, 72f);
                    RectangleF ef87 = new RectangleF(8f, -64f, 24f, 24f);
                    obj40.GetAnimation(AnimType.Stopped).HitboxSize = ef86;
                    obj40.GetAnimation(AnimType.Stopped2).HitboxSize = ef86;
                    obj40.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef87;
                    obj40.GetAnimation(AnimType.Attacking).HitboxSize = ef86;
                    obj40.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef87;
                    obj40.GetAnimation(AnimType.Hit).HitboxSize = ef86;
                    obj40.GetAnimation(AnimType.Dying).HitboxSize = ef86;
                    obj40.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef87;
                    EnemyBehavior behavior31 = new EnemyBehavior(obj40, 0x7d0, delay);
                    obj40.CurrentDirection = Direction.Left;
                    behavior31.AddFarAction(new Wait(10));
                    MultiAction action2 = new MultiAction(new Shoot(ObjectType.MechaFireball2, GetEnemyBulletDamage(difficulty, 2), 6f, 4f, 1, 1, false, true, SoundEffects.LizardFire), 5, 3);
                    behavior31.AddNearAction(new PlayAnimation(AnimType.Stopped2));
                    behavior31.AddNearAction(new MechaDragonXMotion());
                    behavior31.AddNearAction(new Stop(true, true, false));
                    behavior31.AddNearAction(action2);
                    behavior31.AddNearAction(new Wait(20));
                    behavior31.AddHitAction(new Wait(1));
                    behavior31.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior31.AddHitAction(new Wait(40));
                    behavior31.AddHitAction(new Stop(true, true, false));
                    behavior31.AddHitAction(new SetSpeed(1.5f, 0f, 0.1f, true));
                    behavior31.AddHitAction(action2);
                    behavior31.AddHitAction(new Wait(20));
                    behavior31.AttackDistance = 0x3e8;
                    obj40.SetBehavior(behavior31);
                    obj40.StopsAtBoundries = true;
                    obj40.AttackDamage = GetEnemyDamage(difficulty, 2);
                    obj40.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior31, itemDrops);
                    return obj40;
                }
                case ObjectType.FinalDragon:
                {
                    GameTexture texture40 = new GameTexture("mechaX.bmp", new Size(0x80, 0x80), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj41 = new GameObject(texture40, t, color);
                    Size size40 = new Size(0x80, 0x70);
                    difficulty = 12;
                    obj41.ObjClass = ObjectClass.Boss;
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj41.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size40, numArray, 8, true));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj41.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size40, numArray, 8, true));
                    obj41.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size40, new int[] { 2 }, 8, true));
                    obj41.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size40, new int[] { 3 }, 4, true));
                    obj41.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size40, new int[] { 3 }, 4, true));
                    SizeF ef88 = new SizeF(32f, 64f);
                    RectangleF ef89 = new RectangleF(4f, -72f, 24f, 24f);
                    obj41.GetAnimation(AnimType.Stopped).HitboxSize = ef88;
                    obj41.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef89;
                    obj41.GetAnimation(AnimType.Stopped2).HitboxSize = ef88;
                    obj41.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef89;
                    obj41.GetAnimation(AnimType.Attacking).HitboxSize = ef88;
                    obj41.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef89;
                    obj41.GetAnimation(AnimType.Hit).HitboxSize = ef88;
                    obj41.GetAnimation(AnimType.Dying).HitboxSize = ef88;
                    obj41.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef89;
                    EnemyBehavior behavior32 = new EnemyBehavior(obj41, 0x1388, delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.AlwaysFace);
                    obj41.CurrentDirection = Direction.Left;
                    behavior32.AddFarAction(new Wait(5));
                    behavior32.AddNearAction(new FinalDragonMotion());
                    behavior32.AddHitAction(new Wait(1));
                    behavior32.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior32.AddHitAction(new Wait(40));
                    behavior32.AddHitAction(new Stop(true, true, false));
                    behavior32.AttackDistance = 0x1388;
                    obj41.SetBehavior(behavior32);
                    obj41.StopsAtBoundries = false;
                    obj41.AttackDamage = GetEnemyDamage(difficulty, 2);
                    obj41.DeactivateIfFar = false;
                    obj41.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior32, itemDrops);
                    return obj41;
                }
                case ObjectType.PolarDragon:
                {
                    GameTexture texture41 = new GameTexture("polardragon.bmp", new Size(0x80, 0x80), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj42 = new GameObject(texture41, t, color);
                    Size size41 = new Size(0x80, 0x80);
                    difficulty = 6;
                    obj42.ObjClass = ObjectClass.Boss;
                    numArray = new int[1];
                    obj42.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.HeadOnly, size41, numArray, 8, true));
                    obj42.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.HeadOnly, size41, new int[] { 1, 2 }, 8, true));
                    obj42.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.HeadOnly, size41, new int[] { 3 }, 8, true));
                    obj42.DefineAnimation(AnimType.DuckingAndAttacking, new Animation(AnimHitType.HeadOnly, size41, new int[] { 4 }, 8, true));
                    obj42.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.HeadOnly, size41, new int[] { 6 }, 8, true));
                    obj42.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.HeadOnly, size41, new int[] { 5 }, 4, true));
                    obj42.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size41, new int[] { 5 }, 4, true));
                    SizeF ef90 = new SizeF(64f, 76f);
                    RectangleF ef91 = new RectangleF(8f, -80f, 24f, 24f);
                    SizeF ef92 = new SizeF(64f, 64f);
                    RectangleF ef93 = new RectangleF(8f, -50f, 24f, 24f);
                    obj42.GetAnimation(AnimType.Stopped).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef91;
                    obj42.GetAnimation(AnimType.Stopped2).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef91;
                    obj42.GetAnimation(AnimType.Jump).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef91;
                    obj42.GetAnimation(AnimType.Attacking).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef91;
                    obj42.GetAnimation(AnimType.DuckingAndAttacking).HitboxSize = ef92;
                    obj42.GetAnimation(AnimType.DuckingAndAttacking).SecondaryCollisionRectangle = ef93;
                    obj42.GetAnimation(AnimType.Hit).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Dying).HitboxSize = ef90;
                    obj42.GetAnimation(AnimType.Dying).SecondaryCollisionRectangle = ef91;
                    EnemyBehavior behavior33 = new EnemyBehavior(obj42, 0x9c4, delay, ActivationTypes.AlwaysActivated, FacePlayerBehavior.AlwaysFace);
                    obj42.CurrentDirection = Direction.Left;
                    behavior33.AddFarAction(new Wait(5));
                    behavior33.AddNearAction(new PolarDragonMotion());
                    behavior33.AddHitAction(new Wait(1));
                    behavior33.AddHitAction(new Jump(ActionPresets.BossRecoil));
                    behavior33.AddHitAction(new Wait(10));
                    behavior33.AddHitAction(new Stop(true, true, false));
                    behavior33.AttackDistance = 0x1388;
                    obj42.SetBehavior(behavior33);
                    obj42.StopsAtBoundries = false;
                    obj42.AttackDamage = GetEnemyDamage(difficulty, 2);
                    obj42.DeactivateIfFar = false;
                    obj42.CurrentAnimation = AnimType.Stopped;
                    AddItemDrops(behavior33, itemDrops);
                    return obj42;
                }
                case ObjectType.TransformSpirit:
                {
                    TransformSpiritBehavior behavior34;
                    GameTexture texture42 = new GameTexture("spirit.bmp", new Size(0x20, 0x20), ColorSwaps.CaveAlternate, color, TextureDisposePolicy.NeverDispose);
                    GameObject obj43 = new GameObject(texture42, t, color);
                    Size size42 = new Size(0x20, 0x20);
                    obj43.ObjClass = ObjectClass.Special;
                    obj43.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size42, new int[] { 0, 1, 2, 3, 2, 1 }, 4, true));
                    obj43.GetAnimation(AnimType.Stopped).HitboxSize = new SizeF(24f, 24f);
                    if (GameEngine.Game.GetPlayer().Type != ObjectType.Fox)
                    {
                        behavior34 = new TransformSpiritBehavior(obj43, GameEngine.Game.GetPlayerStats().LatestTransform + 1);
                    }
                    else
                    {
                        behavior34 = new TransformSpiritBehavior(obj43, ObjectType.Fox);
                    }
                    obj43.SetBehavior(behavior34);
                    obj43.AttackDamage = GetEnemyDamage(8, 2);
                    obj43.StopsAtBoundries = false;
                    obj43.DeactivateIfFar = false;
                    return obj43;
                }
                case ObjectType.Fox:
                {
                    GameTexture texture2 = new GameTexture("foxman.bmp", new Size(0x40, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj3 = new GameObject(texture2, t);
                    Size size2 = new Size(0x40, 0x20);
                    obj3.SetBehavior(new PlayerBehavior(obj3, t));
                    numArray = new int[1];
                    obj3.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size2, numArray, 1, true));
                    obj3.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size2, new int[] { 1, 2 }, 6, true));
                    obj3.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size2, new int[] { 2 }, 1, true));
                    obj3.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size2, new int[] { 3 }, 6, true));
                    obj3.DefineAnimation(AnimType.Ducking, new Animation(AnimHitType.Shield, size2, new int[] { 4 }, 1, true));
                    obj3.DefineAnimation(AnimType.DuckingAndAttacking, new Animation(AnimHitType.Sword, size2, new int[] { 5 }, 4, true));
                    obj3.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size2, new int[] { 6 }, 1, true));
                    SizeF ef7 = new SizeF(16f, 27f);
                    SizeF ef8 = new SizeF(16f, 16f);
                    RectangleF ef9 = new RectangleF(4f, -18f, 8f, 12f);
                    RectangleF ef10 = new RectangleF(8f, -18f, 16f, 12f);
                    RectangleF ef11 = new RectangleF(4f, -12f, 8f, 10f);
                    RectangleF ef12 = new RectangleF(8f, -12f, 16f, 8f);
                    obj3.GetAnimation(AnimType.Stopped).HitboxSize = ef7;
                    obj3.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef9;
                    obj3.GetAnimation(AnimType.Hit).HitboxSize = ef7;
                    obj3.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef9;
                    obj3.GetAnimation(AnimType.Stopped2).HitboxSize = ef7;
                    obj3.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef9;
                    obj3.GetAnimation(AnimType.Jump).HitboxSize = ef7;
                    obj3.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef9;
                    obj3.GetAnimation(AnimType.Attacking).HitboxSize = ef7;
                    obj3.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef10;
                    obj3.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj3.GetAnimation(AnimType.Ducking).HitboxSize = ef8;
                    obj3.GetAnimation(AnimType.Ducking).SecondaryCollisionRectangle = ef11;
                    obj3.GetAnimation(AnimType.DuckingAndAttacking).HitboxSize = ef8;
                    obj3.GetAnimation(AnimType.DuckingAndAttacking).SecondaryCollisionRectangle = ef12;
                    obj3.GetAnimation(AnimType.DuckingAndAttacking).Repeat = false;
                    obj3.StopsAtBoundries = true;
                    obj3.ObjClass = ObjectClass.Player;
                    return obj3;
                }
                case ObjectType.Human:
                {
                    GameTexture texture = new GameTexture("human.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj2 = new GameObject(texture, t);
                    Size size = new Size(0x20, 0x20);
                    obj2.SetBehavior(new PlayerBehavior(obj2, t));
                    numArray = new int[1];
                    obj2.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size, numArray, 1, false));
                    obj2.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size, new int[] { 1, 0, 1, 2 }, 6, false));
                    obj2.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size, new int[] { 2 }, 1, false));
                    obj2.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size, new int[] { 5 }, 6, 8, false));
                    obj2.DefineAnimation(AnimType.Ducking, new Animation(AnimHitType.Shield, size, new int[] { 4 }, 1, 12, false));
                    obj2.DefineAnimation(AnimType.DuckingAndAttacking, new Animation(AnimHitType.Sword, size, new int[] { 3 }, 4, 12, false));
                    obj2.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size, new int[] { 6 }, 1, false));
                    SizeF ef = new SizeF(16f, 27f);
                    SizeF ef2 = new SizeF(16f, 16f);
                    RectangleF ef3 = new RectangleF(4f, -18f, 8f, 12f);
                    RectangleF ef4 = new RectangleF(8f, -18f, 16f, 12f);
                    RectangleF ef5 = new RectangleF(4f, -12f, 8f, 10f);
                    RectangleF ef6 = new RectangleF(8f, -12f, 16f, 8f);
                    obj2.GetAnimation(AnimType.Stopped).HitboxSize = ef;
                    obj2.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef3;
                    obj2.GetAnimation(AnimType.Hit).HitboxSize = ef;
                    obj2.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef3;
                    obj2.GetAnimation(AnimType.Stopped2).HitboxSize = ef;
                    obj2.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef3;
                    obj2.GetAnimation(AnimType.Jump).HitboxSize = ef;
                    obj2.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef3;
                    obj2.GetAnimation(AnimType.Attacking).HitboxSize = ef;
                    obj2.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef4;
                    obj2.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj2.GetAnimation(AnimType.Ducking).HitboxSize = ef2;
                    obj2.GetAnimation(AnimType.Ducking).SecondaryCollisionRectangle = ef5;
                    obj2.GetAnimation(AnimType.DuckingAndAttacking).HitboxSize = ef2;
                    obj2.GetAnimation(AnimType.DuckingAndAttacking).SecondaryCollisionRectangle = ef6;
                    obj2.GetAnimation(AnimType.DuckingAndAttacking).Repeat = false;
                    obj2.StopsAtBoundries = true;
                    obj2.ObjClass = ObjectClass.Player;
                    return obj2;
                }
                case ObjectType.Lizard:
                {
                    GameTexture texture3 = new GameTexture("lizardman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj4 = new GameObject(texture3, t);
                    Size size3 = new Size(0x20, 0x20);
                    obj4.SetBehavior(new PlayerBehavior(obj4, t));
                    numArray = new int[1];
                    obj4.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size3, numArray, 1, true));
                    obj4.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size3, new int[] { 1, 0, 1, 2 }, 6, true));
                    obj4.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size3, new int[] { 2 }, 1, true));
                    obj4.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.None, size3, new int[] { 3 }, 12, 0x10, true));
                    obj4.DefineAnimation(AnimType.Ducking, new Animation(AnimHitType.None, size3, new int[] { 4 }, 1, 12, true));
                    obj4.DefineAnimation(AnimType.DuckingAndAttacking, new Animation(AnimHitType.None, size3, new int[] { 5 }, 12, 12, true));
                    obj4.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size3, new int[] { 6 }, 1, true));
                    SizeF ef13 = new SizeF(16f, 27f);
                    SizeF ef14 = new SizeF(16f, 16f);
                    new RectangleF(0f, -16f, 1f, 1f);
                    RectangleF ef15 = new RectangleF(0f, -32f, 8f, 16f);
                    new RectangleF(8f, -2f, 16f, 8f);
                    RectangleF ef16 = new RectangleF(0f, -16f, 8f, 16f);
                    obj4.GetAnimation(AnimType.Stopped).HitboxSize = ef13;
                    obj4.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef15;
                    obj4.GetAnimation(AnimType.Hit).HitboxSize = ef13;
                    obj4.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef15;
                    obj4.GetAnimation(AnimType.Stopped2).HitboxSize = ef13;
                    obj4.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef15;
                    obj4.GetAnimation(AnimType.Jump).HitboxSize = ef13;
                    obj4.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef15;
                    obj4.GetAnimation(AnimType.Attacking).HitboxSize = ef13;
                    obj4.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef15;
                    obj4.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj4.GetAnimation(AnimType.Ducking).HitboxSize = ef14;
                    obj4.GetAnimation(AnimType.Ducking).SecondaryCollisionRectangle = ef16;
                    obj4.GetAnimation(AnimType.DuckingAndAttacking).HitboxSize = ef14;
                    obj4.GetAnimation(AnimType.DuckingAndAttacking).SecondaryCollisionRectangle = ef16;
                    obj4.GetAnimation(AnimType.DuckingAndAttacking).Repeat = false;
                    obj4.StopsAtBoundries = true;
                    obj4.ObjClass = ObjectClass.Player;
                    return obj4;
                }
                case ObjectType.Mouse:
                {
                    GameTexture texture5 = new GameTexture("mouseman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj6 = new GameObject(texture5, t);
                    Size size5 = new Size(0x20, 0x20);
                    obj6.SetBehavior(new PlayerBehavior(obj6, t));
                    numArray = new int[1];
                    obj6.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size5, numArray, 1, false));
                    obj6.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size5, new int[] { 1, 0, 1, 2 }, 3, false));
                    obj6.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size5, new int[] { 1, 0, 1, 2 }, 3, false));
                    obj6.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size5, new int[] { 3 }, 3, 15, false));
                    obj6.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size5, new int[] { 4 }, 1, false));
                    obj6.DefineAnimation(AnimType.Special, new Animation(AnimHitType.Shield, size5, new int[] { 1, 0, 1, 2 }, 3, false));
                    SizeF ef20 = new SizeF(16f, 16f);
                    new SizeF(2f, 16f);
                    RectangleF ef21 = new RectangleF(4f, -12f, 8f, 12f);
                    RectangleF ef22 = new RectangleF(8f, -8f, 12f, 4f);
                    obj6.GetAnimation(AnimType.Stopped).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef21;
                    obj6.GetAnimation(AnimType.Hit).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef21;
                    obj6.GetAnimation(AnimType.Stopped2).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef21;
                    obj6.GetAnimation(AnimType.Special).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Special).SecondaryCollisionRectangle = ef21;
                    obj6.GetAnimation(AnimType.Jump).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef21;
                    obj6.GetAnimation(AnimType.Attacking).HitboxSize = ef20;
                    obj6.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef22;
                    obj6.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj6.StopsAtBoundries = true;
                    obj6.ObjClass = ObjectClass.Player;
                    return obj6;
                }
                case ObjectType.Piranha:
                {
                    GameTexture texture4 = new GameTexture("piranhaman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj5 = new GameObject(texture4, t);
                    Size size4 = new Size(0x20, 0x20);
                    obj5.SetBehavior(new PlayerBehavior(obj5, t));
                    numArray = new int[1];
                    obj5.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size4, numArray, 1, false));
                    obj5.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size4, new int[] { 1, 0, 1, 2 }, 6, false));
                    obj5.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size4, new int[] { 1 }, 1, false));
                    obj5.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size4, new int[] { 3 }, 6, 8, false));
                    obj5.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size4, new int[] { 6 }, 1, false));
                    obj5.DefineAnimation(AnimType.Special, new Animation(AnimHitType.None, size4, new int[] { 4, 5 }, 4, true));
                    SizeF ef17 = new SizeF(16f, 27f);
                    new SizeF(16f, 16f);
                    RectangleF ef18 = new RectangleF(4f, -18f, 8f, 12f);
                    RectangleF ef19 = new RectangleF(8f, -18f, 16f, 12f);
                    obj5.GetAnimation(AnimType.Stopped).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef18;
                    obj5.GetAnimation(AnimType.Hit).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef18;
                    obj5.GetAnimation(AnimType.Stopped2).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef18;
                    obj5.GetAnimation(AnimType.Special).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Special).SecondaryCollisionRectangle = ef18;
                    obj5.GetAnimation(AnimType.Jump).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef18;
                    obj5.GetAnimation(AnimType.Attacking).HitboxSize = ef17;
                    obj5.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef19;
                    obj5.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj5.StopsAtBoundries = true;
                    obj5.ObjClass = ObjectClass.Player;
                    return obj5;
                }
                case ObjectType.Tiger:
                {
                    GameTexture texture6 = new GameTexture("tigerman.bmp", new Size(0x20, 0x40), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj7 = new GameObject(texture6, t);
                    Size size6 = new Size(0x20, 0x40);
                    obj7.SetBehavior(new PlayerBehavior(obj7, t));
                    numArray = new int[1];
                    obj7.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size6, numArray, 1, false));
                    obj7.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size6, new int[] { 1, 0, 1, 2 }, 6, false));
                    obj7.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size6, new int[] { 1 }, 1, false));
                    obj7.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size6, new int[] { 3, 4, 5, 6 }, 2, 12, false));
                    obj7.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size6, new int[] { 7 }, 1, false));
                    SizeF ef23 = new SizeF(16f, 27f);
                    new SizeF(16f, 16f);
                    RectangleF ef24 = new RectangleF(4f, -20f, 8f, 12f);
                    RectangleF ef25 = new RectangleF(6f, -38f, 12f, 20f);
                    obj7.GetAnimation(AnimType.Stopped).HitboxSize = ef23;
                    obj7.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef24;
                    obj7.GetAnimation(AnimType.Hit).HitboxSize = ef23;
                    obj7.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef24;
                    obj7.GetAnimation(AnimType.Stopped2).HitboxSize = ef23;
                    obj7.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef24;
                    obj7.GetAnimation(AnimType.Jump).HitboxSize = ef23;
                    obj7.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef24;
                    obj7.GetAnimation(AnimType.Attacking).HitboxSize = ef23;
                    obj7.GetAnimation(AnimType.Attacking).YMove = 20f;
                    obj7.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef25;
                    obj7.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj7.StopsAtBoundries = true;
                    obj7.ObjClass = ObjectClass.Player;
                    return obj7;
                }
                case ObjectType.Hawk:
                {
                    GameTexture texture7 = new GameTexture("hawkman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj8 = new GameObject(texture7, t);
                    Size size7 = new Size(0x20, 0x20);
                    obj8.SetBehavior(new PlayerBehavior(obj8, t));
                    numArray = new int[1];
                    obj8.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size7, numArray, 1, false));
                    numArray = new int[2];
                    numArray[0] = 1;
                    obj8.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.Shield, size7, numArray, 6, false));
                    numArray = new int[2];
                    numArray[0] = 1;
                    obj8.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.Shield, size7, numArray, 3, false));
                    obj8.DefineAnimation(AnimType.Attacking, new Animation(AnimHitType.Sword, size7, new int[] { 2 }, 6, 8, false));
                    obj8.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size7, new int[] { 5 }, 1, false));
                    obj8.DefineAnimation(AnimType.Special, new Animation(AnimHitType.None, size7, new int[] { 3, 4 }, 4, true));
                    SizeF ef26 = new SizeF(16f, 27f);
                    new SizeF(16f, 16f);
                    RectangleF ef27 = new RectangleF(4f, -18f, 8f, 12f);
                    RectangleF ef28 = new RectangleF(8f, -18f, 16f, 12f);
                    RectangleF ef29 = new RectangleF(0f, -18f, 2f, 2f);
                    obj8.GetAnimation(AnimType.Stopped).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Stopped).SecondaryCollisionRectangle = ef27;
                    obj8.GetAnimation(AnimType.Hit).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Hit).SecondaryCollisionRectangle = ef27;
                    obj8.GetAnimation(AnimType.Stopped2).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Stopped2).SecondaryCollisionRectangle = ef27;
                    obj8.GetAnimation(AnimType.Jump).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Jump).SecondaryCollisionRectangle = ef27;
                    obj8.GetAnimation(AnimType.Attacking).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Attacking).SecondaryCollisionRectangle = ef28;
                    obj8.GetAnimation(AnimType.Attacking).Repeat = false;
                    obj8.GetAnimation(AnimType.Special).HitboxSize = ef26;
                    obj8.GetAnimation(AnimType.Special).SecondaryCollisionRectangle = ef29;
                    obj8.StopsAtBoundries = true;
                    obj8.ObjClass = ObjectClass.Player;
                    return obj8;
                }
                case ObjectType.DeadPlayer:
                {
                    GameTexture texture8 = new GameTexture("angel.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj9 = new GameObject(texture8, t);
                    Size size8 = new Size(0x20, 0x20);
                    obj9.SetBehavior(new DeadPlayerBehavior(obj9, t));
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj9.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Shield, size8, numArray, 8, false));
                    SizeF ef30 = new SizeF(32f, 32f);
                    obj9.GetAnimation(AnimType.Stopped).HitboxSize = ef30;
                    obj9.Solid = false;
                    obj9.StopsAtSides = false;
                    obj9.StopsAtBoundries = false;
                    obj9.StopsAtSides = false;
                    obj9.ObjClass = ObjectClass.Player;
                    return obj9;
                }
                case ObjectType.LizardFire:
                case ObjectType.Bullet:
                case ObjectType.BlueBullet:
                case ObjectType.GravityBullet:
                case ObjectType.BouncingBullet:
                case ObjectType.CyclopsFireball:
                case ObjectType.MechaFireball:
                case ObjectType.MechaFireball2:
                case ObjectType.ExplodingFireball:
                case ObjectType.SmogFireball:
                case ObjectType.SmogFireball2:
                case ObjectType.SmogFireball3:
                case ObjectType.GoblinArrow:
                case ObjectType.NinjaStar:
                case ObjectType.MummySmoke:
                case ObjectType.ZombieBreath:
                case ObjectType.PirateHook:
                case ObjectType.Orb:
                case ObjectType.VampireFire:
                case ObjectType.IceBreath:
                case ObjectType.BossDieStar:
                case ObjectType.AirBubble:
                case ObjectType.Fireball:
                case ObjectType.Arrow:
                {
                    GameObject player = GameEngine.Game.GetPlayer();
                    bool flag = false;
                    int num11 = 120;
                    GameTexture texture54 = null;
                    if ((t != ObjectType.Bullet) && (t != ObjectType.GravityBullet))
                    {
                        if (t == ObjectType.BouncingBullet)
                        {
                            texture54 = new GameTexture("shot.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                        }
                        else if (t == ObjectType.BlueBullet)
                        {
                            texture54 = new GameTexture("blueshot.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                        }
                        else if (((t == ObjectType.CyclopsFireball) || (t == ObjectType.MechaFireball)) || ((t == ObjectType.MechaFireball2) || (t == ObjectType.ExplodingFireball)))
                        {
                            flag = t != ObjectType.CyclopsFireball;
                            texture54 = new GameTexture("cyclopsFire.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                        }
                        else if (t == ObjectType.GoblinArrow)
                        {
                            texture54 = new GameTexture("goblinArrow.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                        }
                        else if (((t == ObjectType.SmogFireball) || (t == ObjectType.SmogFireball2)) || (t == ObjectType.SmogFireball3))
                        {
                            texture54 = new GameTexture("smogFireball.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                        }
                        else if (t == ObjectType.MummySmoke)
                        {
                            texture54 = new GameTexture("mummysmoke.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 120;
                            flag = true;
                        }
                        else if (t == ObjectType.IceBreath)
                        {
                            texture54 = new GameTexture("icebreath.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 120;
                            flag = true;
                        }
                        else if (t == ObjectType.ZombieBreath)
                        {
                            texture54 = new GameTexture("zombiebullet.bmp", new Size(0x20, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                            flag = true;
                        }
                        else if (t == ObjectType.BossDieStar)
                        {
                            texture54 = new GameTexture("star.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 120;
                        }
                        else if (t == ObjectType.AirBubble)
                        {
                            texture54 = new GameTexture("border.bmp", new Size(8, 8), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 200;
                        }
                        else if (t == ObjectType.LizardFire)
                        {
                            texture54 = new GameTexture("lizardFire.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 20;
                        }
                        else if (t == ObjectType.NinjaStar)
                        {
                            texture54 = new GameTexture("ninjastar.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 120;
                        }
                        else if (t == ObjectType.Fireball)
                        {
                            texture54 = new GameTexture("fireball.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 20;
                        }
                        else if (t == ObjectType.Arrow)
                        {
                            texture54 = new GameTexture("arrow.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 120;
                        }
                        else if (t == ObjectType.PirateHook)
                        {
                            flag = true;
                            texture54 = new GameTexture("piratehook.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 600;
                        }
                        else if (t == ObjectType.Orb)
                        {
                            flag = true;
                            texture54 = new GameTexture("daiymobullet.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                        }
                        else if (t == ObjectType.VampireFire)
                        {
                            flag = true;
                            texture54 = new GameTexture("vampireBullet.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                            num11 = 300;
                        }
                    }
                    else
                    {
                        texture54 = new GameTexture("shot.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                        num11 = 120;
                    }
                    GameObject obj60 = new GameObject(texture54, t);
                    Size size54 = new Size(0x10, 0x10);
                    if (t == ObjectType.AirBubble)
                    {
                        obj60.DefineAnimation(AnimType.Stopped, new Animation(new Point(7, 0), new Size(8, 8)));
                    }
                    else if (texture54.XCells == 1)
                    {
                        numArray = new int[1];
                        obj60.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Sword, size54, numArray, 4, true));
                    }
                    else if (texture54.XCells == 4)
                    {
                        obj60.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Sword, size54, new int[] { 0, 1, 2, 3 }, 4, true));
                    }
                    else
                    {
                        numArray = new int[2];
                        numArray[1] = 1;
                        obj60.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Sword, size54, numArray, 4, true));
                    }
                    SizeF ef104 = new SizeF(16f, 16f);
                    if (t == ObjectType.AirBubble)
                    {
                        ef104 = new SizeF(8f, 8f);
                    }
                    obj60.GetAnimation(AnimType.Stopped).HitboxSize = ef104;
                    BulletBehavior behavior43 = new BulletBehavior(obj60, num11, ((t == ObjectType.AirBubble) || (t == ObjectType.LizardFire)) || (t == ObjectType.Bullet), flag);
                    obj60.SetBehavior(behavior43);
                    obj60.Solid = false;
                    obj60.ObjClass = ObjectClass.EnemyProjectile;
                    obj60.StopsAtBoundries = false;
                    obj60.StopsAtSides = false;
                    obj60.DestroyIFFar = true;
                    obj60.DeactivateIfFar = false;
                    switch (t)
                    {
                        case ObjectType.LizardFire:
                            obj60.AttackDamage = player.AttackDamage;
                            obj60.ObjClass = ObjectClass.PlayerProjectile;
                            obj60.Solid = true;
                            return obj60;

                        case ObjectType.Bullet:
                            obj60.Solid = false;
                            return obj60;

                        case ObjectType.BlueBullet:
                            obj60.Solid = false;
                            return obj60;

                        case ObjectType.GravityBullet:
                            obj60.Solid = false;
                            return obj60;

                        case ObjectType.BouncingBullet:
                            obj60.Solid = true;
                            obj60.ObjClass = ObjectClass.EnemyProjectile;
                            return obj60;

                        case ObjectType.CyclopsFireball:
                        case ObjectType.MechaFireball:
                        case ObjectType.SmogFireball:
                        case ObjectType.GoblinArrow:
                        case ObjectType.NinjaStar:
                        case ObjectType.MummySmoke:
                        case ObjectType.SwordSpark:
                        case ObjectType.Orb:
                        case ObjectType.VampireFire:
                        case ObjectType.IceBreath:
                            return obj60;

                        case ObjectType.MechaFireball2:
                        case ObjectType.ExplodingFireball:
                            obj60.Solid = true;
                            return obj60;

                        case ObjectType.SmogFireball2:
                        case ObjectType.SmogFireball3:
                            obj60.Solid = true;
                            return obj60;

                        case ObjectType.ZombieBreath:
                            obj60.Solid = true;
                            obj60.ObjClass = ObjectClass.EnemyProjectile;
                            return obj60;

                        case ObjectType.PirateHook:
                            obj60.Solid = true;
                            obj60.ObjClass = ObjectClass.EnemyProjectile;
                            return obj60;

                        case ObjectType.BossDieStar:
                            obj60.ObjClass = ObjectClass.Special;
                            return obj60;

                        case ObjectType.AirBubble:
                        {
                            GameAction[] actions = new GameAction[] { new Move(0.5f, -0.5f), new Wait(8), new Move(-0.5f, -0.5f), new Wait(0x10), new Move(0.5f, -0.5f), new Wait(0x10), new Move(-0.5f, -0.5f) };
                            behavior43.SetMotion(actions);
                            obj60.Aquatic = true;
                            obj60.ObjClass = ObjectClass.Special;
                            obj60.Solid = true;
                            return obj60;
                        }
                        case ObjectType.Fireball:
                        {
                            GameAction[] actionArray = new GameAction[] { new Move(4f, -6f), new Wait(2), new Move(4f, 6f), new Wait(4), new Move(4f, -6f), new Wait(4), new Move(4f, 6f) };
                            behavior43.SetMotion(actionArray);
                            obj60.CurrentDirection = player.CurrentDirection;
                            obj60.ObjClass = ObjectClass.PlayerProjectile;
                            obj60.AttackDamage = player.AttackDamage * 2;
                            return obj60;
                        }
                        case ObjectType.Tornado:
                            return obj60;

                        case ObjectType.Arrow:
                            obj60.AttackDamage = player.AttackDamage * 2;
                            obj60.YSpeed.SetSpeed((float) -6f);
                            obj60.ObjClass = ObjectClass.PlayerProjectile;
                            return obj60;

                        default:
                            return obj60;
                    }
                    goto Label_8CC8;
                }
                case ObjectType.Coin:
                {
                    GameTexture texture43 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj44 = new GameObject(texture43, t);
                    Size size43 = new Size(0x10, 0x10);
                    obj44.YSpeed.TargetSpeed = 4f;
                    obj44.YSpeed.Acceleration = 1f;
                    obj44.YSpeed.CurrentSpeed = -5f;
                    ItemBehavior behavior35 = new ItemBehavior(obj44, 8, 180);
                    obj44.SetBehavior(behavior35);
                    obj44.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size43, new int[] { 1, 2, 3, 4 }, 8, true));
                    behavior35.DropSound = SoundEffects.DropItem;
                    behavior35.CollectSound = SoundEffects.GetMoney;
                    SizeF ef94 = new SizeF(16f, 16f);
                    obj44.GetAnimation(AnimType.Stopped).HitboxSize = ef94;
                    obj44.StopsAtBoundries = false;
                    obj44.ObjClass = ObjectClass.Item;
                    return obj44;
                }
                case ObjectType.MoneyBag:
                {
                    GameTexture texture45 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj46 = new GameObject(texture45, t);
                    Size size45 = new Size(0x10, 0x10);
                    obj46.YSpeed.TargetSpeed = 4f;
                    obj46.YSpeed.Acceleration = 1f;
                    obj46.YSpeed.CurrentSpeed = -5f;
                    ItemBehavior behavior37 = new ItemBehavior(obj46, 0, 180);
                    obj46.SetBehavior(behavior37);
                    obj46.DefineAnimation(AnimType.Stopped2, new Animation(AnimHitType.None, size45, new int[] { 8 }, 8, true));
                    obj46.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size45, new int[] { 6, 7, 8 }, 8, true));
                    obj46.DefineAnimation(AnimType.Jump, new Animation(AnimHitType.None, size45, new int[] { 6 }, 8, true));
                    obj46.CurrentAnimation = AnimType.Jump;
                    behavior37.DropSound = SoundEffects.DropItem;
                    behavior37.CollectSound = SoundEffects.GetMoney;
                    SizeF ef96 = new SizeF(16f, 16f);
                    obj46.GetAnimation(AnimType.Stopped).HitboxSize = ef96;
                    obj46.GetAnimation(AnimType.Stopped).Repeat = false;
                    obj46.GetAnimation(AnimType.Jump).HitboxSize = ef96;
                    obj46.GetAnimation(AnimType.Stopped2).HitboxSize = ef96;
                    obj46.StopsAtBoundries = false;
                    obj46.ObjClass = ObjectClass.Item;
                    return obj46;
                }
                case ObjectType.Heart:
                {
                    GameTexture texture48 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj49 = new GameObject(texture48, t);
                    Size size48 = new Size(0x10, 0x10);
                    obj49.YSpeed.TargetSpeed = 4f;
                    obj49.YSpeed.Acceleration = 2f;
                    obj49.YSpeed.CurrentSpeed = -4f;
                    ItemBehavior behavior40 = new ItemBehavior(obj49, 0, 180) {
                        Value = GameEngine.Game.GetPlayerStats().MaxHP / 4,
                        DropSound = SoundEffects.Nothing,
                        CollectSound = SoundEffects.GetHeart
                    };
                    obj49.SetBehavior(behavior40);
                    obj49.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size48, new int[] { 5 }, 8, true));
                    SizeF ef99 = new SizeF(16f, 16f);
                    obj49.GetAnimation(AnimType.Stopped).HitboxSize = ef99;
                    obj49.ObjClass = ObjectClass.Item;
                    return obj49;
                }
                case ObjectType.LargeHeart:
                {
                    GameTexture texture50 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj51 = new GameObject(texture50, t);
                    Size size50 = new Size(0x10, 0x10);
                    obj51.YSpeed.TargetSpeed = 4f;
                    obj51.YSpeed.Acceleration = 2f;
                    obj51.YSpeed.CurrentSpeed = -4f;
                    ItemBehavior behavior42 = new ItemBehavior(obj51, 0, 180) {
                        Value = 5,
                        DropSound = SoundEffects.Nothing,
                        CollectSound = SoundEffects.GetHeart
                    };
                    obj51.SetBehavior(behavior42);
                    obj51.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size50, new int[] { 10 }, 8, true));
                    SizeF ef101 = new SizeF(16f, 16f);
                    obj51.GetAnimation(AnimType.Stopped).HitboxSize = ef101;
                    obj51.ObjClass = ObjectClass.Item;
                    return obj51;
                }
                case ObjectType.ExtraHeart:
                {
                    GameTexture texture46 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj47 = new GameObject(texture46, t);
                    Size size46 = new Size(0x10, 0x10);
                    ItemBehavior behavior38 = new ItemBehavior(obj47, 0, 180);
                    obj47.SetBehavior(behavior38);
                    obj47.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size46, new int[] { 11 }, 8, true));
                    behavior38.DropSound = SoundEffects.DropItem;
                    behavior38.CollectSound = SoundEffects.GetItem;
                    SizeF ef97 = new SizeF(16f, 16f);
                    obj47.GetAnimation(AnimType.Stopped).HitboxSize = ef97;
                    obj47.ObjClass = ObjectClass.Item;
                    return obj47;
                }
                case ObjectType.ItemPickup:
                {
                    GameTexture texture55 = new GameTexture("cursor.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj61 = new GameObject(texture55, t);
                    Size size55 = new Size(0x10, 0x10);
                    obj61.YSpeed.TargetSpeed = 4f;
                    obj61.YSpeed.Acceleration = 2f;
                    obj61.YSpeed.CurrentSpeed = -4f;
                    ItemBehavior behavior44 = new ItemBehavior(obj61, 0, 180) {
                        DropSound = SoundEffects.Nothing,
                        CollectSound = SoundEffects.GetItem
                    };
                    obj61.SetBehavior(behavior44);
                    obj61.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size55, new int[] { 5 }, 8, true));
                    SizeF ef105 = new SizeF(16f, 16f);
                    obj61.GetAnimation(AnimType.Stopped).HitboxSize = ef105;
                    obj61.ObjClass = ObjectClass.Item;
                    return obj61;
                }
                case ObjectType.Key:
                {
                    GameTexture texture47 = new GameTexture("cursor.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj48 = new GameObject(texture47, t);
                    Size size47 = new Size(0x10, 0x10);
                    ItemBehavior behavior39 = new ItemBehavior(obj48, 0, 180);
                    obj48.SetBehavior(behavior39);
                    obj48.DefineAnimation(AnimType.Stopped, new Animation(new Point(1, 1), size47));
                    behavior39.DropSound = SoundEffects.Nothing;
                    behavior39.CollectSound = SoundEffects.GetItem;
                    SizeF ef98 = new SizeF(16f, 16f);
                    obj48.GetAnimation(AnimType.Stopped).HitboxSize = ef98;
                    obj48.ObjClass = ObjectClass.Item;
                    return obj48;
                }
                case ObjectType.Stone:
                {
                    GameTexture texture44 = new GameTexture("items.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj45 = new GameObject(texture44, t);
                    Size size44 = new Size(0x10, 0x10);
                    obj45.YSpeed.TargetSpeed = 4f;
                    obj45.YSpeed.Acceleration = 2f;
                    obj45.YSpeed.CurrentSpeed = -5f;
                    ItemBehavior behavior36 = new ItemBehavior(obj45, 0, 180);
                    obj45.SetBehavior(behavior36);
                    numArray = new int[1];
                    obj45.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size44, numArray, 8, true));
                    behavior36.DropSound = SoundEffects.Nothing;
                    behavior36.CollectSound = SoundEffects.GetItem;
                    SizeF ef95 = new SizeF(16f, 16f);
                    obj45.GetAnimation(AnimType.Stopped).HitboxSize = ef95;
                    obj45.StopsAtBoundries = false;
                    obj45.ObjClass = ObjectClass.Item;
                    return obj45;
                }
                case ObjectType.LavaSplash:
                    return new GameObject(null, ObjectType.LavaSplash) { AttackDamage = GetEnemyDamage(GameEngine.Game.BaseDifficulty, 1) };

                case ObjectType.Tornado:
                {
                    GameObject obj52 = GameEngine.Game.GetPlayer();
                    GameTexture texture51 = new GameTexture("tornado.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj53 = new GameObject(texture51, t);
                    Size size51 = new Size(0x10, 0x10);
                    numArray = new int[3];
                    numArray[1] = 1;
                    numArray[2] = 2;
                    obj53.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Sword, size51, numArray, 4, true));
                    obj53.Location = obj52.GetProjectileSpawnLocation((SizeF) size51);
                    SizeF ef102 = new SizeF(16f, 16f);
                    obj53.GetAnimation(AnimType.Stopped).HitboxSize = ef102;
                    obj53.CurrentDirection = obj52.CurrentDirection;
                    obj53.YSpeed.Acceleration = 2f;
                    obj53.YSpeed.TargetSpeed = 4f;
                    obj53.XSpeed.Acceleration = 3f;
                    obj53.SetBehavior(new TornadoBehavior(obj53, obj52));
                    obj53.ObjClass = ObjectClass.PlayerProjectile;
                    obj53.AttackDamage = obj52.AttackDamage;
                    obj53.StopsAtBoundries = false;
                    return obj53;
                }
                case ObjectType.Boomerang:
                {
                    GameObject obj54 = GameEngine.Game.GetPlayer();
                    GameTexture texture52 = new GameTexture("boomerang.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj55 = new GameObject(texture52, t);
                    Size size52 = new Size(0x10, 0x10);
                    obj55.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.Sword, size52, new int[] { 0, 1, 2, 3 }, 4, true));
                    obj55.Location = obj54.GetProjectileSpawnLocation((SizeF) size52);
                    SizeF ef103 = new SizeF(16f, 16f);
                    obj55.GetAnimation(AnimType.Stopped).HitboxSize = ef103;
                    obj55.CurrentDirection = obj54.CurrentDirection;
                    obj55.SetBehavior(new BoomerangBehavior(obj55, obj54));
                    obj55.Solid = false;
                    obj55.ObjClass = ObjectClass.PlayerProjectile;
                    obj55.AttackDamage = GameEngine.Game.GetPlayer().AttackDamage / 2;
                    obj55.StopsAtBoundries = false;
                    obj55.StopsAtSides = false;
                    obj55.DestroyIFFar = true;
                    return obj55;
                }
                case ObjectType.SalamanderCross:
                {
                    GameTexture texture49 = new GameTexture("salamandercross.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject obj50 = new GameObject(texture49, t);
                    Size size49 = new Size(0x10, 0x10);
                    obj50.XSpeed.SetSpeed((float) 0f);
                    obj50.YSpeed.SetSpeed((float) 0f);
                    SalamanderCrossBehavior behavior41 = new SalamanderCrossBehavior(obj50);
                    obj50.SetBehavior(behavior41);
                    numArray = new int[2];
                    numArray[1] = 1;
                    obj50.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size49, numArray, 8, true));
                    SizeF ef100 = new SizeF(16f, 16f);
                    obj50.GetAnimation(AnimType.Stopped).HitboxSize = ef100;
                    obj50.ObjClass = ObjectClass.Item;
                    return obj50;
                }
                case ObjectType.Explosion:
                {
                    GameTexture texture53 = new GameTexture("explosion.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnTileChange);
                    GameObject obj58 = new GameObject(texture53, t);
                    Size size53 = new Size(0x10, 0x10);
                    obj58.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size53, new int[] { 0, 1, 2, 3, 4, 5 }, 8, false));
                    new SizeF(16f, 16f);
                    obj58.SetBehavior(new BulletBehavior(obj58, 0x30, false, false));
                    obj58.ObjClass = ObjectClass.Special;
                    return obj58;
                }
                case ObjectType.MysteryBlock:
                {
                    GameObject obj56 = new GameObject(new GameTexture("cursor.bmp", new Size(0x10, 0x10), TextureDisposePolicy.DisposeOnSceneChange), ObjectType.MysteryBlock);
                    obj56.SetBehavior(new ItemBehavior(obj56, 0, 0x270f));
                    obj56.DefineAnimation(AnimType.Stopped, new Animation(new Point(3, 2), new Size(0x10, 0x10)));
                    obj56.GetAnimation(AnimType.Stopped).HitboxSize = new SizeF(16f, 16f);
                    obj56.Solid = true;
                    obj56.YSpeed.TargetSpeed = 4f;
                    obj56.YSpeed.CurrentSpeed = -1f;
                    obj56.YSpeed.Acceleration = 1f;
                    obj56.ObjClass = ObjectClass.Item;
                    return obj56;
                }
                case ObjectType.MusicTrigger:
                {
                    GameTexture texture56 = new GameTexture("cursor.bmp", new Size(0x10, 0x10), TextureDisposePolicy.NeverDispose);
                    GameObject o = new GameObject(texture56, t);
                    Size size56 = new Size(0x10, 0x10);
                    o.SetBehavior(new MusicTriggerBehavior(o));
                    o.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size56, new int[] { 5 }, 8, true));
                    SizeF ef106 = new SizeF(16f, 16f);
                    o.GetAnimation(AnimType.Stopped).HitboxSize = ef106;
                    o.Visible = false;
                    o.ObjClass = ObjectClass.Item;
                    return o;
                }
                default:
                    goto Label_8CC8;
            }
            behavior.AddNearAction(new FacePlayer());
            if (color == ColorSwaps.Red)
            {
                behavior.AddNearAction(new Jump(0f, 6f, true, true));
            }
            else if (color == ColorSwaps.Green)
            {
                behavior.AddNearAction(new Jump(2f, 6f, true, true));
            }
            else if (color >= ColorSwaps.Blue)
            {
                behavior.AddNearAction(new Jump(3f, 6f, true, true));
            }
            if (color == ColorSwaps.Blue)
            {
                behavior.AddNearAction(new Wait(60));
            }
            else if (color == ColorSwaps.Yellow)
            {
                behavior.AddNearAction(new Wait(10));
            }
            else
            {
                behavior.AddNearAction(new Wait(100));
            }
            behavior.AddFarAction(new SetSpeed(ActionPresets.Gravity));
            behavior.AddFarAction(new FacePlayer());
            behavior.AddFarAction(new Wait(2));
            behavior.AddHitAction(new Wait(1));
            behavior.AddHitAction(new FacePlayer());
            behavior.AddHitAction(new Jump(ActionPresets.Recoil));
            behavior.AddHitAction(new Wait(40));
            behavior.AttackDistance = 80 + Utility.RandomInt(-40, 40);
            obj10.SetBehavior(behavior);
            obj10.ObjClass = ObjectClass.Enemy;
            if (color == ColorSwaps.Yellow)
            {
                obj10.AttackDamage = GetEnemyDamage(4, 3);
            }
            else
            {
                obj10.AttackDamage = GetEnemyDamage(difficulty, (int) color);
            }
            obj10.StopsAtBoundries = false;
            obj10.CurrentDirection = direction;
            AddItemDrops(behavior, itemDrops);
            return obj10;
            Label_1E10:
            obj13.XSpeed.SetSpeed(num2);
            Label_1E1E:
            behavior4 = new EnemyBehavior(obj13, GetEnemyHP(difficulty, (int) color), delay);
            if (color == ColorSwaps.Yellow)
            {
                difficulty = 9;
            }
            numArray = new int[2];
            numArray[1] = 1;
            obj13.DefineAnimation(AnimType.Stopped, new Animation(AnimHitType.None, size12, numArray, 4, true));
            obj13.DefineAnimation(AnimType.Hit, new Animation(AnimHitType.None, size12, new int[] { 2 }, 1, true));
            obj13.DefineAnimation(AnimType.Dying, new Animation(AnimHitType.None, size12, new int[] { 2 }, 1, true));
            SizeF ef36 = new SizeF(16f, 16f);
            obj13.GetAnimation(AnimType.Stopped).HitboxSize = ef36;
            obj13.GetAnimation(AnimType.Hit).HitboxSize = ef36;
            behavior4.AddNearAction(new PlayAnimation(AnimType.Stopped));
            behavior4.AddFarAction(new PlayAnimation(AnimType.Stopped));
            behavior4.AddHitAction(new Wait(40));
            behavior4.AddHitAction(new SetSpeed(num2));
            behavior4.AddHitWallAction(new ClimbWall());
            behavior4.AttackDistance = 500;
            obj13.StopsAtLedges = true;
            obj13.SetBehavior(behavior4);
            obj13.ObjClass = ObjectClass.Enemy;
            obj13.NoRotate = true;
            obj13.AttackDamage = GetEnemyDamage(difficulty, (int) color);
            AddItemDrops(behavior4, itemDrops);
            obj13.Solid = true;
            return obj13;
            Label_8CC8:
            return null;
        }
        private GameObject CreateForm(ObjectType t)
        {
            GameTexture texture = null;
            int x = 0;
            Size size = new Size(0, 0);
            switch (t)
            {
                case ObjectType.Lizard:
                    texture = new GameTexture("lizardman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    x = 6;
                    size = new Size(0x20, 0x20);
                    break;

                case ObjectType.Mouse:
                    texture = new GameTexture("mouseman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    x = 4;
                    size = new Size(0x20, 0x20);
                    break;

                case ObjectType.Piranha:
                    texture = new GameTexture("piranhaman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    x = 6;
                    size = new Size(0x20, 0x20);
                    break;

                case ObjectType.Tiger:
                    texture = new GameTexture("tigerman.bmp", new Size(0x20, 0x40), TextureDisposePolicy.DisposeOnTileChange);
                    x = 7;
                    size = new Size(0x20, 0x40);
                    break;

                case ObjectType.Hawk:
                    texture = new GameTexture("hawkman.bmp", new Size(0x20, 0x20), TextureDisposePolicy.DisposeOnTileChange);
                    x = 5;
                    size = new Size(0x20, 0x20);
                    break;
            }
            GameObject obj2 = new GameObject(texture, t);
            obj2.DefineAnimation(AnimType.Stopped, new Animation(new Point(x, 0), size));
            obj2.DestroyIFFar = true;
            obj2.StopsAtBoundries = false;
            obj2.StopsAtSides = false;
            obj2.SetBehavior(new BlankBehavior());
            GameEngine.Game.CurrentMap.AddObject(obj2);
            return obj2;
        }