Beispiel #1
0
 public override bool HitEvent(EnemyBase e)
 {
     if (!base.HitEvent(e))
     {
         return(false);
     }
     this.sound.PlaySE(SoundEffect.canon);
     this.flag = false;
     this.ShakeStart(5, 5);
     if (e.Element == ChipBase.ELEMENT.heat && this.type == NapalmBomb.TYPE.fuhatu)
     {
         int x = Eriabash.SteelX(this, this.parent);
         this.sound.PlaySE(SoundEffect.bombbig);
         this.ShakeStart(4, 90);
         this.parent.effects.Add(new RandomBomber(this.sound, this.parent, Bomber.BOMBERTYPE.flashbomber, 2, new Point(x, 0), new Point(6, 2), this.union, 36));
         for (int pX = 0; pX < this.parent.panel.GetLength(0); ++pX)
         {
             for (int pY = 0; pY < this.parent.panel.GetLength(1); ++pY)
             {
                 if (this.parent.panel[pX, pY].color == this.UnionEnemy)
                 {
                     this.parent.attacks.Add(new BombAttack(this.sound, this.parent, pX, pY, this.union, this.power, 1, ChipBase.ELEMENT.normal));
                 }
             }
         }
     }
     return(true);
 }
Beispiel #2
0
 public override void Updata()
 {
     if (this.bomb)
     {
         int x = Eriabash.SteelX(this, this.parent);
         this.sound.PlaySE(SoundEffect.bombbig);
         this.ShakeStart(4, 90);
         this.parent.effects.Add(new RandomBomber(this.sound, this.parent, Bomber.BOMBERTYPE.flashbomber, 2, new Point(x, 0), new Point(6, 2), this.union, 36));
         for (int pX = 0; pX < this.parent.panel.GetLength(0); ++pX)
         {
             for (int pY = 0; pY < this.parent.panel.GetLength(1); ++pY)
             {
                 if (this.parent.panel[pX, pY].color == this.UnionEnemy)
                 {
                     this.parent.attacks.Add(new BombAttack(this.sound, this.parent, pX, pY, this.union, this.hitPower, 1, ChipBase.ELEMENT.normal));
                 }
             }
         }
         this.flag = false;
     }
     base.Updata();
 }
Beispiel #3
0
 private void DorillChange()
 {
     if (this.DorillSearch())
     {
         this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
         this.position = this.positionre;
         this.PositionDirectSet();
         this.Motion   = NaviBase.MOTION.attack;
         this.waittime = 0;
         int index = 2;
         this.speed     = Math.Max(3, 4 - version / 2);
         this.attack    = (Iku.ATTACK)index;
         this.powerPlus = this.powers[index];
     }
     else
     {
         ++this.cancelCount;
         if (this.cancelCount >= 5)
         {
             int pX = Eriabash.SteelX(this, this.parent);
             if (pX != 99)
             {
                 for (int pY = 0; pY < this.parent.panel.GetLength(1); ++pY)
                 {
                     this.parent.attacks.Add(new EriaSteel(this.sound, this.parent, pX, pY, this.union, 10, this.element));
                 }
             }
             this.cancelCount = 0;
         }
         this.motion   = NaviBase.MOTION.move;
         this.waittime = 0;
         if (!this.atack)
         {
             this.speed = 8;
         }
     }
 }
Beispiel #4
0
        public override void Updata()
        {
            if (this.moveflame)
            {
                if (this.breaked)
                {
                    if (this.animationpoint.X > 8)
                    {
                        this.animationpoint.X = 8;
                    }
                    --this.animationpoint.X;
                    if (this.animationpoint.X < 0)
                    {
                        this.flag = false;
                    }
                }
                else
                {
                    switch (this.motion)
                    {
                    case MimaNavi.MOTION.init:
                        ++this.animationpoint.X;
                        if (this.animationpoint.X >= 8)
                        {
                            this.frame  = -8;
                            this.motion = MimaNavi.MOTION.neutral;
                            break;
                        }
                        break;

                    case MimaNavi.MOTION.neutral:
                        if (this.frame >= 0)
                        {
                            this.motion = !this.EnemySearch(this.position.Y) ? MimaNavi.MOTION.move : MimaNavi.MOTION.attack;
                            break;
                        }
                        break;

                    case MimaNavi.MOTION.move:
                        this.animationpoint = this.AnimeMove(this.frame);
                        if (this.frame == 5)
                        {
                            bool flag = false;
                            if (this.EnemySearch(this.position.Y - 2) && !flag)
                            {
                                this.positionre = new Point(this.position.X, this.position.Y - 1);
                                if (this.Canmove(this.positionre, this.number, this.union))
                                {
                                    flag          = true;
                                    this.position = this.positionre;
                                    this.PositionDirectSet();
                                }
                                else
                                {
                                    this.positionre = this.position;
                                }
                            }
                            if (this.EnemySearch(this.position.Y - 1) && !flag)
                            {
                                this.positionre = new Point(this.position.X, this.position.Y - 1);
                                if (this.Canmove(this.positionre, this.number, this.union))
                                {
                                    flag          = true;
                                    this.position = this.positionre;
                                    this.PositionDirectSet();
                                }
                                else
                                {
                                    this.positionre = this.position;
                                }
                            }
                            if (this.EnemySearch(this.position.Y + 1) && !flag)
                            {
                                this.positionre = new Point(this.position.X, this.position.Y + 1);
                                if (this.Canmove(this.positionre, this.number, this.union))
                                {
                                    flag          = true;
                                    this.position = this.positionre;
                                    this.PositionDirectSet();
                                }
                                else
                                {
                                    this.positionre = this.position;
                                }
                            }
                            if (this.EnemySearch(this.position.Y + 2) && !flag)
                            {
                                this.positionre = new Point(this.position.X, this.position.Y + 1);
                                if (this.Canmove(this.positionre, this.number, this.union))
                                {
                                    this.position = this.positionre;
                                    this.PositionDirectSet();
                                }
                                else
                                {
                                    this.positionre = this.position;
                                }
                            }
                        }
                        if (this.frame >= 8)
                        {
                            this.frame  = -4;
                            this.motion = MimaNavi.MOTION.neutral;
                            break;
                        }
                        break;

                    case MimaNavi.MOTION.attack:
                        this.animationpoint = this.AnimeAttack(this.frame);
                        if (this.frame == 3)
                        {
                            this.sound.PlaySE(SoundEffect.shotwave);
                            this.parent.attacks.Add(new LanceAttack(this.sound, this.parent, this.position.X + this.UnionRebirth, this.position.Y, this.union, this.hitPower, 2, ChipBase.ELEMENT.poison, true));
                        }
                        if (this.frame == 8)
                        {
                            ++this.attackCount;
                            if (this.attackCount >= 3)
                            {
                                this.animationpoint.X = 8;
                                int pX = Eriabash.SteelX(this, this.parent);
                                if (pX != 99 && pX > 0 && pX < 5)
                                {
                                    for (int pY = 0; pY < this.parent.panel.GetLength(1); ++pY)
                                    {
                                        this.parent.attacks.Add(new EriaSteel(this.sound, this.parent, pX, pY, this.union, 10, this.element));
                                    }
                                }
                                this.breaked = true;
                            }
                            else
                            {
                                this.frame  = -8;
                                this.motion = MimaNavi.MOTION.neutral;
                            }
                            break;
                        }
                        break;
                    }
                }
            }
            this.FlameControl();
            base.Updata();
        }
Beispiel #5
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.spark))
                {
                    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.frame    = 0;
                            this.roopmove = 0;
                            ++this.attackroop;
                            this.waittime = 0;
                            this.ready    = false;
                            if (this.spark)
                            {
                                this.attack = SpannerMan.ATTACK.SparkArm;
                                this.speed  = this.nspeed;
                            }
                            else
                            {
                                this.attack = (SpannerMan.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.frame    = 0;
                            this.waittime = 0;
                            this.roopmove = this.moveroop + 1;
                            this.Motion   = NaviBase.MOTION.move;
                        }
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.attack:
                switch (this.attack)
                {
                case SpannerMan.ATTACK.SpannerThrow:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeThrow(this.waittime);
                        switch (this.frame)
                        {
                        case 4:
                            this.counterTiming = false;
                            this.sound.PlaySE(SoundEffect.knife);
                            SpinSpanner spinSpanner = new SpinSpanner(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.Power, this.union)
                            {
                                Hp = version * 10
                            };
                            this.spanners.Add(spinSpanner);
                            this.parent.objects.Add(spinSpanner);
                            break;

                        case 14:
                            this.motion   = NaviBase.MOTION.move;
                            this.waittime = 0;
                            this.frame    = 0;
                            break;
                        }
                        break;
                    }
                    break;

                case SpannerMan.ATTACK.MetalImpact:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeImpact(this.waittime);
                        switch (this.frame)
                        {
                        case 8:
                            this.counterTiming = false;
                            if (!this.parent.panel[this.position.X + this.UnionRebirth(this.union), this.position.Y].Hole)
                            {
                                this.sound.PlaySE(SoundEffect.quake);
                                if (!this.clack)
                                {
                                    Point point = this.RandomPanel(this.UnionEnemy);
                                    this.parent.panel[point.X, point.Y].Crack();
                                    if (this.version >= 3)
                                    {
                                        this.clack = true;
                                    }
                                }
                                else
                                {
                                    this.clack = false;
                                }
                                this.ShakeStart(1, 80);
                                int s = 1;
                                switch (this.version)
                                {
                                case 1:
                                case 2:
                                    s = 3;
                                    break;

                                case 3:
                                    s = 2;
                                    break;
                                }
                                this.parent.attacks.Add(new WaveAttsck(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, s, 0, this.element));
                                break;
                            }
                            break;

                        case 20:
                            this.motion   = NaviBase.MOTION.move;
                            this.waittime = 0;
                            this.frame    = 0;
                            break;
                        }
                    }
                    break;

                case SpannerMan.ATTACK.SparkArm:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeSpark(this.waittime);
                        switch (this.waittime)
                        {
                        case 7:
                            this.counterTiming = false;
                            this.Sound.PlaySE(SoundEffect.thunder);
                            AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 1, 1, ChipBase.ELEMENT.eleki);
                            attackBase.badstatus[3]     = true;
                            attackBase.badstatustime[3] = 120;
                            attackBase.invincibility    = false;
                            this.parent.attacks.Add(attackBase);
                            break;

                        case 9:
                            this.Sound.PlaySE(SoundEffect.thunder);
                            break;

                        case 11:
                            this.attack    = (SpannerMan.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;
                            this.waittime      = 0;
                            this.frame         = 0;
                            break;
                        }
                        break;
                    }
                    break;

                case SpannerMan.ATTACK.BurnerBlast:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeBurner1(this.waittime);
                            if (this.frame == 1)
                            {
                                this.speed = this.nspeed + 2;
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 2 * this.UnionRebirth(this.union), this.position.Y, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 4 * this.UnionRebirth(this.union), this.position.Y, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 4 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, new Point(), 80, true));
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + 4 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, new Point(), 80, true));
                            }
                            if (this.frame >= 8)
                            {
                                this.ready         = true;
                                this.counterTiming = false;
                                this.frame         = 0;
                            }
                        }
                        else
                        {
                            this.animationpoint = this.AnimeBurner2(this.frame % 2);
                            int num1 = 0;
                            int roop = 9;
                            switch (this.frame)
                            {
                            case 1:
                                this.sound.PlaySE(SoundEffect.quake);
                                AttackBase attackBase1 = new ElementFire(this.sound, this.parent, this.position.X + 2 * this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase1.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase1);
                                break;

                            case 4:
                                this.sound.PlaySE(SoundEffect.quake);
                                int        num2        = 3;
                                AttackBase attackBase2 = new ElementFire(this.sound, this.parent, this.position.X + num2 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase2.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase2);
                                AttackBase attackBase3 = new ElementFire(this.sound, this.parent, this.position.X + num2 * this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase3.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase3);
                                AttackBase attackBase4 = new ElementFire(this.sound, this.parent, this.position.X + num2 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase4.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase4);
                                break;

                            case 7:
                                this.sound.PlaySE(SoundEffect.quake);
                                int        num3        = 4;
                                AttackBase attackBase5 = new ElementFire(this.sound, this.parent, this.position.X + num3 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase5.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase5);
                                AttackBase attackBase6 = new ElementFire(this.sound, this.parent, this.position.X + num3 * this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase6.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase6);
                                AttackBase attackBase7 = new ElementFire(this.sound, this.parent, this.position.X + num3 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, this.Power, roop, ChipBase.ELEMENT.heat, false, 1);
                                attackBase7.positionDirect.Y += num1;
                                this.parent.attacks.Add(attackBase7);
                                break;

                            case 26:
                                this.ready    = false;
                                this.motion   = NaviBase.MOTION.move;
                                this.waittime = 0;
                                this.frame    = 0;
                                this.speed    = this.nspeed;
                                break;
                            }
                        }
                        break;
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.move:
                this.animationpoint = this.AnimeMove(this.waittime);
                if (this.moveflame)
                {
                    switch (this.waittime)
                    {
                    case 0:
                        bool flag = false;
                        if (!this.spark)
                        {
                            foreach (CharacterBase characterBase in this.parent.AllChara())
                            {
                                if (characterBase.union == this.UnionEnemy && characterBase.position.X == Eriabash.SteelX(this, this.parent))
                                {
                                    flag               = true;
                                    this.positionre    = characterBase.position;
                                    this.positionre.X -= this.UnionRebirth(this.union);
                                    break;
                                }
                            }
                        }
                        else
                        {
                            this.spark = false;
                        }
                        if (flag && this.Canmove(this.positionre, this.number))
                        {
                            this.spark    = true;
                            this.roopmove = this.moveroop + 1;
                            this.speed    = 2;
                        }
                        else
                        {
                            this.MoveRandom(false, false);
                        }
                        if (this.position == this.positionre)
                        {
                            this.Motion      = NaviBase.MOTION.neutral;
                            this.frame       = 0;
                            this.roopneutral = 0;
                            ++this.roopmove;
                            break;
                        }
                        break;

                    case 4:
                        this.position = this.positionre;
                        this.PositionDirectSet();
                        break;

                    case 7:
                        this.Motion      = NaviBase.MOTION.neutral;
                        this.frame       = 0;
                        this.roopneutral = 0;
                        ++this.roopmove;
                        break;
                    }
                    ++this.waittime;
                    break;
                }
                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(17, 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;
            }
            this.spanners.RemoveAll(s => !s.flag);
            if (this.effecting)
            {
                this.AttackMake(this.Power, 0, 0);
            }
            this.FlameControl();
            this.MoveAftar();
        }
Beispiel #6
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 / Math.Max(2, Math.Min((int)this.version, 4)))
                {
                    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    = (TortoiseMan.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 TortoiseMan.ATTACK.ShellHockeySide:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        if (!this.ready)
                        {
                            this.animationpoint = this.AnimeShellReady(this.waittime);
                            if (this.waittime == this.aspeed)
                            {
                                this.sound.PlaySE(SoundEffect.throwbomb);
                            }
                            if (this.waittime == this.aspeed * 3)
                            {
                                this.sound.PlaySE(SoundEffect.chain);
                            }
                            if (this.waittime >= this.aspeed * 7)
                            {
                                this.attackProcess = 0;
                                this.ready         = true;
                                this.effecting     = true;
                                this.guard         = CharacterBase.GUARD.guard;
                                this.counterTiming = false;
                                this.Noslip        = true;
                                this.waittime      = 0;
                                this.sound.PlaySE(SoundEffect.knife);
                            }
                        }
                        else if (!this.end)
                        {
                            this.animationpoint = this.AnimeShellSpin(this.waittime);
                            if (this.waittime >= this.aspeed * 3)
                            {
                                this.waittime = 0;
                            }
                        }
                        else
                        {
                            this.animationpoint = this.AnimeShellEnd(this.waittime);
                            if (this.waittime >= this.aspeed * 7)
                            {
                                this.SlideMoveEnd();
                                this.motion    = NaviBase.MOTION.move;
                                this.Noslip    = false;
                                this.end       = false;
                                this.ready     = false;
                                this.effecting = false;
                                this.guard     = CharacterBase.GUARD.none;
                                this.waittime  = 0;
                                this.HitFlagReset();
                                this.counterTiming = false;
                            }
                        }
                    }
                    if (this.ready && !this.end)
                    {
                        if (this.attackProcess == 0)
                        {
                            if (this.SlideMove(attackSpeed, 0))
                            {
                                this.SlideMoveEnd();
                                if (!this.InAreaCheck(new Point(this.position.X + this.UnionRebirth(this.union), this.position.Y)))
                                {
                                    switch (this.position.Y)
                                    {
                                    case 0:
                                        this.attackUP      = false;
                                        this.attackProcess = 1;
                                        break;

                                    case 2:
                                        this.attackUP      = true;
                                        this.attackProcess = 1;
                                        break;

                                    default:
                                        this.HitFlagReset();
                                        this.attackProcess = 2;
                                        break;
                                    }
                                }
                            }
                        }
                        else if (this.attackProcess == 1)
                        {
                            if (this.SlideMove(attackSpeed, this.attackUP ? 2 : 3))
                            {
                                this.SlideMoveEnd();
                                if (!this.InAreaCheck(new Point(this.position.X, this.position.Y + (this.attackUP ? -1 : 1))))
                                {
                                    this.attackProcess = 2;
                                }
                            }
                        }
                        else if (this.SlideMove(attackSpeed, 1))
                        {
                            this.SlideMoveEnd();
                            if (!this.InAreaCheck(new Point(this.position.X - this.UnionRebirth(this.union), this.position.Y)))
                            {
                                this.attackProcess = 0;
                                this.waittime      = 0;
                                this.effecting     = false;
                                this.end           = true;
                            }
                        }
                        break;
                    }
                    break;

                case TortoiseMan.ATTACK.QuakePress:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeQuake(this.waittime);
                        if (this.waittime == this.aspeed * 4)
                        {
                            this.counterTiming = false;
                            this.sound.PlaySE(SoundEffect.quake);
                            this.ShakeStart(1, this.aspeed * 12 * this.speed);
                            for (int index = 0; index < Math.Min(2 + version / 2, 4); ++index)
                            {
                                Point point = this.RandomPanel(this.UnionEnemy);
                                this.parent.attacks.Add(new FallStone(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 1, 20 * index, this.element));
                            }
                        }
                        if (this.waittime == this.aspeed * 8)
                        {
                            this.animationpoint = new Point(0, 0);
                            this.waittime       = 0;
                            this.Motion         = NaviBase.MOTION.neutral;
                        }
                        break;
                    }
                    break;

                case TortoiseMan.ATTACK.MadWave:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                    }
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeWave(this.waittime);
                        if (this.waittime == this.aspeed * 4)
                        {
                            this.sound.PlaySE(SoundEffect.knock);
                        }
                        if (this.waittime == this.aspeed * 10)
                        {
                            this.sound.PlaySE(SoundEffect.knock);
                        }
                        if (this.waittime == this.aspeed * 12)
                        {
                            this.counterTiming = false;
                            this.waveX         = Eriabash.SteelX(this, this.parent);
                            this.waveY         = 1;
                            this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.waveX, this.waveY - 1, this.union, new Point(1, 2), this.aspeed * 8 * this.speed, true));
                        }
                        if (this.waittime == this.aspeed * 17)
                        {
                            this.ShakeStart(1, this.aspeed * 8 * this.speed);
                        }
                        if (this.waittime == this.aspeed * 19)
                        {
                            this.sound.PlaySE(SoundEffect.wave);
                            this.parent.attacks.Add(new MadWave(this.sound, this.parent, this.waveX, this.waveY, this.union, this.Power, 6, this.element));
                        }
                        if (this.waittime == this.aspeed * 23)
                        {
                            if (this.metalcube[0].flag)
                            {
                                this.metalcube[0].Break();
                            }
                            if (this.metalcube[1].flag)
                            {
                                this.metalcube[1].Break();
                            }
                            this.MoveRandom(false, false, this.union, true);
                            this.sound.PlaySE(SoundEffect.enterenemy);
                            Point positionre = this.positionre;
                            this.metalcube[0] = new Rock(this.sound, this.parent, positionre.X, positionre.Y, this.union);
                            this.parent.objects.Add(this.metalcube[0]);
                            this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, positionre.X, positionre.Y));
                            this.MoveRandom(false, false, this.UnionEnemy, true);
                            positionre        = this.positionre;
                            this.metalcube[1] = new Rock(this.sound, this.parent, positionre.X, positionre.Y, this.union);
                            this.parent.objects.Add(this.metalcube[1]);
                            this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, positionre.X, positionre.Y));
                            this.positionre = this.position;
                        }
                        if (this.waittime == this.aspeed * 27)
                        {
                            this.animationpoint = new Point(0, 0);
                            this.waittime       = 0;
                            this.Motion         = NaviBase.MOTION.neutral;
                        }
                        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.guard       = CharacterBase.GUARD.none;
                    this.ready       = false;
                    this.Noslip      = 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(2, 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();
        }
Beispiel #7
0
        protected override void Moving()
        {
            this.neutlal = this.motion == Lanster.MOTION.neutral;
            if (this.moveflame)
            {
                this.positionre = this.position;
                switch (this.motion)
                {
                case Lanster.MOTION.neutral:
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeNeutral(this.frame);
                        if (this.frame >= 7)
                        {
                            this.frame = 0;
                            ++this.roopneutral;
                        }
                        if (this.roopneutral >= 2 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            if (this.parent.panel[this.position.X + this.UnionRebirth, this.position.Y].color == this.UnionEnemy || this.HeviSand)
                            {
                                if (this.EnemySearch(this.position.Y) && !this.badstatus[4])
                                {
                                    this.speed /= 2;
                                    ++this.attackroop;
                                    this.motion        = Lanster.MOTION.attack;
                                    this.counterTiming = true;
                                }
                                else
                                {
                                    this.Xmove  = false;
                                    this.motion = Lanster.MOTION.move;
                                }
                            }
                            else
                            {
                                this.Xmove  = true;
                                this.motion = Lanster.MOTION.move;
                            }
                        }
                        break;
                    }
                    break;

                case Lanster.MOTION.move:
                    if (this.Xmove)
                    {
                        this.positionre = new Point(this.position.X + this.UnionRebirth, this.position.Y);
                        if (this.Canmove(this.positionre, this.number, this.union))
                        {
                            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;
                        }
                        else
                        {
                            this.positionre = this.position;
                            this.Xmove      = false;
                        }
                    }
                    if (!this.Xmove)
                    {
                        bool flag = false;
                        if (this.EnemySearch(this.position.Y - 2) && !flag)
                        {
                            this.positionre = new Point(this.position.X, this.position.Y - 1);
                            if (this.Canmove(this.positionre, this.number, this.union))
                            {
                                flag = true;
                                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;
                            }
                            else
                            {
                                this.positionre = this.position;
                            }
                        }
                        if (this.EnemySearch(this.position.Y - 1) && !flag)
                        {
                            this.positionre = new Point(this.position.X, this.position.Y - 1);
                            if (this.Canmove(this.positionre, this.number, this.union))
                            {
                                flag = true;
                                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;
                            }
                            else
                            {
                                this.positionre = this.position;
                            }
                        }
                        if (this.EnemySearch(this.position.Y + 1) && !flag)
                        {
                            this.positionre = new Point(this.position.X, this.position.Y + 1);
                            if (this.Canmove(this.positionre, this.number, this.union))
                            {
                                flag = true;
                                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;
                            }
                            else
                            {
                                this.positionre = this.position;
                            }
                        }
                        if (this.EnemySearch(this.position.Y + 2) && !flag)
                        {
                            this.positionre = new Point(this.position.X, this.position.Y + 1);
                            if (this.Canmove(this.positionre, this.number, this.union))
                            {
                                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;
                            }
                            else
                            {
                                this.positionre = this.position;
                            }
                        }
                    }
                    this.motion = Lanster.MOTION.neutral;
                    break;

                case Lanster.MOTION.attack:
                    this.animationpoint.X = this.AnimeAttack(this.frame).X;
                    if (this.frame == 4 + this.Attackinterval())
                    {
                        this.counterTiming = false;
                        this.sound.PlaySE(SoundEffect.lance);
                        this.parent.attacks.Add(new LanceAttack(this.sound, this.parent, this.position.X + this.UnionRebirth, this.position.Y, this.union, this.Power, this.speed, this.element, false));
                    }
                    if (this.frame >= 18 + this.Attackinterval())
                    {
                        this.plusX  = 0;
                        this.speed  = this.nspeed;
                        this.motion = Lanster.MOTION.neutral;
                        this.frame  = 0;
                        if (this.attackroop >= 3 && !this.bash)
                        {
                            int pX = Eriabash.SteelX(this, this.parent);
                            if (pX != 99 && pX > 0 && pX < 5)
                            {
                                for (int pY = 0; pY < this.parent.panel.GetLength(1); ++pY)
                                {
                                    this.parent.attacks.Add(new EriaSteel(this.sound, this.parent, pX, pY, this.union, 10, this.element));
                                }
                            }
                            if (!this.bash && this.version > 0)
                            {
                                this.bash = true;
                            }
                            this.attackroop = 0;
                            if (this.version == 0)
                            {
                                this.MoveRandom(false, false);
                                this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                                this.position = this.positionre;
                                this.PositionDirectSet();
                            }
                        }
                        break;
                    }
                    break;
                }
            }
            if (this.motion == Lanster.MOTION.attack && (this.frame >= 3 + this.Attackinterval() && this.frame <= 6 + this.Attackinterval()))
            {
                this.plusX += 3 * (this.version > 0 ? version : 5) * this.UnionRebirth;
                switch (this.union)
                {
                case Panel.COLOR.red:
                    if (this.plusX > 20)
                    {
                        this.plusX = 20;
                        break;
                    }
                    break;

                case Panel.COLOR.blue:
                    if (this.plusX < -20)
                    {
                        this.plusX = -20;
                        break;
                    }
                    break;
                }
            }
            this.FlameControl();
            this.MoveAftar();
        }
Beispiel #8
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();
        }