예제 #1
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (character.waittime == 1)
            {
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.warp);
            }
            if (this.action <= 1 && !this.command)
            {
                this.CommandInput("B", (Player)character);
                if (this.CommandCheck("BBB"))
                {
                    this.command = true;
                    this.sound.PlaySE(SoundEffect.CommandSuccess);
                    this.subpower = 10;
                }
            }
            switch (this.action)
            {
            case 0:
                this.animePoint = this.AnimeGatlingReady(this.waittime);
                if (this.waittime >= 21)
                {
                    int  x    = Eriabash.SteelX(character, character.parent);
                    int  y    = 0;
                    bool flag = false;
                    for (int index = 0; index < this.target.GetLength(1); ++index)
                    {
                        this.target[0, index] = new Point(x, y);
                        if (flag)
                        {
                            if (y <= 0)
                            {
                                if (x < 5 && x > 0)
                                {
                                    x += this.UnionRebirth(character.union);
                                }
                                flag = !flag;
                            }
                            else
                            {
                                --y;
                            }
                        }
                        else if (y >= 2)
                        {
                            if (x < 5 && x > 0)
                            {
                                x += this.UnionRebirth(character.union);
                            }
                            flag = !flag;
                        }
                        else
                        {
                            ++y;
                        }
                    }
                    this.sound.PlaySE(SoundEffect.machineRunning);
                    ++this.action;
                    this.waittime = 0;
                    break;
                }
                break;

            case 1:
                this.animePoint = this.AnimeGatling1(this.waittime);
                if (this.waittime == 3)
                {
                    ++this.spin;
                    this.waittime = 0;
                    if (this.spin >= 2)
                    {
                        ++this.action;
                        this.spin = 0;
                        if (this.command)
                        {
                            int   num   = 0;
                            Point point = new Point(-1, -1);
                            foreach (CharacterBase characterBase in battle.AllChara())
                            {
                                if (characterBase.union == character.UnionEnemy && num < characterBase.Hp)
                                {
                                    num   = characterBase.Hp;
                                    point = characterBase.position;
                                }
                            }
                            if (point.X >= 0 && point.Y >= 0)
                            {
                                for (int index = 0; index < this.target.GetLength(1); ++index)
                                {
                                    this.target[0, index] = point;
                                }
                            }
                        }
                    }
                    break;
                }
                break;

            case 2:
                this.animePoint = this.AnimeGatling2(this.waittime);
                if (this.waittime == 3)
                {
                    this.sound.PlaySE(SoundEffect.vulcan);
                    Point point = this.target[0, this.spin];
                    battle.effects.Add(new GunHit(this.sound, battle, point.X, point.Y, character.union));
                    BombAttack bombAttack = new BombAttack(this.sound, battle, point.X, point.Y, character.union, this.subpower, 1, this.element);
                    bombAttack.invincibility = false;
                    battle.attacks.Add(this.Paralyze(bombAttack));
                    List <EffectBase> effects  = battle.effects;
                    IAudioEngine      sound    = this.sound;
                    SceneBattle       p        = battle;
                    Point             position = character.position;
                    double            x        = character.positionDirect.X;
                    this.UnionRebirth(character.union);
                    double       num1         = x - 0.0;
                    double       num2         = character.positionDirect.Y + 8.0;
                    int          union        = (int)character.union;
                    int          time         = 40 + this.Random.Next(20);
                    BulletShells bulletShells = new BulletShells(sound, p, position, (float)num1, (float)num2, 32, (Panel.COLOR)union, time, 2, 0);
                    effects.Add(bulletShells);
                    battle.effects.Add(new BulletShells(this.sound, battle, character.position, character.positionDirect.X - 16 * this.UnionRebirth(character.union), character.positionDirect.Y + 8f, 32, character.union, 40 + this.Random.Next(20), 2, 0));
                    break;
                }
                if (this.waittime == 9)
                {
                    ++this.spin;
                    this.waittime = 0;
                    if (this.spin >= 9)
                    {
                        ++this.action;
                    }
                    break;
                }
                break;

            case 3:
                this.animePoint = this.AnimeCanonReady(this.waittime);
                if (this.waittime >= 21)
                {
                    ++this.action;
                    this.waittime = 0;
                    break;
                }
                break;

            case 4:
                this.animePoint = this.AnimeCanon(this.waittime);
                if (this.waittime == 3)
                {
                    this.sound.PlaySE(SoundEffect.canon);
                    battle.attacks.Add(this.Paralyze(new CanonBullet(this.sound, battle, character.position.X + this.UnionRebirth(character.union), character.position.Y, new Vector2(character.positionDirect.X + 32 * this.UnionRebirth(character.union), character.positionDirect.Y + 8f), character.union, this.Power(character), this.element, false)));
                    battle.effects.Add(new BulletBigShells(this.sound, battle, character.position, character.positionDirect.X - 16 * this.UnionRebirth(character.union), character.positionDirect.Y - 16f, 32, character.union, 40 + this.Random.Next(20), 2, 0));
                    break;
                }
                if (this.waittime >= 54 && this.BlackOutEnd(character, battle))
                {
                    base.Action(character, battle);
                    break;
                }
                break;
            }
            ++this.waittime;
        }
예제 #2
0
        protected override void Moving()
        {
            this.neutlal = this.Motion == NaviBase.MOTION.neutral;
            switch (this.Motion)
            {
            case NaviBase.MOTION.neutral:
                if (this.moveflame)
                {
                    ++this.waittime;
                }
                if (this.moveflame && this.waittime >= 16 / version)
                {
                    this.waittime = 0;
                    ++this.roopneutral;
                    this.animationpoint = this.AnimeNeutral(this.waittime);
                    if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                    {
                        this.roopneutral = 0;
                        if (this.roopmove > this.moveroop && !this.badstatus[4])
                        {
                            this.roopmove = 0;
                            this.speed    = 1;
                            ++this.attackroop;
                            this.waittime  = 0;
                            this.ready     = false;
                            this.attack    = (TankMan.ATTACK) this.pattern[this.action];
                            this.powerPlus = this.powers[this.pattern[this.action]];
                            ++this.action;
                            if (this.action >= this.pattern.Length)
                            {
                                this.action = 0;
                            }
                            this.Motion        = NaviBase.MOTION.attack;
                            this.counterTiming = true;
                        }
                        else
                        {
                            this.waittime = 0;
                            this.roopmove = this.moveroop + 1;
                            this.Motion   = NaviBase.MOTION.move;
                        }
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.attack:
                switch (this.attack)
                {
                case TankMan.ATTACK.TankCanon:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeCanonReady(this.waittime);
                            if (this.waittime >= this.aspeed * 7)
                            {
                                this.ready         = true;
                                this.counterTiming = false;
                                this.waittime      = 0;
                            }
                        }
                        else
                        {
                            this.animationpoint = this.AnimeCanon(this.waittime);
                            if (this.waittime == this.aspeed)
                            {
                                this.sound.PlaySE(SoundEffect.canon);
                                this.parent.attacks.Add(new CanonBullet(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, new Vector2(this.positionDirect.X + 32 * this.UnionRebirth(this.union), this.positionDirect.Y), this.union, this.Power, this.element, false));
                                this.parent.effects.Add(new BulletBigShells(this.sound, this.parent, this.position, this.positionDirect.X - 16 * this.UnionRebirth(this.union), this.positionDirect.Y - 16f, 32, this.union, 40 + this.Random.Next(20), 2, 0));
                            }
                            else if (this.waittime == this.aspeed * 6)
                            {
                                ++this.attackCount;
                                this.waittime = 0;
                                if (this.attackCount >= Math.Min((int)this.version, 3))
                                {
                                    this.attackCount = 0;
                                    this.roopneutral = 0;
                                    this.Motion      = NaviBase.MOTION.neutral;
                                    this.speed       = this.nspeed;
                                }
                            }
                        }
                        break;
                    }
                    break;

                case TankMan.ATTACK.GatlingGun:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeGatlingReady(this.waittime);
                            if (this.waittime >= this.aspeed * 7)
                            {
                                int  num1 = Eriabash.SteelX(this, this.parent);
                                int  num2 = 0;
                                int  y    = 0;
                                int  num3 = 0;
                                bool flag = false;
                                for (int index = 0; index < this.target.GetLength(1); ++index)
                                {
                                    this.target[0, index] = new Point(num1 + num3 * this.UnionRebirth(this.union), y);
                                    this.target[1, index] = new Point(num2 - num3 * this.UnionRebirth(this.union), 2 - y);
                                    if (flag)
                                    {
                                        if (y <= 0)
                                        {
                                            ++num3;
                                            flag = !flag;
                                        }
                                        else
                                        {
                                            --y;
                                        }
                                    }
                                    else if (y >= 2)
                                    {
                                        ++num3;
                                        flag = !flag;
                                    }
                                    else
                                    {
                                        ++y;
                                    }
                                }
                                this.sound.PlaySE(SoundEffect.machineRunning);
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.target[0, 0].X, this.target[0, 0].Y, this.union, new Point(0, 0), 40, true));
                                if (this.version >= 3)
                                {
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.target[1, 0].X, this.target[1, 0].Y, this.union, new Point(0, 0), 40, true));
                                }
                                this.ready         = true;
                                this.counterTiming = false;
                                this.speed         = 1;
                                this.waittime      = 0;
                                break;
                            }
                            break;
                        }
                        if (this.attackCount >= 4 && this.attackCount < this.target.GetLength(1) + 4)
                        {
                            this.animationpoint = this.AnimeGatling2(this.waittime);
                        }
                        else
                        {
                            this.animationpoint = this.AnimeGatling1(this.waittime);
                        }
                        if (this.waittime == this.aspeed)
                        {
                            if (this.attackCount >= 4 && this.attackCount < this.target.GetLength(1) + 4)
                            {
                                if (this.version >= 3)
                                {
                                    this.sound.PlaySE(SoundEffect.vulcan);
                                    Point point = this.target[0, this.attackCount - 4];
                                    this.parent.effects.Add(new GunHit(this.sound, this.parent, point.X, point.Y, this.union));
                                    this.parent.attacks.Add(new BombAttack(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 1, this.element));
                                    point = this.target[1, this.attackCount - 4];
                                    this.parent.effects.Add(new GunHit(this.sound, this.parent, point.X, point.Y, this.union));
                                    this.parent.attacks.Add(new BombAttack(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 1, this.element));
                                }
                                else
                                {
                                    this.sound.PlaySE(SoundEffect.vulcan);
                                    Point point = this.target[0, this.attackCount - 4];
                                    this.parent.effects.Add(new GunHit(this.sound, this.parent, point.X, point.Y, this.union));
                                    this.parent.attacks.Add(new BombAttack(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 1, this.element));
                                }
                                List <EffectBase> effects  = this.parent.effects;
                                IAudioEngine      sound    = this.sound;
                                SceneBattle       parent   = this.parent;
                                Point             position = this.position;
                                double            x        = positionDirect.X;
                                this.UnionRebirth(this.union);
                                double       num1         = x - 0.0;
                                double       num2         = positionDirect.Y - 4.0;
                                int          union        = (int)this.union;
                                int          time         = 40 + this.Random.Next(20);
                                BulletShells bulletShells = new BulletShells(sound, parent, position, (float)num1, (float)num2, 32, (Panel.COLOR)union, time, 2, 0);
                                effects.Add(bulletShells);
                                this.parent.effects.Add(new BulletShells(this.sound, this.parent, this.position, this.positionDirect.X - 16 * this.UnionRebirth(this.union), this.positionDirect.Y - 4f, 32, this.union, 40 + this.Random.Next(20), 2, 0));
                            }
                        }
                        else if (this.waittime == this.aspeed * 3)
                        {
                            ++this.attackCount;
                            this.waittime = 0;
                            if (this.attackCount > this.target.GetLength(1) + 6)
                            {
                                this.attackCount = 0;
                                this.roopneutral = 0;
                                this.Motion      = NaviBase.MOTION.neutral;
                                this.speed       = this.nspeed;
                            }
                        }
                        break;
                    }
                    break;

                case TankMan.ATTACK.MissilePod:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeMissileReady(this.waittime);
                            if (this.waittime >= this.aspeed * 6)
                            {
                                this.ready         = true;
                                this.counterTiming = false;
                                this.waittime      = 0;
                            }
                        }
                        else
                        {
                            this.animationpoint = this.AnimeMissile(this.waittime);
                            if (this.waittime == this.aspeed * 3)
                            {
                                this.sound.PlaySE(SoundEffect.shoot);
                                Point point = this.RandomPanel(Panel.COLOR.red);
                                this.parent.attacks.Add(new DelayMissile(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 300, this.element));
                            }
                            else if (this.waittime == this.aspeed * 5)
                            {
                                ++this.attackCount;
                                this.waittime = 0;
                                if (this.attackCount >= version + 2)
                                {
                                    this.attackCount = 0;
                                    this.roopneutral = 0;
                                    this.Motion      = NaviBase.MOTION.neutral;
                                    this.speed       = this.nspeed;
                                }
                            }
                        }
                        break;
                    }
                    break;

                case TankMan.ATTACK.NapalmPod:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeMissileReady(this.waittime);
                            if (this.waittime >= this.aspeed * 6)
                            {
                                this.ready         = true;
                                this.counterTiming = false;
                                this.waittime      = 0;
                            }
                        }
                        else
                        {
                            this.animationpoint = this.AnimeMissile(this.waittime);
                            if (this.waittime == this.aspeed * 3)
                            {
                                this.sound.PlaySE(SoundEffect.canon);
                                Point point = this.RandomPanel(Panel.COLOR.red);
                                this.parent.attacks.Add(new NapalmBomb(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, 1, new Vector2(this.positionDirect.X - 32 * this.UnionRebirth(this.union), this.positionDirect.Y - 16f), new Point(point.X, point.Y), 40, NapalmBomb.TYPE.single, 300));
                            }
                            else if (this.waittime == this.aspeed * 5)
                            {
                                ++this.attackCount;
                                this.waittime = 0;
                                if (this.attackCount >= 2)
                                {
                                    this.attackCount = 0;
                                    this.roopneutral = 0;
                                    this.Motion      = NaviBase.MOTION.neutral;
                                    this.speed       = this.nspeed;
                                }
                            }
                        }
                        break;
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.move:
                if (this.moveflame)
                {
                    ++this.waittime;
                }
                ++this.roopmove;
                this.Motion = NaviBase.MOTION.neutral;
                this.MoveRandom(false, false);
                this.speed = this.nspeed;
                if (this.attackroop > 4)
                {
                    this.attackroop = 0;
                }
                if (this.position == this.positionre)
                {
                    this.frame       = 0;
                    this.roopneutral = 0;
                    break;
                }
                this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                this.position = this.positionre;
                this.PositionDirectSet();
                this.frame       = 0;
                this.roopneutral = 0;
                break;

            case NaviBase.MOTION.knockback:
                switch (this.waittime)
                {
                case 2:
                    this.rebirth     = this.union == Panel.COLOR.red;
                    this.ready       = false;
                    this.attackCount = 0;
                    this.speed       = this.nspeed;
                    this.effecting   = false;
                    this.NockMotion();
                    this.counterTiming = false;
                    this.effecting     = false;
                    this.PositionDirectSet();
                    break;

                case 3:
                    this.NockMotion();
                    break;

                case 15:
                    this.animationpoint = new Point(9, 0);
                    this.PositionDirectSet();
                    break;

                case 21:
                    this.animationpoint = new Point(0, 0);
                    this.waittime       = 0;
                    this.Motion         = NaviBase.MOTION.neutral;
                    break;
                }
                if (this.waittime >= 2 && this.waittime <= 6)
                {
                    this.positionDirect.X -= this.UnionRebirth(this.union);
                }
                ++this.waittime;
                break;
            }
            if (this.effecting)
            {
                this.AttackMake(this.Power, 0, 0);
            }
            this.FlameControl();
            this.MoveAftar();
        }