Exemplo n.º 1
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            int num = 3;

            if (this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                if (character.waittime / num <= 46)
                {
                    this.animePoint = this.Animation(character.waittime / num);
                }
                if (character.waittime % num == 0)
                {
                    switch (character.waittime / num)
                    {
                    case 1:
                        character.animationpoint.X = -1;
                        this.sound.PlaySE(SoundEffect.warp);
                        break;

                    case 15:
                        this.sound.PlaySE(SoundEffect.thunder);
                        AttackBase a1 = new BombAttack(this.sound, battle, character.position.X + character.UnionRebirth, character.position.Y, character.union, this.Power(character), 1, 1, ChipBase.ELEMENT.eleki);
                        a1.badstatus[3]     = true;
                        a1.badstatustime[3] = 180;
                        a1.invincibility    = false;
                        battle.attacks.Add(this.Paralyze(a1));
                        break;

                    case 17:
                        this.sound.PlaySE(SoundEffect.thunder);
                        break;

                    case 25:
                        this.sound.PlaySE(SoundEffect.quake);
                        this.ShakeStart(1, 80);
                        AttackBase a2 = new WaveAttsck(this.sound, battle, character.position.X + character.UnionRebirth, character.position.Y, character.union, this.Power(character), 3, 0, this.element);
                        a2.invincibility = false;
                        battle.attacks.Add(this.Paralyze(a2));
                        AttackBase a3 = new WaveAttsck(this.sound, battle, character.position.X + character.UnionRebirth, character.position.Y - 1, character.union, this.Power(character), 3, 0, this.element);
                        a3.invincibility = false;
                        battle.attacks.Add(this.Paralyze(a3));
                        AttackBase a4 = new WaveAttsck(this.sound, battle, character.position.X + character.UnionRebirth, character.position.Y + 1, character.union, this.Power(character), 3, 0, this.element);
                        a4.invincibility = false;
                        battle.attacks.Add(this.Paralyze(a4));
                        break;

                    case 46:
                        this.animePoint.X = -1;
                        battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
                        break;
                    }
                }
            }
            if (character.waittime / num <= 46 || !this.BlackOutEnd(character, battle))
            {
                return;
            }
            base.Action(character, battle);
        }
Exemplo n.º 2
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.rockon)
            {
                int index = 0;
                while (index < 3)
                {
                    bool flag = true;
                    foreach (CharacterBase characterBase in battle.AllChara())
                    {
                        if (characterBase.union == character.UnionEnemy)
                        {
                            flag = false;
                            this.target[index] = characterBase.position;
                            ++index;
                            if (index >= 3)
                            {
                                break;
                            }
                        }
                    }
                    if (flag)
                    {
                        break;
                    }
                }
                this.rockon = true;
            }
            character.animationpoint = ChainGunX.Animation(character.waittime);
            if (character.waittime == 24)
            {
                base.Action(character, battle);
            }
            if (character.waittime % 8 == 0)
            {
                this.sound.PlaySE(SoundEffect.vulcan);
            }
            if (character.waittime % 8 != 4)
            {
                return;
            }
            int        num        = this.power + this.pluspower;
            Point      point      = this.target[this.shot];
            BombAttack bombAttack = new BombAttack(this.sound, battle, point.X, point.Y, character.union, this.Power(character), 1, ChipBase.ELEMENT.normal);

            if (this.shot < 2)
            {
                bombAttack.invincibility = false;
            }
            battle.attacks.Add(this.Paralyze(bombAttack));
            battle.effects.Add(new GunHit(this.sound, battle, point.X, point.Y, character.union));
            battle.effects.Add(new BulletShells(this.sound, battle, character.position, character.positionDirect.X + 4 * character.UnionRebirth, character.positionDirect.Y, 26, character.union, 20 + this.Random.Next(20), 2, 0));
            ++this.shot;
        }
Exemplo n.º 3
0
 // Use this for initialization
 protected override void Start()
 {
     currentLife     = totalLife;
     _mainCharacter  = FindObjectOfType <Player>();
     _attackSphere   = Resources.Load("BombAttack", typeof(BombAttack)) as BombAttack;
     _feedbackTarget = Resources.Load("TargetedHexagon", typeof(GameObject)) as GameObject;
     _timerAttack    = attackSpeed;
     _observers      = new List <IObserver>();
     GameController.instance.AddUpdateble(this);
     Subscribe(CanvasController.instance);
 }
 public List <CellOutcome> visit(BombAttack bombAttack)
 {
     for (int i = 2; i < 15; i += 5)
     {
         for (int j = 2; j < 15; j += 5)
         {
             outcomes.AddRange(bombAttack.Attack(i, j, cells, ships));
         }
     }
     return(outcomes);
 }
Exemplo n.º 5
0
    public override void Detonate(AttackButtons attackToPerform)
    {
        //Ignore the attackToPerform, and just pick a random attack to instantiate
        int attackIndex = Random.Range(0, attackPrefabs.Length);

        //Execute attack
        GameObject thisPrefab = Instantiate(attackPrefabs[attackIndex], transform.position, new Quaternion()) as GameObject;
        BombAttack thisAttack = thisPrefab.GetComponent <BombAttack>();

        thisAttack.owningPlayer = owningPlayer;
        thisAttack.FireBurst();

        //Stop moving the bomb
        physics.velocity = Vector3.zero;

        GameObject shockwave = Instantiate(shockwavePrefab, transform.position, new Quaternion()) as GameObject;

        Destroy(shockwave, 5f);
        Destroy(gameObject);
    }
Exemplo n.º 6
0
 public override void Updata()
 {
     if (this.attack && !this.attacked)
     {
         foreach (CharacterBase characterBase in this.parent.AllChara())
         {
             if (characterBase.union == this.attakedunion)
             {
                 Point        position     = characterBase.position;
                 CrackThunder crackThunder = new CrackThunder(this.sound, this.parent, position.X, position.Y, this.union, this.power, false)
                 {
                     effectMode = true
                 };
                 this.parent.attacks.Add(crackThunder);
                 this.attacked  = true;
                 this.nohit     = true;
                 this.effecting = true;
             }
         }
         BombAttack bombAttack = new BombAttack(this.sound, this.parent, this.attakedunion == Panel.COLOR.blue ? 0 : 5, 0, this.attakedunion == Panel.COLOR.blue ? Panel.COLOR.red : Panel.COLOR.blue, this.power, 1, ChipBase.ELEMENT.eleki)
         {
             hitrange      = new Point(6, 3),
             breaking      = true,
             breakinvi     = true,
             throughObject = true
         };
         this.parent.attacks.Add(bombAttack);
         this.noslip = true;
     }
     if (this.attacked)
     {
         this.FlameControl(2);
         if (this.frame >= 15)
         {
             this.flag = false;
         }
     }
     base.Updata();
 }
Exemplo n.º 7
0
 public override void Action(CharacterBase character, SceneBattle battle)
 {
     if (character.waittime <= 1)
     {
         character.animationpoint = new Point(0, 1);
     }
     else if (character.waittime <= 7)
     {
         character.animationpoint = new Point((character.waittime - 1) / 2, 1);
     }
     else if (character.waittime < 15)
     {
         character.animationpoint = new Point(3, 1);
     }
     else if (character.waittime == 15)
     {
         this.sound.PlaySE(SoundEffect.docking);
         battle.effects.Add(new ScreenFlash(this.sound, battle, character.positionDirect, character.position, this.element, 1, false));
         BombAttack bombAttack = new BombAttack(this.sound, character.parent, character.union == Panel.COLOR.red ? 0 : 5, 0, character.union, this.Power(character), 1, 1, new Point(5, 3), this.element);
         bombAttack.badstatus[3]     = true;
         bombAttack.badstatustime[3] = 300;
         bombAttack.bright           = false;
         bombAttack.effect           = true;
         bombAttack.panelChange      = false;
         bombAttack.canCounter       = false;
         bombAttack.invincibility    = true;
         bombAttack.knock            = false;
         bombAttack.breaking         = true;
         character.parent.attacks.Add(bombAttack);
     }
     else
     {
         if (character.waittime < 31)
         {
             return;
         }
         base.Action(character, battle);
     }
 }
Exemplo n.º 8
0
 public override void Action(CharacterBase character, SceneBattle battle)
 {
     if (character.waittime <= 1)
     {
         character.animationpoint = new Point(0, 1);
     }
     else if (character.waittime <= 7)
     {
         character.animationpoint = new Point((character.waittime - 1) / 2, 1);
     }
     else if (character.waittime < 15)
     {
         character.animationpoint = new Point(3, 1);
     }
     else if (character.waittime == 15)
     {
         BombAttack bombAttack = new BombAttack(this.sound, character.parent, character.union == Panel.COLOR.red ? 0 : 5, 0, character.union, 0, 1, 1, new Point(5, 3), this.element);
         bombAttack.badstatus[(int)this.element]     = true;
         bombAttack.badstatustime[(int)this.element] = 600;
         bombAttack.bright        = false;
         bombAttack.effect        = true;
         bombAttack.panelChange   = false;
         bombAttack.canCounter    = false;
         bombAttack.invincibility = false;
         bombAttack.knock         = false;
         character.parent.attacks.Add(bombAttack);
     }
     else
     {
         if (character.waittime < 31)
         {
             return;
         }
         base.Action(character, battle);
     }
 }
Exemplo n.º 9
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (character.waittime < 102)
            {
                this.animePoint = this.Animation(character.waittime);
            }
            switch (character.waittime)
            {
            case 1:
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.shotwave);
                Tower tower = new Tower(this.sound, battle, character.position.X, character.position.Y, character.union, 0, -1, ChipBase.ELEMENT.aqua);
                tower.hitting = false;
                battle.attacks.Add(tower);
                break;

            case 28:
                this.sound.PlaySE(SoundEffect.warp);
                this.sword = 1;
                break;

            case 66:
                this.sword = 2;
                break;

            case 70:
                this.sword = 3;
                break;

            case 74:
                this.sword = 4;
                this.sound.PlaySE(SoundEffect.bombmiddle);
                this.ShakeStart(2, 20);
                BombAttack bombAttack1 = new BombAttack(this.sound, character.parent, character.position.X + this.UnionRebirth(character.union), character.position.Y, character.union, this.Power(character), 1, this.element);
                bombAttack1.StandPanel.Crack();
                bombAttack1.StandPanel.Crack();
                bombAttack1.breaking = true;
                character.parent.effects.Add(new Bomber(this.sound, character.parent, bombAttack1.position.X, bombAttack1.position.Y, Bomber.BOMBERTYPE.bomber, 2));
                character.parent.attacks.Add(this.Paralyze(bombAttack1));
                BombAttack bombAttack2 = new BombAttack(this.sound, character.parent, character.position.X + 2 * this.UnionRebirth(character.union), character.position.Y, character.union, this.Power(character), 1, this.element);
                bombAttack2.StandPanel.Crack();
                bombAttack2.StandPanel.Crack();
                bombAttack2.breaking = true;
                character.parent.effects.Add(new Bomber(this.sound, character.parent, bombAttack2.position.X, bombAttack2.position.Y, Bomber.BOMBERTYPE.bomber, 2));
                character.parent.attacks.Add(this.Paralyze(bombAttack2));
                BombAttack bombAttack3 = new BombAttack(this.sound, character.parent, character.position.X + 3 * this.UnionRebirth(character.union), character.position.Y, character.union, this.Power(character), 1, this.element);
                bombAttack3.StandPanel.Crack();
                bombAttack3.StandPanel.Crack();
                bombAttack3.breaking = true;
                character.parent.effects.Add(new Bomber(this.sound, character.parent, bombAttack3.position.X, bombAttack3.position.Y, Bomber.BOMBERTYPE.bomber, 2));
                character.parent.attacks.Add(this.Paralyze(bombAttack3));
                break;

            case 128:
                this.animePoint.X = -1;
                this.sword        = 0;
                battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
                break;
            }
            if (character.waittime > 152 && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }
Exemplo n.º 10
0
 private void Awake()
 {
     bombSoundManager = GetComponent <BombSoundManager>();
     bombAttack       = GetComponent <BombAttack>();
 }
Exemplo n.º 11
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.animationpoint = this.AnimeNeutral(this.waittime);
                    if (this.waittime >= 8 / version || this.atack)
                    {
                        this.waittime = 0;
                        ++this.roopneutral;
                        if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            if (this.roopmove > this.moveroop && !this.badstatus[4])
                            {
                                this.roopmove = this.version > 0 ? this.Random.Next(-1, this.moveroop + 1) : 0;
                                ++this.atackroop;
                                this.speed = 1;
                                if (!this.atack)
                                {
                                    //int index = this.Random.Next(this.version > 0 ? 3 : 1);
                                    int randMax = 4;

                                    /*
                                     * if (this.Hp <= this.HpMax / 2) {
                                     *  randMax = 5;
                                     * }*/
                                    int index = this.Random.Next(randMax);

                                    //if (index == 5) { index = 4; }

                                    /*
                                     * if (index != 4)
                                     * {
                                     *  this.attack = (Flandre.ATTACK)index;
                                     * }
                                     * else
                                     * {
                                     *  this.attack = Flandre.ATTACK.earthBreaker;
                                     * }*/
                                    this.attack = (Flandre.ATTACK)index;
                                    //this.attack = Flandre.ATTACK.laevateinn;
                                    this.powerPlus = this.powers[index];
                                }
                                this.waittime      = 0;
                                this.Motion        = NaviBase.MOTION.attack;
                                this.counterTiming = true;
                                knifeTrue          = 0;
                                knifeNum           = Math.Max(version - 1, 3);
                                //Point[] knifePos = new Point[knifeNum];
                            }
                            else
                            {
                                this.waittime = 0;
                                if (this.atack)
                                {
                                    this.roopmove = this.moveroop + 1;
                                }
                                this.Motion = NaviBase.MOTION.move;
                            }
                        }
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.attack:
                if (this.moveflame)
                {
                    ++this.waittime;
                    if (this.moveflame)
                    {
                        switch (this.attack)
                        {
                        case Flandre.ATTACK.flanGear:
                            this.animationpoint = this.AnimeSpark(this.waittime);
                            int gearNum = 1;
                            //if (version > 1) { gearNum = 2; }
                            for (int gearA = 0; gearA < gearNum; gearA++)
                            {
                                switch (this.waittime)
                                {
                                case 2:
                                    this.MoveRandom(false, false, this.union == Panel.COLOR.red ? Panel.COLOR.blue : Panel.COLOR.red, 0);
                                    Point point1 = this.positionre;
                                    this.positionre = this.position;
                                    knifeX[0]       = point1.X;
                                    knifeY[0]       = point1.Y;
                                    int gTime = 60 + 22;
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y, this.union, new Point(), gTime, true));
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X - 1, point1.Y, this.union, new Point(), gTime, true));
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X + 1, point1.Y, this.union, new Point(), gTime, true));
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y - 1, this.union, new Point(), gTime, true));
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y + 1, this.union, new Point(), gTime, true));

                                    break;

                                case 34:
                                    this.counterTiming = false;
                                    //this.sound.PlaySE(SoundEffect.beam);
                                    //Point point1 = this.RandomTarget();

                                    //this.parent.attacks.Add(new Beam(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 2, false));
                                    this.parent.attacks.Add(new FlanGear(this.sound, this.parent, knifeX[0], knifeY[0], this.union, this.Power, 0));
                                    break;

                                case 64:
                                    this.roopneutral = 0;
                                    this.Motion      = NaviBase.MOTION.neutral;
                                    if (!this.atack)
                                    {
                                        this.speed = this.nspeed;
                                        break;
                                    }
                                    break;
                                }
                            }
                            if (this.waittime != 24)
                            {
                                break;
                            }
                            break;

                        case Flandre.ATTACK.randomSword:
                            this.animationpoint = this.AnimeBomb(this.waittime);
                            //KnifeAttack[] knifeArr = new KnifeAttack[3];
                            //int knifeTrue = 0;

                            int knifeNum = Math.Max(version - 1, 3);
                            //Point[] knifePos = new Point[knifeNum];
                            //int[] knifeX = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                            //int[] knifeY = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

                            switch (this.waittime)
                            {
                            case 1:
                                //this.counterTiming = false;
                                //this.sound.PlaySE(SoundEffect.throw_);
                                Point point1 = this.RandomTarget();
                                knifeX[0] = point1.X;
                                knifeY[0] = point1.Y;
                                this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y, this.union, new Point(), 30, true));
                                knifeTrue += 1;

                                this.RandomTarget();
                                Vector2 v = new Vector2(this.positionDirect.X + 8 * this.UnionRebirth(this.union), this.positionDirect.Y - 8f);
                                //KnifeAttack[] knifeArr = new KnifeAttack[3];
                                for (int seed = 1; seed < knifeNum; ++seed)
                                {
                                    this.MoveRandom(false, false, this.union == Panel.COLOR.red ? Panel.COLOR.blue : Panel.COLOR.red, seed);
                                    Point positionre = this.positionre;
                                    knifeX[seed] = this.positionre.X;
                                    knifeY[seed] = this.positionre.Y;
                                    //knifePos[knifeTrue] = this.positionre;
                                    //this.parent.attacks.Add(new ClossBomb(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 1, v, positionre, 40, ClossBomb.TYPE.closs, false, ClossBomb.TYPE.big, false, false));

                                    //this.sound.PlaySE(SoundEffect.sword);

                                    /*
                                     * KnifeAttack knifeAttack = new KnifeAttack(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 2, this.element, false)
                                     * {
                                     *  invincibility = false
                                     * };
                                     * knifeArr[knifeTrue] = knifeAttack;*/
                                    knifeTrue += 1;
                                    this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, new Point(), 30, true));
                                    //this.parent.attacks.Add(knifeAttack);
                                }
                                this.positionre = this.position;
                                break;

                            case 36:
                                //this.sound.PlaySE(SoundEffect.sword);
                                this.counterTiming = false;
                                for (int sva = 0; sva < knifeTrue; sva++)
                                {
                                    this.sound.PlaySE(SoundEffect.sword);
                                    KnifeAttack knifeAttack = new KnifeAttack(this.sound, this.parent, knifeX[sva], knifeY[sva], this.union, this.Power, 2, ChipBase.ELEMENT.heat, false)
                                    {
                                        invincibility = false
                                    };
                                    this.parent.attacks.Add(knifeAttack);
                                }
                                break;

                            case 46:
                                this.roopneutral = 0;
                                this.Motion      = NaviBase.MOTION.neutral;
                                if (!this.atack)
                                {
                                    this.speed = this.nspeed;
                                    break;
                                }
                                break;
                            }
                            break;

                        case Flandre.ATTACK.bunshin:
                            this.animationpoint = this.bunshin(this.waittime);

                            switch (this.waittime)
                            {
                            case 1:

                                //this.sound.PlaySE(SoundEffect.charge); // need to change this to use a different SE than Earth Breaker, playtest issue
                                //this.speed = this.attackspeed;
                                break;

                            case 4:
                                this.counterTiming = true;
                                break;

                            case 20:
                                this.counterTiming = false;
                                this.sound.PlaySE(SoundEffect.enterenemy);
                                this.MoveRandom(false, false);
                                Point posRef = this.positionre;
                                this.positionre = this.position;
                                //this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, posRef.X, posRef.Y));
                                flanBunshin bunshinAttack = new flanBunshin(this.sound, this.parent, posRef.X, posRef.Y, this.union, this.Power);

                                this.parent.attacks.Add(bunshinAttack);

                                this.roopneutral = 0;
                                this.Motion      = NaviBase.MOTION.neutral;
                                if (!this.atack)
                                {
                                    this.speed = this.nspeed;
                                    break;
                                }
                                break;
                            }
                            break;

                        case Flandre.ATTACK.laevateinn:
                            switch (this.waittime)
                            {
                            case 1:
                                this.counterTiming    = false;
                                this.animationpoint.X = -1;
                                this.levStart[0]      = new flanLev(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, this.speed);
                                //this.levStart = levStart;
                                this.parent.attacks.Add(levStart[0]);

                                break;

                            case 17:
                                this.MoveRandom(true, true);

                                this.Shadow();
                                this.positionReserved = this.position;
                                this.position         = this.positionre;
                                this.PositionDirectSet();

                                levStart[0].position = this.position;
                                break;

                            case 26:
                                flanLevF levEnd = new flanLevF(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, this.speed);

                                this.parent.attacks.Add(levEnd);
                                break;

                            case 40:

                                this.roopneutral = 0;
                                this.Motion      = NaviBase.MOTION.neutral;
                                if (!this.atack)
                                {
                                    this.speed = this.nspeed;
                                    break;
                                }

                                break;
                            }
                            break;

                        case Flandre.ATTACK.earthBreaker:
                            this.animationpoint = this.AnimeMissile(this.waittime);
                            //this.animationpoint.X = this.AnimeSlash4(this.frame).X;
                            switch (this.waittime)
                            {
                            case 1:
                                this.counterTiming = false;
                                //this.chargeanime = 0;
                                this.sound.PlaySE(SoundEffect.charge);
                                this.speed = this.attackspeed;
                                //this.chargeEffect = 1;
                                break;

                            case 20:
                                this.counterTiming = true;
                                this.sound.PlaySE(SoundEffect.chargemax);
                                //this.chargeEffect = 2;

                                break;

                            case 35:
                                this.speed = this.nspeed;
                                //this.chargeEffect = 0;
                                this.preX             = this.position.X;
                                this.positionReserved = this.position;
                                this.position.X       = this.TargetX(this, this.parent);
                                if (this.position.X < 0)
                                {
                                    this.position.X = 0;
                                }
                                if (this.position.X > 5)
                                {
                                    this.position.X = 5;
                                }

                                this.PositionDirectSet();
                                break;

                            case 38:
                                //this.effecting = true;
                                //this.Shadow();

                                /*
                                 * int x = this.union == Panel.COLOR.blue ? 2 : 3;
                                 * if (!this.HeviSand)
                                 *  this.position = new Point(x, 1);
                                 * this.PositionDirectSet();*/



                                break;

                            case 45:
                                this.counterTiming = false;
                                this.speed         = this.attackspeed;
                                this.sound.PlaySE(SoundEffect.bombmiddle);
                                base.ShakeStart(2, 16);
                                for (int j = 0; j < 3; j++)
                                {
                                    AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + (1 + 0) * base.UnionRebirth(this.union), j, this.union, this.Power * 2, 4, this.element);
                                    //AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + (1 + 0) * base.UnionRebirth(this.union), j, this.union, this.Power * 2, 1, 1, new Point(), this.element);

                                    attackBase.breaking = true;
                                    this.parent.attacks.Add(attackBase);
                                    //BombAttack bombAttack = new BombAttack(this.sound, this.parent, this.position.X + (1 + index) * this.UnionRebirth(this.union), pY, this.union, this.Power, 1, 1, new Point(), ChipBase.ELEMENT.normal);

                                    if (!this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].OnCharaCheck())
                                    {
                                        this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].Break();
                                    }
                                    else
                                    {
                                        this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].Crack();
                                    }


                                    attackBase.invincibility = true;

                                    //this.parent.attacks.Add(base.Paralyze(attackBase));
                                    this.parent.effects.Add(new Shock(this.sound, this.parent, attackBase.position.X, attackBase.position.Y, 2, Panel.COLOR.red));
                                }
                                break;

                            case 50:
                                this.roopneutral      = 0;
                                this.Motion           = NaviBase.MOTION.neutral;
                                this.positionReserved = null;
                                this.position.X       = this.preX;
                                this.PositionDirectSet();
                                if (!this.atack)
                                {
                                    this.speed = this.nspeed;
                                    break;
                                }
                                break;
                            }
                            break;
                        }
                    }
                    break;
                }
                break;

            case NaviBase.MOTION.move:
                this.animationpoint = this.AnimeMove(this.waittime);
                if (this.moveflame)
                {
                    switch (this.waittime)
                    {
                    case 0:
                        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 3:
                        this.positionReserved = null;
                        this.position         = this.positionre;
                        this.PositionDirectSet();
                        break;

                    case 5:
                        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.NockMotion();
                    this.counterTiming = false;
                    this.effecting     = false;
                    this.PositionDirectSet();
                    break;

                case 3:
                    this.NockMotion();
                    break;

                case 15:
                    this.animationpoint = new Point(20, 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.FlameControl();
            this.MoveAftar();
        }
Exemplo n.º 12
0
 public void Initialize(BombAttack owner, SO_BombAttackStats stats)
 {
     _Owner     = owner;
     _BombStats = stats;
 }
Exemplo n.º 13
0
        protected override void Moving()
        {
            this.neutlal = this.motion == Riveradar.MOTION.neutral;
            switch (this.motion)
            {
            case Riveradar.MOTION.neutral:
                if (this.moveflame)
                {
                    for (int index = 0; index < this.target.Count; ++index)
                    {
                        if (this.target[index].ManualFrame < 2)
                        {
                            ++this.target[index].ManualFrame;
                            if (this.target[index].ManualFrame == 2)
                            {
                                this.sound.PlaySE(SoundEffect.search);
                            }
                        }
                    }
                    this.animationpoint = this.AnimeNeutral(this.frame);
                    if (this.frame >= 6)
                    {
                        if (this.target.Count < this.manytarget)
                        {
                            var newTarget       = this.RandomPanel(this.UnionEnemy);
                            var newTargetEffect = new RiveradarCrosshair(this.sound, this.parent, newTarget.X, newTarget.Y, this.picturename, this.version);
                            this.target.Add(newTargetEffect);
                            this.parent.effects.Add(newTargetEffect);
                        }
                        this.frame = 0;
                        ++this.roopneutral;
                        if (this.roopneutral >= 2 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            if (this.target.Count == this.manytarget && this.target[this.manytarget - 1].ManualFrame >= 2 && !this.badstatus[4])
                            {
                                this.speed         = 4;
                                this.motion        = Riveradar.MOTION.attackStart;
                                this.counterTiming = true;
                            }
                            else
                            {
                                this.motion = Riveradar.MOTION.move;
                            }
                        }
                    }
                    break;
                }
                break;

            case Riveradar.MOTION.move:
                ++this.roopmove;
                this.motion = Riveradar.MOTION.neutral;
                this.MoveRandom(false, false);
                if (this.position == this.positionre)
                {
                    this.motion      = Riveradar.MOTION.neutral;
                    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 Riveradar.MOTION.attackStart:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeMove(this.frame);
                    if (this.frame >= 2)
                    {
                        this.counterTiming = false;
                        this.motion        = Riveradar.MOTION.attack;
                        this.frame         = 0;
                    }
                    break;
                }
                break;

            case Riveradar.MOTION.attack:
                this.animationpoint.X = this.attackanimation ? 8 : 7;
                if (this.moveflame)
                {
                    this.attackanimation = !this.attackanimation;
                    if (this.attackanimation)
                    {
                        this.sound.PlaySE(SoundEffect.vulcan);
                        List <AttackBase> attacks = this.parent.attacks;
                        IAudioEngine      sound1  = this.sound;
                        SceneBattle       parent1 = this.parent;
                        Point             point   = this.target[0].position;
                        int x1 = point.X;
                        point = this.target[0].position;
                        int        y1         = point.Y;
                        int        union1     = (int)this.union;
                        int        power      = this.Power;
                        int        speed      = this.speed;
                        int        element    = (int)this.element;
                        BombAttack bombAttack = new BombAttack(sound1, parent1, x1, y1, (Panel.COLOR)union1, power, speed, (ChipBase.ELEMENT)element);
                        attacks.Add(bombAttack);
                        List <EffectBase> effects = this.parent.effects;
                        IAudioEngine      sound2  = this.sound;
                        SceneBattle       parent2 = this.parent;
                        point = this.target[0].position;
                        int x2 = point.X;
                        point = this.target[0].position;
                        int    y2     = point.Y;
                        int    union2 = (int)this.union;
                        GunHit gunHit = new GunHit(sound2, parent2, x2, y2, (Panel.COLOR)union2);
                        effects.Add(gunHit);
                        this.parent.effects.Add(new BulletShells(this.sound, this.parent, this.position, this.positionDirect.X - 8 * this.UnionRebirth, this.positionDirect.Y - 24f, 32, this.union, 20 + this.Random.Next(20), 2, 0));
                        this.target[0].flag = false;
                        this.target.RemoveAt(0);
                    }
                    if (this.target.Count <= 0 && !this.attackanimation)
                    {
                        foreach (var crosshair in this.target)
                        {
                            crosshair.ManualFrame = 0;
                        }
                        this.frame       = 0;
                        this.roopmove    = 0;
                        this.roopneutral = 0;
                        this.speed       = this.nspeed;
                        this.motion      = Riveradar.MOTION.attackEnd;
                    }
                    break;
                }
                break;

            case Riveradar.MOTION.attackEnd:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeMoveEND(this.frame);
                    if (this.frame >= 2)
                    {
                        this.motion = Riveradar.MOTION.neutral;
                        this.frame  = 0;
                        this.speed  = this.nspeed;
                    }
                    break;
                }
                break;
            }
            this.FlameControl();
            this.MoveAftar();
        }
Exemplo n.º 14
0
        protected override void Moving()
        {
            this.neutlal         = this.motion == Ikary.MOTION.neutral;
            this.shadow.position = this.position;
            this.shadow.PositionDirectSet(this.position);
            switch (this.motion)
            {
            case Ikary.MOTION.neutral:
                this.z += this.zSpeed[this.zCount] * (!this.zdown ? -1 : 1);
                ++this.zCount;
                if (this.zCount >= this.zSpeed.Length)
                {
                    this.zCount = 0;
                    this.zdown  = !this.zdown;
                    if (!this.zdown)
                    {
                        ++this.roop;
                    }
                }
                this.nohit = this.z <= -40;
                this.frame = 0;
                this.MoveAftar();
                break;

            case Ikary.MOTION.attack:
                if (this.effecting && !this.nohit)
                {
                    this.AttackMake(this.Power, 0, 0);
                    break;
                }
                break;
            }
            if (this.moveflame)
            {
                this.positionre = this.position;
                switch (this.motion)
                {
                case Ikary.MOTION.neutral:
                    if ((this.roop > 3 || this.version == 0) && !this.badstatus[4] && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                    {
                        this.counterTiming = false;
                        this.frame         = 0;
                        this.motion        = Ikary.MOTION.attack;
                        this.effecting     = true;
                        this.nohit         = true;
                        this.z             = -32;
                        this.height        = 128;
                        this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                        this.position = this.RandomTarget();
                        this.PositionDirectSet();
                        this.animationpoint.X = 1;
                        break;
                    }
                    break;

                case Ikary.MOTION.attack:
                    this.animationpoint.X = this.AnimeAttack(this.frame).X;
                    int sp = 4;
                    switch (this.frame)
                    {
                    case 12:
                        this.nohit = false;
                        this.Sound.PlaySE(SoundEffect.clincher);
                        this.counterTiming = true;
                        this.parent.effects.Add(new Water(this.sound, this.parent, this.position.X, this.position.Y, sp));
                        BombAttack bombAttack = new BombAttack(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, 1, this.element);
                        bombAttack.breaking = true;
                        this.parent.attacks.Add(bombAttack);
                        if (!this.StandPanel.Hole)
                        {
                            this.ShakeStart(5, 30);
                            if (this.version > 1 || this.version == 0)
                            {
                                this.parent.effects.Add(new Water(this.sound, this.parent, this.position.X, this.position.Y - 1, sp));
                                this.parent.attacks.Add(new BombAttack(this.sound, this.parent, this.position.X, this.position.Y - 1, this.union, this.Power, 1, this.element));
                                this.parent.effects.Add(new Water(this.sound, this.parent, this.position.X, this.position.Y + 1, sp));
                                this.parent.attacks.Add(new BombAttack(this.sound, this.parent, this.position.X, this.position.Y + 1, this.union, this.Power, 1, this.element));
                            }
                            if (this.version > 2 || this.version == 0)
                            {
                                this.parent.effects.Add(new Water(this.sound, this.parent, this.position.X + 1, this.position.Y, sp));
                                this.parent.attacks.Add(new BombAttack(this.sound, this.parent, this.position.X + 1, this.position.Y, this.union, this.Power, 1, this.element));
                                this.parent.effects.Add(new Water(this.sound, this.parent, this.position.X - 1, this.position.Y, sp));
                                this.parent.attacks.Add(new BombAttack(this.sound, this.parent, this.position.X - 1, this.position.Y, this.union, this.Power, 1, this.element));
                            }
                        }
                        this.StandPanel.Crack();
                        break;

                    case 20:
                        this.counterTiming = false;
                        break;

                    case 25:
                        if (this.version == 0)
                        {
                            this.counterTiming = false;
                            this.frame         = 0;
                            this.motion        = Ikary.MOTION.attack;
                            this.effecting     = true;
                            this.nohit         = true;
                            this.z             = -32;
                            this.height        = 128;
                            this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                            this.position = this.RandomTarget();
                            this.PositionDirectSet();
                            this.animationpoint.X = 1;
                            break;
                        }
                        break;

                    case 40:
                        this.motion           = Ikary.MOTION.neutral;
                        this.frame            = 0;
                        this.effecting        = false;
                        this.nohit            = false;
                        this.z                = 0;
                        this.height           = 56;
                        this.roop             = 0;
                        this.animationpoint.X = 0;
                        this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                        this.MoveRandom(false, false, this.union, false);
                        this.position = this.positionre;
                        this.PositionDirectSet();
                        break;
                    }
                    break;
                }
            }
            this.FlameControl();
        }
Exemplo n.º 15
0
        protected override void Moving()
        {
            this.neutlal = this.motion == BakeBake.MOTION.neutral;

            switch (this.motion)
            {
            case BakeBake.MOTION.neutral:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeNeutral(this.frame);
                    if (this.frame >= 4)
                    {
                        this.frame = 0;
                        ++this.roopneutral;
                        if (this.roopneutral >= this.moveroop && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            this.nohit       = true;
                            this.attackflag  = !this.badstatus[4];
                            this.speed      /= 2;
                            this.motion      = BakeBake.MOTION.move;
                        }
                    }
                    break;
                }
                break;

            case BakeBake.MOTION.move:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeMove(this.frame);
                    if (this.frame == 4)
                    {
                        if (this.attackflag && this.parent.nowscene != SceneBattle.BATTLESCENE.end && !this.HeviSand)
                        {
                            Point point = this.RandomTarget();
                            this.positionre    = point;
                            this.positionre.X -= this.UnionRebirth;
                            if (!this.NoObject(new Point(point.X - this.UnionRebirth, point.Y), this.number))
                            {
                                this.MoveRandom(true, false);
                            }
                        }
                        else
                        {
                            this.MoveRandom(false, false);
                        }
                        this.position = this.positionre;
                        this.PositionDirectSet();
                    }
                    if (this.frame == 8)
                    {
                        this.frame = 0;
                        this.nohit = false;
                        if (this.attackflag)
                        {
                            this.effecting = true;
                            this.sound.PlaySE(SoundEffect.bound);
                            this.motion        = BakeBake.MOTION.attack;
                            this.counterTiming = true;
                        }
                        else
                        {
                            this.motion = BakeBake.MOTION.neutral;
                            this.speed  = this.nspeed;
                        }
                    }
                    break;
                }
                break;

            case BakeBake.MOTION.attack:
                this.animationpoint = this.AnimeAttack(this.frame);
                if (this.moveflame)
                {
                    if (this.frame == 3)
                    {
                        AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + this.UnionRebirth, this.position.Y, this.union, this.Power, 2, 0, this.element);
                        attackBase.badstatus[4]     = true;
                        attackBase.badstatustime[4] = 300;
                        this.parent.attacks.Add(attackBase);
                    }
                    if (this.frame == 7)
                    {
                        this.nohit         = true;
                        this.attackflag    = false;
                        this.counterTiming = false;
                        this.effecting     = false;
                        this.frame         = 0;
                        this.motion        = BakeBake.MOTION.move;
                    }
                    break;
                }
                break;
            }
            if (this.effecting && !this.nohit)
            {
                this.AttackMake(this.Power, 0, 0);
            }
            this.FlameControl();
            this.MoveAftar();
        }
Exemplo n.º 16
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (this.moveflame)
            {
                switch (this.scene)
                {
                case 0:
                    switch (this.frame)
                    {
                    case 1:
                        for (int index = 0; index < this.drillY.Length; ++index)
                        {
                            this.drillY[index] = index;
                        }
                        this.drillY = ((IEnumerable <int>) this.drillY).OrderBy <int, Guid>(i => Guid.NewGuid()).ToArray <int>();
                        character.animationpoint.X = -1;
                        this.sound.PlaySE(SoundEffect.warp);
                        break;

                    case 20:
                        this.sound.PlaySE(SoundEffect.drill1);
                        battle.objects.Add(new MetalDorill(this.sound, battle, character.union == Panel.COLOR.red ? 0 : 5, this.drillY[0], this.Power(character), true, 5, character.union));
                        break;

                    case 35:
                        this.sound.PlaySE(SoundEffect.drill1);
                        battle.objects.Add(new MetalDorill(this.sound, battle, character.union == Panel.COLOR.red ? 0 : 5, this.drillY[1], this.Power(character), true, 5, character.union));
                        break;

                    case 50:
                        this.sound.PlaySE(SoundEffect.drill1);
                        battle.objects.Add(new MetalDorill(this.sound, battle, character.union == Panel.COLOR.red ? 0 : 5, this.drillY[2], this.Power(character), true, 5, character.union));
                        break;

                    case 100:
                        this.frame = 0;
                        ++this.scene;
                        break;
                    }
                    break;

                case 1:
                    switch (this.frame)
                    {
                    case 1:
                        this.posis    = this.GetRandamPanel(this.manyDorills, character.UnionEnemy, true, character, true);
                        this.posis[0] = this.RandomTarget(character, battle);
                        for (int index = 0; index < this.manyDorills; ++index)
                        {
                            battle.attacks.Add(new Dummy(this.sound, battle, this.posis[index].X, this.posis[index].Y, character.union, new Point(), 30, true));
                        }
                        break;

                    case 30:
                        this.sound.PlaySE(SoundEffect.drill1);
                        this.sound.PlaySE(SoundEffect.breakObject);
                        this.ShakeStart(8, 4);
                        for (int index = 0; index < this.manyDorills; ++index)
                        {
                            battle.effects.Add(new UPDrill(this.sound, battle, this.posis[index].X, this.posis[index].Y));
                            AttackBase a = new BombAttack(this.sound, battle, this.posis[index].X, this.posis[index].Y, character.union, this.Power(character), 1, this.element);
                            a.breaking = true;
                            battle.attacks.Add(this.Paralyze(a));
                            a.StandPanel.Crack();
                            a.StandPanel.Crack();
                        }
                        break;

                    case 60:
                        ++this.scene;
                        this.frame = 0;
                        break;
                    }
                    break;

                case 2:
                    this.animePoint = this.Animation(this.frame);
                    switch (this.frame)
                    {
                    case 1:
                        this.posis = this.GetRandamPanel(this.manyDorills, character.UnionEnemy, true, character, true);
                        for (int index = 0; index < this.manyDorills; ++index)
                        {
                            battle.attacks.Add(new Dummy(this.sound, battle, this.posis[index].X, this.posis[index].Y, character.union, new Point(), 30, true));
                        }
                        break;

                    case 32:
                        for (int index = 0; index < this.manyDorills; ++index)
                        {
                            AttackBase a = new CrackThunder(this.sound, character.parent, this.posis[index].X, this.posis[index].Y, character.union, this.Power(character), false);
                            character.parent.attacks.Add(this.Paralyze(a));
                        }
                        break;

                    case 64:
                        character.parent.effects.Add(new MoveEnemy(this.sound, character.parent, character.position.X, character.position.Y));
                        break;
                    }
                    if (this.frame > 64 && this.BlackOutEnd(character, battle))
                    {
                        base.Action(character, battle);
                        break;
                    }
                    break;
                }
            }
            this.FlameControl(1);
        }
Exemplo n.º 17
0
 public override void Initialize(PowerupManager owner)
 {
     base.Initialize(owner);
     _BombAttack = _Owner.GetComponent <BombAttack>();
 }
Exemplo n.º 18
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            ++this.chargeanime;
            if (this.moveflame)
            {
                switch (this.nowmotion)
                {
                case 0:
                    switch (this.frame)
                    {
                    case 1:
                        this.xPosition              = character.positionDirect;
                        character.positionDirect.X -= 8 * this.UnionRebirth(character.union);
                        character.positionDirect.Y -= 8f;
                        this.xPosition.X           += 48 * this.UnionRebirth(character.union);
                        this.xPosition.Y           += 8f;
                        this.sound.PlaySE(SoundEffect.warp);
                        this.animePoint   = new Point();
                        this.chargeEffect = 0;
                        break;

                    case 5:
                        this.sound.PlaySE(SoundEffect.charge);
                        this.chargeEffect = 1;
                        break;

                    case 30:
                        this.chargeEffect = 2;
                        break;

                    case 55:
                        this.chargeEffect = 0;
                        ++this.nowmotion;
                        this.frame = 0;
                        int num = 18;
                        while (this.positions.Count < num)
                        {
                            for (int x = 0; x < battle.panel.GetLength(0); ++x)
                            {
                                for (int y = 0; y < battle.panel.GetLength(1); ++y)
                                {
                                    if (battle.panel[x, y].color == character.UnionEnemy)
                                    {
                                        this.positions.Add(new Point(x, y));
                                        this.positions2.Add(new Point(x, y));
                                    }
                                }
                            }
                        }
                        this.positions2 = this.positions2.OrderBy <Point, Guid>(i => Guid.NewGuid()).ToList <Point>();
                        this.positions  = this.positions.OrderBy <Point, Guid>(i => Guid.NewGuid()).ToList <Point>();
                        break;
                    }
                    break;

                case 1:
                    int waitflame = this.frame % 6;
                    character.animationpoint = this.AnimeBuster(waitflame % 3);
                    this.animePoint.X        = !this.swing ? this.AnimeSlash2(waitflame).X : this.AnimeSlash1(waitflame).X;
                    switch (waitflame)
                    {
                    case 0:
                        if (this.attackCount >= 24)
                        {
                            ++this.nowmotion;
                            this.frame = 0;
                            break;
                        }
                        this.sound.PlaySE(SoundEffect.damageenemy);
                        battle.effects.Add(new NormalChargehit(this.sound, battle, this.positions[this.count1].X, this.positions[this.count1].Y, 2));
                        ++this.count1;
                        if (this.count1 >= this.positions.Count)
                        {
                            this.count1 = 0;
                        }
                        this.swing = !this.swing;
                        new BombAttack(this.sound, character.parent, character.union == Panel.COLOR.red ? 0 : 5, 0, character.union, 0, 1, 1, new Point(5, 3), this.element)
                        {
                            bright = false
                        }.invincibility = false;
                        break;

                    case 3:
                        this.sound.PlaySE(SoundEffect.sword);
                        this.sound.PlaySE(SoundEffect.damageenemy);
                        battle.effects.Add(new NormalChargehit(this.sound, battle, this.positions[this.count1].X, this.positions[this.count1].Y, 3));
                        ++this.count1;
                        if (this.count1 >= this.positions.Count)
                        {
                            this.count1 = 0;
                        }
                        AttackBase attackBase = new SwordAttack(this.sound, battle, this.positions2[this.count2].X, this.positions2[this.count2].Y, character.union, 0, 3, this.element, false, false);
                        attackBase.hitting = false;
                        battle.attacks.Add(attackBase);
                        ++this.count2;
                        if (this.count2 >= this.positions2.Count)
                        {
                            this.count2 = 0;
                        }
                        BombAttack bombAttack = new BombAttack(this.sound, character.parent, character.union == Panel.COLOR.red ? 0 : 5, 0, character.union, this.Power(character), 1, 1, new Point(5, 3), this.element);
                        bombAttack.invincibility = false;
                        bombAttack.bright        = false;
                        if ((uint)this.attacking > 0U)
                        {
                            bombAttack.power = 0;
                        }
                        ++this.attacking;
                        if (this.attacking >= 4)
                        {
                            this.attacking = 0;
                        }
                        ++this.attackCount;
                        battle.attacks.Add(bombAttack);
                        break;
                    }
                    break;

                case 2:
                    switch (this.frame)
                    {
                    case 30:
                        character.animationpoint = new Point();
                        character.PositionDirectSet();
                        this.chargeEffect = -1;
                        this.end          = true;
                        ++this.nowmotion;
                        this.frame = 0;
                        break;
                    }
                    break;
                }
            }
            if (this.end && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
            this.FlameControl(2);
        }
Exemplo n.º 19
0
        protected override void Moving()
        {
            if (!this.godmode && this.Hp <= this.HpMax / 2)
            {
                this.GodMode();
            }
            else
            {
                this.neutlal = this.Motion == NaviBase.MOTION.neutral;
                switch (this.Motion)
                {
                case NaviBase.MOTION.neutral:
                    if (this.moveflame)
                    {
                        this.animationpoint = this.AnimeNeutral(this.waittime % 3);
                        ++this.waittime;
                    }
                    if (this.moveflame && (this.waittime >= 8 / (version == 0 ? 5 : version) || this.atack))
                    {
                        this.waittime = 0;
                        ++this.roopneutral;
                        if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            if (this.roopmove > this.moveroop && !this.badstatus[4])
                            {
                                this.roopmove = this.version > 3 ? this.Random.Next(-1, this.moveroop + 1) : 0;
                                ++this.atackroop;
                                if (!this.atack)
                                {
                                    if (this.hp <= this.hpmax / 2)
                                    {
                                        this.attack    = (Mima.ATTACK) this.pattern2[this.action];
                                        this.powerPlus = this.powers[this.pattern2[this.action]];
                                    }
                                    else
                                    {
                                        this.attack    = (Mima.ATTACK) this.pattern[this.action];
                                        this.powerPlus = this.powers[this.pattern[this.action]];
                                    }
                                    ++this.action;
                                    if (this.action >= this.pattern.Length)
                                    {
                                        this.action = 0;
                                    }
                                    switch (this.attack)
                                    {
                                    case Mima.ATTACK.IllProminence:
                                        this.counterTiming = true;
                                        this.sound.PlaySE(SoundEffect.pikin);
                                        this.speed        = 4;
                                        this.targetPanels = ((IEnumerable <Point>) this.RandomMultiPanel(4, this.UnionEnemy)).ToList <Point>();
                                        for (int index = 0; index < this.targetPanels.Count; ++index)
                                        {
                                            List <AttackBase> attacks = this.parent.attacks;
                                            IAudioEngine      sound   = this.sound;
                                            SceneBattle       parent  = this.parent;
                                            Point             point   = this.targetPanels[index];
                                            int x = point.X;
                                            point = this.targetPanels[index];
                                            int y     = point.Y;
                                            int union = (int)this.union;
                                            point = new Point();
                                            Point hitrange = point;
                                            Dummy dummy    = new Dummy(sound, parent, x, y, (Panel.COLOR)union, hitrange, 25, true);
                                            attacks.Add(dummy);
                                        }
                                        break;

                                    case Mima.ATTACK.DarkWave:
                                        this.sound.PlaySE(SoundEffect.sand);
                                        this.speed = 3;
                                        break;

                                    case Mima.ATTACK.GrandSpear:
                                        this.sound.PlaySE(SoundEffect.quake);
                                        this.ShakeStart(1, 30);
                                        this.speed = 4;
                                        break;

                                    case Mima.ATTACK.SoulFlame:
                                        this.speed = 3;
                                        break;

                                    case Mima.ATTACK.CrescentCharge:
                                        this.speed = 3;
                                        this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.union == Panel.COLOR.blue ? 5 : 0, 1, this.union, new Point(6, 0), 30, true));
                                        break;

                                    case Mima.ATTACK.Reincarnation:
                                        this.sound.PlaySE(SoundEffect.charge);
                                        this.speed = 3;
                                        break;
                                    }
                                    this.attackProcess = 0;
                                }
                                this.waittime = 0;
                                this.Motion   = NaviBase.MOTION.attack;
                            }
                            else
                            {
                                this.speed    = 4;
                                this.waittime = 0;
                                if (this.atack)
                                {
                                    this.roopmove = this.moveroop + 1;
                                }
                                this.Motion = NaviBase.MOTION.move;
                            }
                        }
                        break;
                    }
                    break;

                case NaviBase.MOTION.attack:
                    if (this.moveflame)
                    {
                        ++this.waittime;
                        if (this.moveflame)
                        {
                            switch (this.attack)
                            {
                            case Mima.ATTACK.IllProminence:
                                if (this.attackProcess == 0)
                                {
                                    this.animationpoint = this.AnimeIllProminence1(this.waittime);
                                    switch (this.waittime)
                                    {
                                    case 2:
                                        this.counterTiming = false;
                                        ++this.attackProcess;
                                        this.waittime = 0;
                                        break;
                                    }
                                }
                                else
                                {
                                    this.animationpoint = this.AnimeIllProminence2(this.waittime);
                                    switch (this.waittime)
                                    {
                                    case 3:
                                        this.sound.PlaySE(SoundEffect.bombmiddle);
                                        Point point;
                                        for (int index = 0; index < this.targetPanels.Count; ++index)
                                        {
                                            this.ShakeStart(2, 8);
                                            List <AttackBase> attacks = this.parent.attacks;
                                            IAudioEngine      sound1  = this.sound;
                                            SceneBattle       parent1 = this.parent;
                                            point = this.targetPanels[index];
                                            int x1 = point.X;
                                            point = this.targetPanels[index];
                                            int        y1         = point.Y;
                                            int        union      = (int)this.union;
                                            int        power      = this.Power;
                                            BombAttack bombAttack = new BombAttack(sound1, parent1, x1, y1, (Panel.COLOR)union, power, 1, ChipBase.ELEMENT.poison);
                                            attacks.Add(bombAttack);
                                            List <EffectBase> effects = this.parent.effects;
                                            IAudioEngine      sound2  = this.sound;
                                            SceneBattle       parent2 = this.parent;
                                            point = this.targetPanels[index];
                                            int x2 = point.X;
                                            point = this.targetPanels[index];
                                            int    y2     = point.Y;
                                            Bomber bomber = new Bomber(sound2, parent2, x2, y2, Bomber.BOMBERTYPE.poison, 3);
                                            effects.Add(bomber);
                                        }
                                        if (this.attackProcess < 2)
                                        {
                                            this.targetPanels = ((IEnumerable <Point>) this.RandomMultiPanel(4, this.UnionEnemy)).ToList <Point>();
                                            for (int index = 0; index < this.targetPanels.Count; ++index)
                                            {
                                                List <AttackBase> attacks = this.parent.attacks;
                                                IAudioEngine      sound   = this.sound;
                                                SceneBattle       parent  = this.parent;
                                                point = this.targetPanels[index];
                                                int x = point.X;
                                                point = this.targetPanels[index];
                                                int y     = point.Y;
                                                int union = (int)this.union;
                                                point = new Point();
                                                Point hitrange = point;
                                                Dummy dummy    = new Dummy(sound, parent, x, y, (Panel.COLOR)union, hitrange, 25, true);
                                                attacks.Add(dummy);
                                            }
                                            break;
                                        }
                                        break;

                                    case 8:
                                        if (this.attackProcess >= 2)
                                        {
                                            this.waittime = 0;
                                            this.motion   = NaviBase.MOTION.move;
                                            break;
                                        }
                                        ++this.attackProcess;
                                        this.waittime = 0;
                                        break;
                                    }
                                }
                                break;

                            case Mima.ATTACK.DarkWave:
                                switch (this.attackProcess)
                                {
                                case 0:
                                    this.animationpoint = this.AnimeDarkWave1(this.waittime);
                                    switch (this.waittime)
                                    {
                                    case 1:
                                        this.effecting     = true;
                                        this.positionre    = this.RandomTarget(this.union);
                                        this.positionre.X -= this.UnionRebirth(this.union);
                                        if (!this.NoObject(this.positionre, this.number))
                                        {
                                            this.nohit       = false;
                                            this.Motion      = NaviBase.MOTION.move;
                                            this.frame       = 0;
                                            this.waittime    = 0;
                                            this.roopneutral = 0;
                                            ++this.roopmove;
                                            break;
                                        }
                                        break;

                                    case 6:
                                        this.counterTiming = true;
                                        this.position      = this.positionre;
                                        this.PositionDirectSet();
                                        break;

                                    case 9:
                                        ++this.attackProcess;
                                        this.waittime = 0;
                                        break;
                                    }
                                    break;

                                case 1:
                                    this.animationpoint = this.AnimeDarkWave2(this.waittime);
                                    switch (this.waittime)
                                    {
                                    case 3:
                                        this.counterTiming = false;
                                        this.sound.PlaySE(SoundEffect.wave);
                                        this.parent.effects.Add(new MimaWaveLong(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, 3));
                                        AttackBase attackBase1 = new LanceAttack(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 2, ChipBase.ELEMENT.aqua, false);
                                        attackBase1.invincibility = false;
                                        this.parent.attacks.Add(attackBase1);
                                        break;

                                    case 7:
                                        ++this.attackProcess;
                                        this.waittime = 0;
                                        break;
                                    }
                                    break;

                                case 2:
                                    this.animationpoint = this.AnimeDarkWave3(this.waittime);
                                    switch (this.waittime)
                                    {
                                    case 3:
                                        this.sound.PlaySE(SoundEffect.wave);
                                        this.parent.effects.Add(new MimaWaveDream(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, 3));
                                        AttackBase attackBase2 = new Halberd(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, 2, ChipBase.ELEMENT.aqua, true);
                                        attackBase2.invincibility = false;
                                        this.parent.attacks.Add(attackBase2);
                                        break;

                                    case 6:
                                        this.waittime  = 0;
                                        this.effecting = false;
                                        this.motion    = NaviBase.MOTION.move;
                                        break;
                                    }
                                    break;
                                }
                                break;

                            case Mima.ATTACK.GrandSpear:
                                switch (this.attackProcess)
                                {
                                case 0:
                                    this.animationpoint = this.AnimeMove(this.waittime);
                                    if (this.moveflame)
                                    {
                                        switch (this.waittime)
                                        {
                                        case 1:
                                            this.MoveRandom(true, false);
                                            break;

                                        case 5:
                                            this.counterTiming = true;
                                            this.position      = this.positionre;
                                            this.PositionDirectSet();
                                            break;

                                        case 10:
                                            this.nohit = false;
                                            ++this.attackProcess;
                                            this.waittime = 0;
                                            break;
                                        }
                                        break;
                                    }
                                    break;

                                case 1:
                                    this.animationpoint = this.AnimeGrandSpear(this.waittime);
                                    if (this.moveflame)
                                    {
                                        switch (this.waittime)
                                        {
                                        case 2:
                                            this.counterTiming = false;
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, MimaRockTower.MOTION.init));
                                            break;

                                        case 4:
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 2 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, this.Power, MimaRockTower.MOTION.init));
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 2 * this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, MimaRockTower.MOTION.init));
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 2 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, this.Power, MimaRockTower.MOTION.init));
                                            break;

                                        case 6:
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y - 1, this.union, this.Power, MimaRockTower.MOTION.init));
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, MimaRockTower.MOTION.init));
                                            this.parent.attacks.Add(new MimaRockTower(this.sound, this.parent, this.position.X + 3 * this.UnionRebirth(this.union), this.position.Y + 1, this.union, this.Power, MimaRockTower.MOTION.init));
                                            this.waittime = 0;
                                            this.motion   = NaviBase.MOTION.move;
                                            break;
                                        }
                                        break;
                                    }
                                    break;
                                }
                                break;

                            case Mima.ATTACK.SoulFlame:
                                if (this.position.X != 1)
                                {
                                    this.sound.PlaySE(SoundEffect.dark);
                                    this.parent.attacks.Add(new MimaFrame(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, 2, new Vector2(this.positionDirect.X, this.positionDirect.Y + 16f), ChipBase.ELEMENT.heat, 2));
                                }
                                this.waittime = 0;
                                this.motion   = NaviBase.MOTION.move;
                                break;

                            case Mima.ATTACK.CrescentCharge:
                                if (this.moveflame)
                                {
                                    switch (this.attackProcess)
                                    {
                                    case 0:
                                        if (this.waittime < 5)
                                        {
                                            this.animationpoint = this.AnimeMove(this.waittime);
                                        }
                                        else
                                        {
                                            this.animationpoint.X = -1;
                                        }
                                        this.nohit = true;
                                        switch (this.waittime)
                                        {
                                        case 10:
                                            this.sound.PlaySE(SoundEffect.shoot);
                                            this.mimacharge = new MimaCharge(this.sound, this.parent, this.union == Panel.COLOR.blue ? 5 : 0, 1, this.union, this.Power, 1, this.positionDirect, this.element, 8);
                                            this.parent.attacks.Add(mimacharge);
                                            this.waittime = 0;
                                            ++this.attackProcess;
                                            break;
                                        }
                                        break;

                                    case 1:
                                        this.animationpoint.X = -1;
                                        if (!this.mimacharge.flag)
                                        {
                                            this.waittime = 0;
                                            ++this.attackProcess;
                                            break;
                                        }
                                        break;

                                    case 2:
                                        this.animationpoint = this.AnimeMove(this.waittime + 5);
                                        switch (this.waittime)
                                        {
                                        case 5:
                                            this.nohit            = false;
                                            this.waittime         = 0;
                                            this.motion           = NaviBase.MOTION.neutral;
                                            this.animationpoint.X = 0;
                                            break;
                                        }
                                        break;
                                    }
                                    break;
                                }
                                break;

                            case Mima.ATTACK.Reincarnation:
                                if (this.attackProcess == 1)
                                {
                                    this.counterTiming = true;
                                }
                                switch (this.attackProcess)
                                {
                                case 0:
                                case 1:
                                case 2:
                                    this.animationpoint = this.AnimeReincarnation(this.waittime);
                                    if (this.waittime >= 6)
                                    {
                                        ++this.attackProcess;
                                        this.waittime = 0;
                                        break;
                                    }
                                    break;

                                case 3:
                                    this.counterTiming = false;
                                    this.MoveRandom(true, false);
                                    this.sound.PlaySE(SoundEffect.dark);
                                    this.parent.objects.Add(new MimaNavi(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union));
                                    this.waittime = 0;
                                    this.roopmove = -4;
                                    this.motion   = NaviBase.MOTION.move;
                                    break;
                                }
                                break;
                            }
                        }
                        break;
                    }
                    break;

                case NaviBase.MOTION.move:
                    this.animationpoint = this.AnimeMove(this.waittime);
                    if (this.moveflame)
                    {
                        switch (this.waittime)
                        {
                        case 0:
                            this.MoveRandom(false, false);
                            if (this.position == this.positionre)
                            {
                                this.nohit       = false;
                                this.Motion      = NaviBase.MOTION.neutral;
                                this.frame       = 0;
                                this.roopneutral = 0;
                                ++this.roopmove;
                                break;
                            }
                            break;

                        case 3:
                            this.nohit = true;
                            break;

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

                        case 8:
                            this.nohit = false;
                            break;

                        case 10:
                            this.nohit       = false;
                            this.Motion      = NaviBase.MOTION.neutral;
                            this.speed       = this.nspeed;
                            this.frame       = 0;
                            this.roopneutral = 0;
                            ++this.roopmove;
                            break;
                        }
                        ++this.waittime;
                        break;
                    }
                    break;

                case NaviBase.MOTION.knockback:
                    switch (this.waittime)
                    {
                    case 2:
                        this.NockMotion();
                        this.nohit         = false;
                        this.counterTiming = false;
                        this.effecting     = false;
                        this.PositionDirectSet();
                        break;

                    case 3:
                        this.NockMotion();
                        break;

                    case 15:
                        this.animationpoint = new Point(0, 2);
                        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.nohit)
                {
                    this.AttackMake(this.Power, 0, 0);
                }
                this.FlameControl();
                this.MoveAftar();
            }
        }
Exemplo n.º 20
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            switch (this.motion)
            {
            case MasterStyle.MOTION._0_setup:
                switch (character.waittime)
                {
                case 2:
                    character.animationpoint = new Point(1, 0);
                    break;

                case 4:
                    character.animationpoint = new Point(2, 0);
                    break;

                case 6:
                    character.animationpoint = new Point(3, 0);
                    break;

                case 7:
                    character.animationpoint = new Point(99, 0);
                    break;

                case 10:
                    this.startPosition       = character.position;
                    character.animationpoint = new Point(-1, 0);
                    character.waittime       = 0;
                    this.motion = MasterStyle.MOTION._1_start;
                    for (int index = 0; index < this.tryPosition.Length; ++index)
                    {
                        this.tryPosition[index] = character.positionDirect;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._1_start:
                switch (character.waittime)
                {
                case 1:
                    this.sound.PlaySE(SoundEffect.pikin);
                    break;

                case 30:
                    this.sound.PlaySE(SoundEffect.dark);
                    break;

                case 70:
                    int index1 = 0;
                    while (index1 < 3)
                    {
                        foreach (CharacterBase characterBase in battle.AllChara())
                        {
                            if (!(characterBase is DammyEnemy) && characterBase.union == character.UnionEnemy)
                            {
                                if (index1 + 3 < this.attackPosition.Length)
                                {
                                    this.attackPosition[index1]     = characterBase.position;
                                    this.attackPosition[index1 + 3] = characterBase.position;
                                    ++index1;
                                }
                                else
                                {
                                    break;
                                }
                            }
                        }
                    }
                    this.NextMotion(-1, 0, character);
                    this.atackEndFlame = 28;
                    break;
                }
                if (this.r < 24 && character.waittime > 30)
                {
                    ++this.r;
                    this.angle += 0.05;
                    for (int index2 = 0; index2 < this.tryPosition.Length; ++index2)
                    {
                        this.tryPosition[index2]    = character.positionDirect;
                        this.tryPosition[index2].X += r * (float)Math.Cos(this.angle - 360 * index2);
                        this.tryPosition[index2].Y -= r * (float)Math.Sin(this.angle - 360 * index2);
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._2_LeafFighter:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 3;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    break;

                case 14:
                    this.animePoint.X = 2;
                    break;

                case 16:
                    this.animePoint.X = 3;
                    this.sound.PlaySE(SoundEffect.lance);
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[0].X, this.attackPosition[0].Y, character.union, this.Power(character), 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.leaf;
                    this.attack.hitrange.X = 1;
                    this.attack.breaking   = true;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.NextMotion(1, 1, character);
                        this.atackEndFlame = 26;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._3_ElekiShinobi:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 1;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    this.sound.PlaySE(SoundEffect.sword);
                    this.effectattack         = new SwordAttack(this.sound, battle, this.attackPosition[1].X, this.attackPosition[1].Y, character.union, 0, 3, ChipBase.ELEMENT.eleki, false, false);
                    this.effectattack.hitting = false;
                    this.effectattack.rebirth = this.attackRevers;
                    this.effectattack.PositionDirectSet();
                    battle.attacks.Add(this.effectattack);
                    break;

                case 14:
                    this.animePoint.X = 2;
                    break;

                case 16:
                    this.animePoint.X      = 3;
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[1].X, this.attackPosition[1].Y - 1, character.union, this.Power(character), 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.eleki;
                    this.attack.hitrange.Y = 3;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;

                case 18:
                    this.animePoint.X = 4;
                    break;

                case 20:
                    this.animePoint.X = 5;
                    break;

                case 22:
                    this.animePoint.X = 6;
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.NextMotion(-2, 2, character);
                        this.atackEndFlame = 32;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._4_PoisonWing:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 1;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    this.sound.PlaySE(SoundEffect.shoot);
                    break;

                case 14:
                    this.animePoint.X = 2;
                    break;

                case 16:
                    this.animePoint.X = 3;
                    this.effectattack = new NSAttack.Storm(this.sound, battle, this.attackPosition[2].X, this.attackPosition[2].Y, character.union, this.Power(character) / 4, 4, ChipBase.ELEMENT.poison);
                    battle.attacks.Add(this.effectattack);
                    break;

                case 18:
                    this.animePoint.X = 4;
                    break;

                case 20:
                    this.animePoint.X = 5;
                    break;

                case 22:
                    this.animePoint.X = 6;
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.NextMotion(1, 3, character);
                        this.atackEndFlame = 40;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._5_EarthGaia:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 3;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    break;

                case 14:
                    this.animePoint.X = 2;
                    break;

                case 16:
                    this.animePoint.X = 3;
                    this.sound.PlaySE(SoundEffect.drill2);
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[3].X, this.attackPosition[3].Y, character.union, this.Power(character) / 4, 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.earth;
                    this.attack.hitrange.X = 1;
                    this.attack.breaking   = true;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;

                case 19:
                    ++this.subAnime;
                    break;

                case 22:
                    ++this.subAnime;
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[3].X, this.attackPosition[3].Y, character.union, this.Power(character) / 4, 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.earth;
                    this.attack.hitrange.X = 1;
                    this.attack.breaking   = true;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;

                case 25:
                    this.subAnime = 0;
                    break;

                case 28:
                    ++this.subAnime;
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[3].X, this.attackPosition[3].Y, character.union, this.Power(character) / 4, 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.earth;
                    this.attack.hitrange.X = 1;
                    this.attack.breaking   = true;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;

                case 31:
                    ++this.subAnime;
                    break;

                case 34:
                    ++this.subAnime;
                    this.attack            = new BombAttack(this.sound, battle, this.attackPosition[3].X, this.attackPosition[3].Y, character.union, this.Power(character) / 4, 1, ChipBase.ELEMENT.normal);
                    this.attack.element    = ChipBase.ELEMENT.earth;
                    this.attack.hitrange.X = 1;
                    this.attack.breaking   = true;
                    this.attack.rebirth    = this.attackRevers;
                    battle.attacks.Add(attack);
                    break;

                case 37:
                    this.subAnime = 0;
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.NextMotion(-2, 4, character);
                        this.atackEndFlame = 24;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._6_HeatDoctor:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 6;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    break;

                case 14:
                    this.animePoint.X = 2;
                    this.sound.PlaySE(SoundEffect.chain);
                    this.effectattack = new InjectBullet(this.sound, battle, this.attackPosition[4].X - 2 * (this.attackRevers ? -1 : 1), this.attackPosition[4].Y, character.union, this.Power(character), this.texname[4], ChipBase.ELEMENT.heat);
                    this.effectattack.badstatus[1] = false;
                    this.effectattack.rebirth      = this.attackRevers;
                    battle.attacks.Add(this.effectattack);
                    break;

                case 16:
                    this.animePoint.X = 3;
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.NextMotion(1, 5, character);
                        this.atackEndFlame = 42;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._7_AquaWhith:
                switch (character.waittime)
                {
                case 2:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 3;
                    break;

                case 4:
                    this.animePoint.X = 2;
                    break;

                case 6:
                    this.animePoint.X = 1;
                    break;

                case 8:
                    this.animePoint.X = 0;
                    break;

                case 10:
                    this.animePoint.Y = 6;
                    break;

                case 12:
                    this.animePoint.X = 1;
                    break;

                case 14:
                    this.animePoint.X = 2;
                    break;

                case 16:
                    this.animePoint.X = 3;
                    break;

                case 18:
                    this.animePoint.X = 4;
                    break;

                case 20:
                    this.animePoint.X = 5;
                    break;

                case 22:
                    this.animePoint.X = 6;
                    break;

                case 24:
                    this.sound.PlaySE(SoundEffect.fire);
                    this.effectattack         = new ElementFire(this.sound, battle, this.attackPosition[5].X, this.attackPosition[5].Y, character.union, this.Power(character), ChipBase.ELEMENT.aqua, false, 0);
                    this.effectattack.rebirth = this.attackRevers;
                    this.effectattack.PositionDirectSet();
                    this.effectattack.invincibility = false;
                    battle.attacks.Add(this.effectattack);
                    break;

                case 28:
                    this.sound.PlaySE(SoundEffect.fire);
                    this.effectattack         = new ElementFire(this.sound, battle, this.attackPosition[5].X + (this.attackRevers ? -1 : 1), this.attackPosition[5].Y, character.union, this.Power(character), ChipBase.ELEMENT.aqua, false, 0);
                    this.effectattack.rebirth = this.attackRevers;
                    this.effectattack.PositionDirectSet();
                    this.effectattack.invincibility = false;
                    battle.attacks.Add(this.effectattack);
                    break;

                case 32:
                    this.sound.PlaySE(SoundEffect.fire);
                    this.effectattack         = new ElementFire(this.sound, battle, this.attackPosition[5].X + 2 * (this.attackRevers ? -1 : 1), this.attackPosition[5].Y, character.union, this.Power(character), ChipBase.ELEMENT.aqua, false, 0);
                    this.effectattack.rebirth = this.attackRevers;
                    this.effectattack.PositionDirectSet();
                    this.effectattack.invincibility = false;
                    battle.attacks.Add(this.effectattack);
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 10)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                        ++this.motion;
                        character.waittime = 0;
                        this.atackEndFlame = 180;
                        character.position = this.startPosition;
                    }
                    break;
                }
                break;

            case MasterStyle.MOTION._8_Finish:
                switch (character.waittime)
                {
                case 4:
                    Charge charge1 = new Charge(this.sound, battle, 0, 0);
                    charge1.positionDirect = new Vector2(this.tryPosition[0].X, this.tryPosition[0].Y + 16f);
                    battle.effects.Add(charge1);
                    Charge charge2 = new Charge(this.sound, battle, 0, 0);
                    charge2.positionDirect = new Vector2(this.tryPosition[1].X, this.tryPosition[1].Y + 16f);
                    battle.effects.Add(charge2);
                    Charge charge3 = new Charge(this.sound, battle, 0, 0);
                    charge3.positionDirect = new Vector2(this.tryPosition[2].X, this.tryPosition[2].Y + 16f);
                    battle.effects.Add(charge3);
                    break;

                case 54:
                    this.animePoint.Y = 1;
                    break;

                case 56:
                    this.animePoint.X = 1;
                    break;

                case 58:
                    this.animePoint.X = 2;
                    break;

                case 60:
                    this.animePoint.X = 3;
                    BombAttack bombAttack = new BombAttack(this.sound, battle, character.union == Panel.COLOR.blue ? 5 : 0, 0, character.union, this.Power(character), 1, ChipBase.ELEMENT.normal);
                    bombAttack.hitrange      = new Point(6, 3);
                    bombAttack.breaking      = true;
                    bombAttack.throughObject = true;
                    battle.attacks.Add(bombAttack);
                    this.sound.PlaySE(SoundEffect.bombbig);
                    this.ShakeStart(4, 90);
                    int x = Eriabash.SteelX(character, battle);
                    battle.effects.Add(new RandomBomber(this.sound, battle, Bomber.BOMBERTYPE.flashbomber, 2, new Point(x, 0), new Point(6, 2), character.union, 36));
                    break;

                case 180:
                    this.animePoint.Y = 0;
                    this.animePoint.X = 0;
                    break;
                }
                if (character.waittime >= this.atackEndFlame)
                {
                    if (character.waittime == this.atackEndFlame)
                    {
                        this.animePoint.Y = 0;
                        this.animePoint.X = 0;
                    }
                    else if (character.waittime == this.atackEndFlame + 2)
                    {
                        this.animePoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 4)
                    {
                        this.animePoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 6)
                    {
                        this.animePoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 8)
                    {
                        this.animePoint.X = -1;
                    }
                    else if (character.waittime == this.atackEndFlame + 38)
                    {
                        character.animationpoint.Y = 0;
                        character.animationpoint.X = 3;
                    }
                    else if (character.waittime == this.atackEndFlame + 40)
                    {
                        character.animationpoint.X = 2;
                    }
                    else if (character.waittime == this.atackEndFlame + 42)
                    {
                        character.animationpoint.X = 1;
                    }
                    else if (character.waittime == this.atackEndFlame + 44)
                    {
                        character.animationpoint.X = 0;
                    }
                    else if (character.waittime > this.atackEndFlame + 44 && this.BlackOutEnd(character, battle))
                    {
                        base.Action(character, battle);
                    }
                    break;
                }
                break;
            }
        }
Exemplo n.º 21
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (base.BlackOut(character, battle, this.name, base.Power(character).ToString()))
            {
                if (this.moveflame)
                {
                    switch (this.nowmotion)
                    {
                    case 0:
                    {
                        this.animePoint.X = this.AnimeMove(this.frame).X;
                        int flame = this.frame;
                        switch (flame)
                        {
                        case 1:
                            character.animationpoint.X = -1;
                            this.xPosition             = character.position.X;
                            this.sound.PlaySE(SoundEffect.warp);
                            break;

                        case 2:
                        case 4:
                            break;

                        case 3:
                            if (this.command == 5)
                            {
                                this.xPosition = character.position.X;
                                this.nowmotion++;
                                this.frame = 0;
                            }
                            break;

                        case 5:
                            this.xPosition = this.TargetX(character, battle);

                            //base.UnionRebirth(character.union)

                            int x = character.union == Panel.COLOR.blue ? 2 : 3;
                            this.xPosition = x;
                            this.yPosition = 1;


                            if (this.xPosition < 0)
                            {
                                this.xPosition = 0;
                            }
                            if (this.xPosition > 5)
                            {
                                this.xPosition = 5;
                            }
                            break;

                        default:
                            if (flame == 9)
                            {
                                this.nowmotion++;
                                this.frame = 0;
                            }
                            break;
                        }
                        break;
                    }

                    case 1:
                    {
                        this.animePoint.X = this.AnimeSlash4(this.frame).X;
                        int flame2 = this.frame;
                        if (flame2 != 5)
                        {
                            if (flame2 != 6)
                            {
                                if (flame2 == 10)
                                {
                                    this.nowmotion++;
                                    this.frame = 0;
                                }
                            }
                            else
                            {
                                this.sound.PlaySE(SoundEffect.bombmiddle);
                                base.ShakeStart(2, 16);
                                for (int i = 0; i < 2; i++)
                                {
                                    for (int j = 0; j < 3; j++)
                                    {
                                        AttackBase attackBase = new BombAttack(this.sound, battle, this.xPosition + (1 + i) * base.UnionRebirth(character.union), j, character.union, base.Power(character), 4, this.element);
                                        attackBase.breaking      = true;
                                        attackBase.invincibility = false;
                                        battle.attacks.Add(this.Paralyze(attackBase));
                                        battle.effects.Add(new Shock(this.sound, battle, attackBase.position.X, attackBase.position.Y, 2, Panel.COLOR.red));
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case 2:
                    {
                        int flame3 = this.frame;
                        if (flame3 != 6 && flame3 == 10)
                        {
                            character.parent.effects.Add(new MoveEnemy(this.sound, character.parent, this.xPosition, this.yPosition));
                            this.end = true;
                            this.nowmotion++;
                            this.frame = 0;
                        }
                        break;
                    }
                    }
                }
                if (this.end && base.BlackOutEnd(character, battle))
                {
                    base.Action(character, battle);
                }
                base.FlameControl(2);
            }
        }
Exemplo n.º 22
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();
        }
Exemplo n.º 23
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (this.moveflame && this.nowmotion == 0)
            {
                switch (this.frame)
                {
                case 1:
                    character.animationpoint.X = -1;
                    this.xPosition             = character.position.X;
                    this.sound.PlaySE(SoundEffect.warp);
                    this.animePoint = new Point(2, 0);
                    break;

                case 2:
                    this.animePoint = new Point(1, 0);
                    break;

                case 3:
                    this.animePoint = new Point(0, 0);
                    this.target     = new Point(character.position.X, character.position.Y);
                    this.target.X   = this.TargetX(character, battle) + this.UnionRebirth(character.union);
                    if (this.target.X < 0)
                    {
                        this.target.X = 0;
                    }
                    if (this.target.X > 5)
                    {
                        this.target.X = 5;
                        break;
                    }
                    break;

                case 15:
                    if (!this.nohit)
                    {
                        this.sound.PlaySE(SoundEffect.pikin);
                        battle.effects.Add(new Flash(this.sound, battle, character.positionDirect, character.position));
                        this.animePoint = new Point(0, 4);
                        break;
                    }
                    this.animePoint = new Point(1, 0);
                    break;

                case 18:
                    this.animePoint = this.nohit ? new Point(2, 0) : new Point(1, 4);
                    break;

                case 19:
                    this.animePoint = new Point(-1, 4);
                    if (this.nohit)
                    {
                        this.frame = 79;
                        break;
                    }
                    break;

                case 20:
                    Point posi1 = new Point(this.target.X + this.UnionRebirth(character.union), this.target.Y);
                    if (this.CanAttack(character, posi1))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi1.X, posi1.Y, character.union == Panel.COLOR.red ? 1 : 0);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                        break;
                    }
                    break;

                case 22:
                    Point posi2 = new Point(this.target.X, this.target.Y + 1);
                    if (this.CanAttack(character, posi2))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi2.X, posi2.Y, 3);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                    }
                    posi2 = new Point(this.target.X, this.target.Y - 1);
                    if (this.CanAttack(character, posi2))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi2.X, posi2.Y, 2);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                        break;
                    }
                    break;

                case 24:
                    Point posi3 = new Point(this.target.X - this.UnionRebirth(character.union), this.target.Y + 1);
                    if (this.CanAttack(character, posi3))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi3.X, posi3.Y, character.union == Panel.COLOR.red ? 0 : 1);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                    }
                    posi3 = new Point(this.target.X + this.UnionRebirth(character.union), this.target.Y - 1);
                    if (this.CanAttack(character, posi3))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi3.X, posi3.Y, character.union == Panel.COLOR.red ? 1 : 0);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                        break;
                    }
                    break;

                case 26:
                    Point posi4 = new Point(this.target.X + this.UnionRebirth(character.union), this.target.Y + 1);
                    if (this.CanAttack(character, posi4))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi4.X, posi4.Y, character.union == Panel.COLOR.red ? 1 : 0);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                    }
                    posi4 = new Point(this.target.X - this.UnionRebirth(character.union), this.target.Y - 1);
                    if (this.CanAttack(character, posi4))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi4.X, posi4.Y, character.union == Panel.COLOR.red ? 0 : 1);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                        break;
                    }
                    break;

                case 28:
                    Point posi5 = new Point(this.target.X - this.UnionRebirth(character.union), this.target.Y);
                    if (this.CanAttack(character, posi5))
                    {
                        YoumuShadow youmuShadow = new YoumuShadow(this.sound, battle, posi5.X, posi5.Y, character.union == Panel.COLOR.red ? 0 : 1);
                        this.shadows.Add(youmuShadow);
                        battle.effects.Add(youmuShadow);
                        break;
                    }
                    break;

                case 40:
                    for (int index = 0; index < this.shadows.Count; ++index)
                    {
                        this.shadows[index].jittaika = true;
                    }
                    break;

                case 44:
                    for (int index = 0; index < this.shadows.Count; ++index)
                    {
                        this.sound.PlaySE(SoundEffect.breakObject);
                        this.ShakeStart(4, 4);
                        BombAttack bombAttack = new BombAttack(this.sound, battle, this.target.X, this.target.Y, character.union, this.Power(character), 2, this.element);
                        bombAttack.breakinvi     = true;
                        bombAttack.noElementWeak = true;
                        battle.attacks.Add(this.Paralyze(bombAttack));
                    }
                    if (this.shadows.Count > 0)
                    {
                        battle.effects.Add(new NormalChargehit(this.sound, battle, this.target.X, this.target.Y, 2));
                        break;
                    }
                    break;

                case 80:
                    this.animePoint            = new Point(-1, 0);
                    character.animationpoint.X = 0;
                    this.end = true;
                    break;
                }
            }
            if (this.end && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
            this.FlameControl(2);
        }
Exemplo n.º 24
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;
        }