Exemplo n.º 1
0
 private void SuzuWmake()
 {
     if (this.suzu[0] == null)
     {
         this.MoveRandom(false, false);
         Point positionre = this.positionre;
         this.positionre = this.position;
         this.parent.panel[positionre.X, positionre.Y].State = Panel.PANEL._grass;
         this.sound.PlaySE(SoundEffect.enterenemy);
         this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, positionre.X, positionre.Y));
         this.suzu[0] = new SuzuranWhite(this.sound, this.parent, positionre.X, positionre.Y, this.union, 10 * version, 180);
         this.parent.objects.Add(this.suzu[0]);
     }
     else
     {
         if (this.suzu[0].flag)
         {
             return;
         }
         this.MoveRandom(false, false);
         Point positionre = this.positionre;
         this.positionre = this.position;
         this.parent.panel[positionre.X, positionre.Y].State = Panel.PANEL._grass;
         this.sound.PlaySE(SoundEffect.enterenemy);
         this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, positionre.X, positionre.Y));
         ObjectBase objectBase = new SuzuranWhite(this.sound, this.parent, positionre.X, positionre.Y, this.union, 10 * version, 180);
         objectBase.Hp = 10 * version;
         this.suzu[0]  = objectBase;
         this.parent.objects.Add(this.suzu[0]);
     }
 }
Exemplo n.º 2
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            Point point = new Point(character.position.X + this.UnionRebirth(character.union), character.position.Y);

            this.sound.PlaySE(SoundEffect.enterenemy);
            battle.effects.Add(new MoveEnemy(this.sound, battle, point.X, point.Y));
            if (character.InAreaCheck(point) && character.NoObject(point) && !battle.panel[point.X, point.Y].Hole)
            {
                ObjectBase objectBase = new SuzuranWhite(this.sound, battle, character.position.X + this.UnionRebirth(character.union), character.position.Y, character.union, 100, 0);
                if (character is Player && ((Player)character).addonSkill[67])
                {
                    objectBase.HPset(objectBase.Hp * 2);
                }
                battle.objects.Add(objectBase);
            }
            base.Action(character, battle);
        }
Exemplo n.º 3
0
        protected override void Moving()
        {
            this.neutlal = this.motion == Rieber.MOTION.neutral;
            if (this.moveflame)
            {
                this.animationpoint.X = this.frame % 4;
                this.positionre       = this.position;
                switch (this.motion)
                {
                case Rieber.MOTION.neutral:
                    if (this.frame == (this.inelea ? 10 : 20) / 2 && !this.badstatus[4] && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                    {
                        this.counterTiming = false;
                    }
                    if (this.frame >= (this.inelea ? 10 : 20) && !this.badstatus[4] && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                    {
                        if (this.attacked)
                        {
                            this.frame         = 0;
                            this.counterTiming = false;
                            this.motion        = Rieber.MOTION.move;
                        }
                        else
                        {
                            this.frame         = 0;
                            this.motion        = Rieber.MOTION.attack;
                            this.counterTiming = true;
                            this.attacked      = true;
                        }
                        break;
                    }
                    break;

                case Rieber.MOTION.attack:
                    if (this.version == 0)
                    {
                        if (this.inelea)
                        {
                            for (int seed = 0; seed < 9; ++seed)
                            {
                                this.MoveRandom(false, false, this.union, seed);
                                this.parent.attacks.Add(new SandHoleAttack(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 45, 4, SandHoleAttack.MOTION.init, this.element));
                            }
                        }
                        else
                        {
                            this.dammy.flag = false;
                            for (int seed = 0; seed < 4; ++seed)
                            {
                                this.MoveRandom(false, false, this.UnionEnemy, seed);
                                this.parent.attacks.Add(new SandHoleAttack(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 45, 4, SandHoleAttack.MOTION.init, this.element, true));
                            }
                        }
                    }
                    else if (this.inelea)
                    {
                        this.MoveRandom(false, false, this.union, false);
                        this.parent.attacks.Add(new SandHoleAttack(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 300, Math.Min(version - 1, 3), SandHoleAttack.MOTION.init, this.element));
                    }
                    else
                    {
                        this.dammy.flag = false;
                        var maxPits     = Math.Min(this.version, (byte)4);
                        var enemyPanels = Enumerable.Range(0, 3).SelectMany(y => Enumerable.Range(0, 6).Select(x => this.parent.panel[x, y])).ToArray();
                        var targets     = this.RandomMultiPanel(enemyPanels.Length, this.UnionEnemy).Where(p => !this.parent.panel[p.X, p.Y].Hole).Take(maxPits);
                        foreach (var point in targets)
                        {
                            this.positionre = point;
                            this.parent.attacks.Add(new SandHoleAttack(this.sound, this.parent, point.X, point.Y, this.union, this.Power, 30, Math.Min(version - 1, 3), SandHoleAttack.MOTION.init, this.element, true));
                        }
                    }
                    this.going      = this.positionre;
                    this.positionre = this.position;
                    this.frame      = 0;
                    this.motion     = Rieber.MOTION.neutral;
                    break;

                case Rieber.MOTION.move:
                    if (this.Canmove(this.going, this.number, this.inelea ? this.union : this.UnionEnemy))
                    {
                        bool flag = false;
                        foreach (AttackBase attack in this.parent.attacks)
                        {
                            if (attack.position == this.going && attack is SandHoleAttack)
                            {
                                flag = true;
                            }
                        }
                        if (flag)
                        {
                            this.DammySet();
                            this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y));
                            if (this.version > 0)
                            {
                                this.parent.attacks.RemoveAll(a =>
                                {
                                    if (a is SandHoleAttack)
                                    {
                                        return(a.position == this.position);
                                    }
                                    return(false);
                                });
                                this.parent.attacks.Add(new SandHoleAttack(this.sound, this.parent, this.position.X, this.position.Y, this.union, !this.badstatus[1] ? this.power : this.power / 2, 20, Math.Min(version - 1, 3), SandHoleAttack.MOTION.set, this.element));
                            }
                            this.position       = this.going;
                            this.positionre     = this.going;
                            this.positionDirect = new Vector2((float)(position.X * 40.0 + 14.0), (float)(position.Y * 24.0 + 70.0));
                        }
                    }
                    if (this.version == 0)
                    {
                        this.print = false;
                        if (this.inelea)
                        {
                            if (this.suzuran != null)
                            {
                                if (!this.suzuran.flag)
                                {
                                    Point point = this.RandomPanel(this.union);
                                    this.sound.PlaySE(SoundEffect.enterenemy);
                                    this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, point.X, point.Y));
                                    this.suzuran = new SuzuranWhite(this.sound, this.parent, point.X, point.Y, this.union, 10, 120);
                                    this.parent.objects.Add(suzuran);
                                }
                            }
                            else
                            {
                                Point point = this.RandomPanel(this.union);
                                this.sound.PlaySE(SoundEffect.enterenemy);
                                this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, point.X, point.Y));
                                this.suzuran = new SuzuranWhite(this.sound, this.parent, point.X, point.Y, this.union, 10, 120);
                                this.parent.objects.Add(suzuran);
                            }
                        }
                    }
                    this.inelea   = !this.inelea;
                    this.attacked = false;
                    this.frame    = 0;
                    this.motion   = Rieber.MOTION.neutral;
                    break;
                }
            }
            this.MoveAftar();
            this.FlameControl();
        }