Beispiel #1
0
        private static double GetEnemyNearlyRate(double x, double y)
        {
            //if (Game.I.Enemies.Count == 0)
            //    return 0.0;

            double nearestDistance = SCommon.IMAX;

            foreach (D2Point pt in Game.I.タイル接近_敵描画_Points.Iterate())
            {
                double distance = DDUtils.GetDistance(new D2Point(pt.X, pt.Y), new D2Point(x, y));

                if (distance < nearestDistance)
                {
                    nearestDistance = distance;
                }
            }

            const double RADIUS = 70.0;

            double rate = 1.0 - nearestDistance / RADIUS;

            DDUtils.ToRange(ref rate, 0.0, 1.0);

            return(rate);
        }
Beispiel #2
0
 public override void Draw()
 {
     if (DDUtils.GetDistance(new D2Point(this.X, this.Y), new D2Point(Game.I.Player.X, Game.I.Player.Y)) < 50.0)
     {
         Game.I.FinalZone.Ending_復讐_突入 = true;
     }
 }
Beispiel #3
0
        protected override IEnumerable <bool> E_Draw()
        {
            double xSpeed = 1.0;

            for (; ;)
            {
                xSpeed -= 0.1;
                this.X += xSpeed;

                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 60.0)
                {
                    this.プレイヤーがアイテムを取得した();
                    break;
                }

                DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X, this.Y);
                DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0);
                DDDraw.DrawEnd();

                DDPrint.SetPrint((int)this.X, (int)this.Y);
                DDPrint.SetBorder(new I3Color(0, 0, 0));
                DDPrint.PrintLine("アイテム");
                DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]);
                DDPrint.Reset();

                // 当たり判定無し

                yield return(true);
            }
        }
Beispiel #4
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0)                 // ? 十分に接近 -> 取得する。
                {
                    Game.I.Status.InventoryFlags[GameStatus.Inventory_e.取得済み_跳ねる陰陽玉] = true;
                    break;
                }

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 0));
                    DDPrint.PrintLine("跳ねる陰陽玉");
                    DDPrint.Reset();

                    // 当たり判定無し
                }
                yield return(true);
            }
        }
Beispiel #5
0
        private static D2Point 固定効果_GetShift(D2Point pt)
        {
            D2Point ptShift = new D2Point(0, 0);

            if (Ground.I.自弾背景歪み)
            {
                foreach (Shot shot in Game.I.Shots.Iterate())
                {
                    D2Point shotPt   = new D2Point(shot.X, shot.Y);
                    double  distance = DDUtils.GetDistance(pt, shotPt);

                    if (distance < 100.0)
                    {
                        // To 0.0 ~ 1.0
                        distance /= 100.0;
                        distance  = 1.0 - distance;

                        ptShift.X += (shot.X - shot.LastX) * distance * shot.AttackPoint * 0.01;
                        ptShift.Y += (shot.Y - shot.LastY) * distance * shot.AttackPoint * 0.01;
                    }
                }
            }

            // 新しい効果をここへ追加..

            return(ptShift);
        }
Beispiel #6
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0)
                {
                    this.プレイヤーがアイテムを取得した();
                    break;
                }

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 0));
                    DDPrint.PrintLine("アイテム");
                    DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]);
                    DDPrint.Reset();

                    // 当たり判定無し
                }
                yield return(true);
            }
        }
Beispiel #7
0
        public override void Draw()
        {
            if (DDUtils.GetDistance(new D2Point(this.X, this.Y), new D2Point(Game.I.Player.X, Game.I.Player.Y)) < 50.0)
            {
                Enemy_MeteorLoader meteorLoader = (Enemy_MeteorLoader)Game.I.Enemies.Iterate().First(enemy => enemy is Enemy_MeteorLoader);

                meteorLoader.発生領域 = this.発生領域;
            }
        }
Beispiel #8
0
        private static void DropItem(Enemy enemy, DROP_ITEM_TYPE_e dropItemType, int num = 1, double rMin = 0.0, double rBnd = 0.0)
        {
            if (num == 1)
            {
                Game.I.Enemies.Add(new Enemy_Item(enemy.X, enemy.Y, dropItemType));
            }
            else
            {
                Enemy[] addingItems = new Enemy[num];

                for (int index = 0; index < num; index++)
                {
                    double rot = DDUtils.Random.Real() * Math.PI * 2.0;
                    double r   = rMin + DDUtils.Random.Real() * rBnd;

                    addingItems[index] = new Enemy_Item(
                        enemy.X + Math.Cos(rot) * r,
                        enemy.Y + Math.Sin(rot) * r,
                        dropItemType
                        );
                }

                // 重なっているアイテムを離す。
                {
                    for (int c = 0; c < 3; c++)
                    {
                        for (int r = 1; r < num; r++)
                        {
                            Enemy ri = addingItems[r];

                            for (int l = 0; l < r; l++)
                            {
                                Enemy li = addingItems[l];

                                if (DDUtils.GetDistance(li.X - ri.X, li.Y - ri.Y) < 10.0)
                                {
                                    double rax;
                                    double ray;

                                    DDUtils.MakeXYSpeed(li.X, li.Y, ri.X, ri.Y, 5.0, out rax, out ray);

                                    li.X -= rax;
                                    li.Y -= ray;
                                    ri.X += rax;
                                    ri.Y += ray;
                                }
                            }
                        }
                    }
                }

                foreach (Enemy addingItem in addingItems)
                {
                    Game.I.Enemies.Add(addingItem);
                }
            }
        }
Beispiel #9
0
 public override void Draw()
 {
     if (DDUtils.GetDistance(new D2Point(this.X, this.Y), new D2Point(Game.I.Player.X, Game.I.Player.Y)) < 50.0)
     {
         if (Game.I.FinalZone.OH_Event9004.Once())
         {
             // none
         }
     }
 }
Beispiel #10
0
        private IEnumerable <bool> E_Run()
        {
            DDPicture[] pictures = new DDPicture[]
            {
                Ground.I.Picture.Teki_a02_Run01,
                Ground.I.Picture.Teki_a02_Run02,
                Ground.I.Picture.Teki_a02_Run03,
            };

            for (int frame = 0; ; frame++)
            {
                if (
                    30 < frame &&
                    this.Random.Real() <
                    (
                        DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 400.0 ?
                        0.0001 :
                        0.03
                    ))
                {
                    break;
                }

                if (this.Random.Real() < 0.05)
                {
                    this.FacingLeft = Game.I.Player.X < this.X;
                }

                if (this.FacingLeft)
                {
                    if (!Game.I.Map.GetCell(GameCommon.ToTablePoint(this.X - 30.0, this.Y + 20.0)).Tile.IsGround())
                    {
                        this.FacingLeft = false;
                    }
                }
                else
                {
                    if (!Game.I.Map.GetCell(GameCommon.ToTablePoint(this.X + 30.0, this.Y + 20.0)).Tile.IsGround())
                    {
                        this.FacingLeft = true;
                    }
                }

                const double SPEED = 6.0;

                this.X += this.FacingLeft ? -SPEED : SPEED;

                DDDraw.DrawBegin(pictures[frame / 6 % 3], this.X - DDGround.ICamera.X, this.Y - 32 - DDGround.ICamera.Y);
                DDDraw.DrawZoom_X(this.FacingLeft ? 1.0 : -1.0);
                DDDraw.DrawEnd();

                yield return(true);
            }
            this.WaitFrame = 0;
        }
Beispiel #11
0
 public override void Draw()
 {
     if (DDUtils.GetDistance(new D2Point(this.X, this.Y), new D2Point(Game.I.Player.X, Game.I.Player.Y)) < 50.0)
     {
         if (Game.I.FinalZone == null)                 // ? 最終ゾーン未侵入
         {
             this.最終ノベルパート();
             Game.I.FinalZone = new Game.FinalZoneInfo();
             Game.I.Enemies.Add(new Enemy_MeteorLoader(new D2Point(0, 0)));                     // メテオローダー設置
             Game.I.TakeSnapshot();
         }
     }
 }
Beispiel #12
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                double rot = DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y);
                rot += DDUtils.Random.Real() * 0.05;
                D2Point speedAdd = DDUtils.AngleToPoint(rot, 0.1);

                if (DDUtils.GetDistance(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y) < 50.0)
                {
                    speedAdd *= -300.0;
                }
                this.Speed += speedAdd;
                this.Speed *= 0.93;

                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    {
                        double xZoom = this.Speed.X < 0.0 ? -1.0 : 1.0;

                        DDDraw.DrawBegin(
                            new DDPicture[]
                        {
                            Ground.I.Picture.Enemy_B0001_01,
                            Ground.I.Picture.Enemy_B0001_02,
                            Ground.I.Picture.Enemy_B0001_03,
                            Ground.I.Picture.Enemy_B0001_04,
                        }
                            [frame / 5 % 4],
                            this.X - DDGround.ICamera.X,
                            this.Y - DDGround.ICamera.Y
                            );
                        DDDraw.DrawZoom_X(xZoom);
                        DDDraw.DrawEnd();
                    }

                    // 当たり判定ナシ
                }
                yield return(true);
            }
        }
Beispiel #13
0
        public bool EachFrame()
        {
            double rot = DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y);

            rot += DDUtils.Random.Real2() * 0.05;
            D2Point speedAdd = DDUtils.AngleToPoint(rot, 0.1);

            if (DDUtils.GetDistance(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y) < 50.0)
            {
                speedAdd *= -300.0;
            }
            this.Speed += speedAdd;
            this.Speed *= 0.93;

            this.X += this.Speed.X;
            this.Y += this.Speed.Y;

            return(true);
        }
Beispiel #14
0
        private void DrawDungeon(double xSlideRate = 0.0)
        {
            DDCurtain.DrawCurtain();
            DDDraw.DrawCenter(DungeonScreen.DungScreen.ToPicture(), DDConsts.Screen_W / 2 + xSlideRate * 90.0, DDConsts.Screen_H / 2 - 150);
            DDDraw.DrawSimple(Ground.I.Picture.GameFrame, 0, 0);

            this.DistanceFromStart = DDUtils.GetDistance(
                this.Map.DungeonMap.StartPoint.X - this.Player.X,
                this.Map.DungeonMap.StartPoint.Y - this.Player.Y
                );

            DDUtils.Approach(ref this.DistanceFromStart_Delay, this.DistanceFromStart, 0.8);

            DDPrint.SetPrint(100, 410, 24);
            DDPrint.SetBorder(new I3Color(100, 50, 150));
            DDPrint.PrintLine("方角:" + "南西東北"[this.Player.Direction / 2 - 1]);
            DDPrint.PrintLine("スタート地点からの直線距離:" + this.DistanceFromStart_Delay.ToString("F3"));
            DDPrint.Reset();
        }
Beispiel #15
0
        private void P_Draw()
        {
            double rot = DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y);

            rot += DDUtils.Random.Real() * 0.05;
            D2Point speedAdd = DDUtils.AngleToPoint(rot, 0.1);

            if (DDUtils.GetDistance(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y) < 50.0)
            {
                speedAdd *= -300.0;
            }
            this.Speed += speedAdd;
            this.Speed *= 0.93;

            this.X += this.Speed.X;
            this.Y += this.Speed.Y;

            if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
            {
                {
                    double xZoom = this.Speed.X < 0.0 ? -1.0 : 1.0;

                    DDDraw.DrawBegin(
                        new DDPicture[]
                    {
                        Ground.I.Picture.Enemy_B0001_01,
                        Ground.I.Picture.Enemy_B0001_02,
                        Ground.I.Picture.Enemy_B0001_03,
                        Ground.I.Picture.Enemy_B0001_04,
                    }
                        [this.Frame / 5 % 4],
                        this.X - DDGround.ICamera.X,
                        this.Y - DDGround.ICamera.Y
                        );
                    DDDraw.DrawZoom_X(xZoom);
                    DDDraw.DrawEnd();
                }

                // 当たり判定ナシ
            }
            this.Frame++;
        }
Beispiel #16
0
        private IEnumerable <bool> E_Draw_共通()
        {
            for (; ;)
            {
                if (this.Absorbable && 1 <= Game.I.Player.SlowFrame)                 // ? 吸収可能 && 低速移動中
                {
                    double distance = DDUtils.GetDistance(
                        new D2Point(Game.I.Player.X, Game.I.Player.Y),
                        new D2Point(this.X, this.Y)
                        );

                    if (distance < 100.0)                     // ? 接近した。
                    {
                        Game.I.Enemies.Add(new Enemy_Item(this.X, this.Y, EnemyCommon.DROP_ITEM_TYPE_e.ABSORBABLE_SHOT, 1, this.AbsorbableWeapon));
                        break;
                    }
                }
                yield return(true);
            }
        }
Beispiel #17
0
        private static void Draw円形体力ゲージ(double x, double y, double hp, double plX, double plY)
        {
            const int    DENOM = 180;
            const double R1    = 100.0;
            const double R2    = 110.0;
            const double R3    = 150.0;

            for (int numer = 0; numer < DENOM; numer++)
            {
                double rate1 = (double)(numer + 0) / DENOM;
                double rate2 = (double)(numer + 1) / DENOM;

                double ltx = x + Math.Cos((rate1 - 0.25) * Math.PI * 2.0) * R2;
                double rtx = x + Math.Cos((rate2 - 0.25) * Math.PI * 2.0) * R2;
                double rbx = x + Math.Cos((rate2 - 0.25) * Math.PI * 2.0) * R1;
                double lbx = x + Math.Cos((rate1 - 0.25) * Math.PI * 2.0) * R1;
                double lty = y + Math.Sin((rate1 - 0.25) * Math.PI * 2.0) * R2;
                double rty = y + Math.Sin((rate2 - 0.25) * Math.PI * 2.0) * R2;
                double rby = y + Math.Sin((rate2 - 0.25) * Math.PI * 2.0) * R1;
                double lby = y + Math.Sin((rate1 - 0.25) * Math.PI * 2.0) * R1;

                double  rate    = rate1;
                bool    colored = hp < rate && rate < hp * 2 || rate < hp * 2 - 1.0;
                I3Color color   = colored ? new I3Color(255, 0, 0) : new I3Color(255, 255, 255);

                bool   plNear = DDUtils.GetDistance(new D2Point(x, y), new D2Point(plX, plY)) < R3;
                double a      = plNear ? 0.25 : 0.5;

                DDDraw.SetAlpha(a);
                DDDraw.SetBright(color);
                DDDraw.DrawFree(
                    Ground.I.Picture.WhiteBox,
                    ltx, lty,
                    rtx, rty,
                    rbx, rby,
                    lbx, lby
                    );
                DDDraw.Reset();
            }
        }
Beispiel #18
0
            public D2Point ShiftPt(D2Point pt, double rate)
            {
                // pt == フィールド上の座標

                // 波紋の中心からの相対座標に変更
                pt.X -= this.Center_X;
                pt.Y -= this.Center_Y;

                double wave_r   = rate * 1000.0;
                double distance = DDUtils.GetDistance(pt);
                double d        = distance;

                d -= wave_r;

                // d の -50 ~ 50 を 0.0 ~ 1.0 にする。
                d /= 50.0;
                d += 1.0;
                d /= 2.0;

                if (0.0 < d && d < 1.0)
                {
                    d *= 2.0;

                    if (1.0 < d)
                    {
                        d = 2.0 - d;
                    }

                    distance += DDUtils.SCurve(d) * 50.0 * (1.0 - rate * 0.5);

                    DDUtils.MakeXYSpeed(0.0, 0.0, pt.X, pt.Y, distance, out pt.X, out pt.Y);                     // distance を pt に反映する。
                }

                // restore -- 波紋の中心からの相対座標 -> フィールド上の座標
                pt.X += this.Center_X;
                pt.Y += this.Center_Y;

                return(pt);
            }
Beispiel #19
0
        public override void Draw()
        {
            if (DDUtils.GetDistance(new D2Point(this.X, this.Y), new D2Point(Game.I.Player.X, Game.I.Player.Y)) < 50.0)
            {
                if (Game.I.FinalZone.OH_Event9003.Once())
                {
                    for (int x = 0; x < Game.I.Map.W; x++)
                    {
                        for (int y = 0; y < Game.I.Map.H; y++)
                        {
                            MapCell cell = Game.I.Map.GetCell(x, y);

                            if (
                                cell.Kind == MapCell.Kind_e.DEATH ||
                                cell.Kind == MapCell.Kind_e.GOAL
                                )
                            {
                                cell.Kind = MapCell.Kind_e.WALL;
                            }
                        }
                    }

                    // 必要なイベント以外を除去
                    //
                    Game.I.Enemies.RemoveAll(enemy => !(
                                                 enemy is Enemy_Event9003B ||
                                                 enemy is Enemy_Event9004 ||
                                                 enemy is Enemy_Event9005
                                                 ));

                    Game.I.Map.Design = new Design_0002();

                    //DDGround.EL.Add(SCommon.Supplier(Effects.Liteフラッシュ()));
                    DDGround.EL.Add(SCommon.Supplier(Effects.Heavyフラッシュ()));

                    DDMusicUtils.Stop();
                }
            }
        }
Beispiel #20
0
        private static D2Point Test05_波紋効果による頂点の移動_高速(D2Point pt)
        {
            pt.X -= DDConsts.Screen_W / 2;
            pt.Y -= DDConsts.Screen_H / 2;

            double wave_r   = DDEngine.ProcFrame % 100;
            double distance = DDUtils.GetDistance(pt);
            double d        = distance;

            // 画面の中心から左上までの距離 == 550.*

            d -= wave_r * 6;

            // distance の -50 ~ 50 を 0.0 ~ 1.0 にする。
            d /= 50.0;
            d += 1.0;
            d /= 2.0;

            if (0.0 < d && d < 1.0)
            {
                d *= 2.0;

                if (1.0 < d)
                {
                    d = 2.0 - d;
                }

                distance += DDUtils.SCurve(d) * 100.0;

                DDUtils.MakeXYSpeed(0.0, 0.0, pt.X, pt.Y, distance, out pt.X, out pt.Y);                 // distance を pt に反映する。
            }

            // restore
            pt.X += DDConsts.Screen_W / 2;
            pt.Y += DDConsts.Screen_H / 2;

            return(pt);
        }
Beispiel #21
0
        protected override IEnumerable <bool> E_Draw()
        {
            double SCALE = LevelToScale(this.Level);
            double R     = SCommon.ToInt(24.0 * SCALE);

            double xAdd = this.FacingLeft ? -1.0 : 1.0;
            double yAdd = Game.I.Player.YSpeed * 0.2;

            DDUtils.MakeXYSpeed(0.0, 0.0, xAdd, yAdd, 20.0 * SCALE, out xAdd, out yAdd);

            for (int frame = 0; ; frame++)
            {
                if (Game.I.Status.Equipment != GameStatus.Equipment_e.ハンマー陰陽玉)                 // 武器を切り替えたら消滅
                {
                    this.Kill();
                    break;
                }
                double xaa;
                double yaa;

                // バネの加速度
                {
                    xaa = (Game.I.Player.X - this.X) * 0.01;
                    yaa = (Game.I.Player.Y - this.Y) * 0.01;
                }

                yaa += 1.0;                 // 重力加速度

                xAdd += xaa;
                yAdd += yaa;

                // 空気抵抗
                {
                    double 空気抵抗 = LevelTo空気抵抗(this.Level);

                    xAdd *= 空気抵抗;
                    yAdd *= 空気抵抗;
                }

                this.X += xAdd;
                this.Y += yAdd;

                DDDraw.DrawBegin(Ground.I.Picture2.陰陽玉, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                DDDraw.DrawSetSize(R * 2, R * 2);
                DDDraw.DrawRotate(frame / 10.0);
                DDDraw.DrawEnd();

                // プレイヤーとハンマーを繋ぐバネのような何かを描画する。
                {
                    double d = DDUtils.GetDistance(this.X - Game.I.Player.X, this.Y - Game.I.Player.Y);

                    if (10.0 < d)
                    {
                        double x   = (this.X + Game.I.Player.X) / 2.0;
                        double y   = (this.Y + Game.I.Player.Y) / 2.0;
                        double rot = DDUtils.GetAngle(this.X - Game.I.Player.X, this.Y - Game.I.Player.Y) + Math.PI / 2;

                        DDDraw.SetAlpha(0.5);
                        DDDraw.DrawBegin(Ground.I.Picture2.Laser[4], x - DDGround.ICamera.X, y - DDGround.ICamera.Y);
                        DDDraw.DrawSetSize_H(d);
                        DDDraw.DrawRotate(rot);
                        DDDraw.DrawEnd();
                        DDDraw.Reset();
                    }
                }

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), R);

                yield return(true);
            }
        }
Beispiel #22
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (this.VacuumMode == 0)
                {
                    if (Game.I.Input.Slow && DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 100.0)                     // ? 低速移動中に接近した。
                    {
                        this.VacuumMode = 1;
                    }
                    else if (Game.I.Player.Y < GameConsts.ITEM_GET_BORDER_Y && this.Y < GameConsts.ITEM_GET_MAX_Y)
                    {
                        this.VacuumMode = 2;
                    }
                }
                if (this.VacuumMode == 0)
                {
                    this.Y    += this.YAdd;
                    this.YAdd += 0.1;

                    if (this.X < 0.0)
                    {
                        this.X += 1.0;
                    }
                    else if (GameConsts.FIELD_W < this.X)
                    {
                        this.X -= 1.0;
                    }
                }
                else
                {
                    double speed;

                    if (this.VacuumMode == 2)
                    {
                        speed = 12.0;
                    }
                    else
                    {
                        speed = 6.0;
                    }

                    double targetX;
                    double targetY;

                    if (1 <= Game.I.Player.BornFrame)
                    {
                        targetX = Game.I.Player.BornFollowX;
                        targetY = Game.I.Player.BornFollowY;
                    }
                    else
                    {
                        targetX = Game.I.Player.X;
                        targetY = Game.I.Player.Y;
                    }
                    double xa;
                    double ya;

                    DDUtils.MakeXYSpeed(this.X, this.Y, targetX, targetY, speed, out xa, out ya);

                    this.X += xa;
                    this.Y += ya;
                }
                this.Rot += this.RotAdd;

                if (0.0 < this.YAdd)
                {
                    this.YAdd *= 0.97;
                }

                DDPicture picture;

                switch (this.DropItemType)
                {
                case EnemyCommon.DROP_ITEM_TYPE_e.STAR: picture = Ground.I.Picture2.D_ITEM_STAR; break;

                case EnemyCommon.DROP_ITEM_TYPE_e.HEART: picture = Ground.I.Picture2.D_ITEM_HEART; break;

                case EnemyCommon.DROP_ITEM_TYPE_e.CANDY: picture = Ground.I.Picture2.D_ITEM_CANDY; break;

                case EnemyCommon.DROP_ITEM_TYPE_e.BOMB: picture = Ground.I.Picture2.D_ITEM_BOMB; break;

                case EnemyCommon.DROP_ITEM_TYPE_e.ABSORBABLE_SHOT:
                {
                    picture = Ground.I.Picture2.吸収している武器;

                    DDDraw.SetAlpha(0.5);
                    DDDraw.SetBright(0.0, 0.5, 1.0);
                    DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], this.X, this.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                    DDDraw.DrawZoom(0.5);
                    DDDraw.DrawEnd();
                    DDDraw.Reset();
                }
                break;

                default:
                    throw null;                             // never
                }

                DDDraw.DrawBegin(picture, this.X, this.Y);
                DDDraw.DrawRotate(this.Rot);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 16.0);

                yield return(this.Y < GameConsts.ITEM_GET_MAX_Y);
            }
        }