Пример #1
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();
 }
Пример #2
0
        protected override void Moving()
        {
            this.neutlal = this.motion == Ponpoko.MOTION.neutral;
            switch (this.motion)
            {
            case Ponpoko.MOTION.neutral:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeNeutral(this.frame);
                    if (this.frame >= 7)
                    {
                        this.frame = 0;
                        ++this.roopneutral;
                        if (this.roopmove == this.moveroop - 1 && this.roopneutral == 1)
                        {
                            this.counterTiming = true;
                        }
                        if (this.roopneutral >= 2 && this.parent.nowscene != SceneBattle.BATTLESCENE.end)
                        {
                            this.roopneutral = 0;
                            this.motion      = Ponpoko.MOTION.move;
                        }
                    }
                    break;
                }
                break;

            case Ponpoko.MOTION.move:
                ++this.roopmove;
                this.MoveRandom(false, false);
                if (this.position == this.positionre)
                {
                    this.frame       = 0;
                    this.roopneutral = 0;
                }
                else
                {
                    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;
                }
                if (this.roopmove >= this.moveroop && !this.badstatus[4])
                {
                    this.attackcount = 1;
                    this.speed       = 3;
                    this.sound.PlaySE(SoundEffect.bomb);
                    this.parent.effects.Add(new Smoke(this.sound, this.parent, this.position.X, this.position.Y, ChipBase.ELEMENT.normal));
                    if (this.version == 0)
                    {
                        this.invincibility     = false;
                        this.invincibilitytime = 0;
                        this.MoveRandom(false, false);
                        Point positionre1 = this.positionre;
                        if (positionre1 != this.position)
                        {
                            this.parent.effects.Add(new Smoke(this.sound, this.parent, positionre1.X, positionre1.Y, ChipBase.ELEMENT.normal));
                            this.jizou1 = new Jizou(this.sound, this.parent, positionre1.X, positionre1.Y, this.union, 5, this.Power);
                            this.parent.objects.Add(jizou1);
                            this.jizou1.PositionDirectSet();
                        }
                        this.MoveRandom(false, false);
                        Point positionre2 = this.positionre;
                        if (positionre2 != this.position)
                        {
                            this.parent.effects.Add(new Smoke(this.sound, this.parent, positionre2.X, positionre2.Y, ChipBase.ELEMENT.normal));
                            this.jizou2 = new Jizou(this.sound, this.parent, positionre2.X, positionre2.Y, this.union, 5, this.Power);
                            this.parent.objects.Add(jizou2);
                            this.jizou2.PositionDirectSet();
                        }
                    }
                    else
                    {
                        this.guard = CharacterBase.GUARD.guard;
                    }
                    this.motion        = Ponpoko.MOTION.attack;
                    this.counterTiming = false;
                    break;
                }
                this.motion = Ponpoko.MOTION.neutral;
                break;

            case Ponpoko.MOTION.attack:
                if (this.moveflame)
                {
                    this.animationpoint.X = 7;
                    if (this.frame >= 45)
                    {
                        this.frame       = 0;
                        this.roopmove    = 0;
                        this.roopneutral = 0;
                        this.speed       = this.nspeed;
                        if (this.version == 0)
                        {
                            this.invincibility     = true;
                            this.invincibilitytime = 9999999;
                            if (this.jizou1 != null)
                            {
                                this.jizou1.flag = false;
                            }
                            if (this.jizou2 != null)
                            {
                                this.jizou2.flag = false;
                            }
                        }
                        this.motion = Ponpoko.MOTION.neutral;
                        this.guard  = CharacterBase.GUARD.none;
                    }
                    else if (this.tenbathu)
                    {
                        this.tenbathu = false;
                        this.motion   = Ponpoko.MOTION.attacked;
                        this.frame    = 0;
                        foreach (CharacterBase characterBase in this.parent.AllChara())
                        {
                            if (characterBase.union == this.UnionEnemy)
                            {
                                Point        position     = characterBase.position;
                                CrackThunder crackThunder = new CrackThunder(this.sound, this.parent, position.X, position.Y, this.union, this.Power, false)
                                {
                                    breaking  = true,
                                    breakinvi = true
                                };
                                this.parent.attacks.Add(crackThunder);
                            }
                        }
                    }
                    break;
                }
                break;

            case Ponpoko.MOTION.attacked:
                if (this.moveflame)
                {
                    this.animationpoint = this.AnimeAttack(this.frame % 4);
                    if (this.frame >= 45)
                    {
                        this.frame       = 0;
                        this.roopmove    = 0;
                        this.roopneutral = 0;
                        this.speed       = this.nspeed;
                        this.motion      = Ponpoko.MOTION.neutral;
                        this.guard       = CharacterBase.GUARD.none;
                    }
                    break;
                }
                break;
            }
            this.FlameControl();
            this.MoveAftar();
        }
Пример #3
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);
        }
Пример #4
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            this.animePoint = this.Animation(character.waittime);
            if (character is Player && (character.waittime < 32 && this.command == 0))
            {
                this.CommandInput("LR", (Player)character);
                if (this.CommandCheck("LLR"))
                {
                    this.command = 1;
                    this.sound.PlaySE(SoundEffect.CommandSuccess);
                    this.target[0] = new Point(character.position.X + 2 * this.UnionRebirth(character.union), character.position.Y);
                    this.target[1] = new Point(character.position.X + 3 * this.UnionRebirth(character.union), character.position.Y);
                    this.target[2] = new Point(character.position.X + 4 * this.UnionRebirth(character.union), character.position.Y);
                }
                else if (this.CommandCheck("RRL"))
                {
                    this.command = 2;
                    this.sound.PlaySE(SoundEffect.CommandSuccess);
                    this.target[0] = new Point(character.position.X + 2 * this.UnionRebirth(character.union), character.position.Y - 1);
                    this.target[1] = new Point(character.position.X + 3 * this.UnionRebirth(character.union), character.position.Y);
                    this.target[2] = new Point(character.position.X + 4 * this.UnionRebirth(character.union), character.position.Y - 1);
                    this.target[3] = new Point(character.position.X + 2 * this.UnionRebirth(character.union), character.position.Y + 1);
                    this.target[4] = new Point(character.position.X + 4 * this.UnionRebirth(character.union), character.position.Y + 1);
                }
            }
            switch (character.waittime)
            {
            case 1:
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.warp);
                this.target[0] = new Point(character.position.X + 3, 0);
                this.target[1] = new Point(character.position.X + 3, 1);
                this.target[2] = new Point(character.position.X + 3, 2);
                break;

            case 32:
                AttackBase a1 = new CrackThunder(this.sound, character.parent, this.target[0].X, this.target[0].Y, character.union, this.Power(character), false);
                a1.breakinvi     = true;
                a1.invincibility = false;
                character.parent.attacks.Add(this.Paralyze(a1));
                break;

            case 40:
                if (this.command == 2)
                {
                    AttackBase a2 = new CrackThunder(this.sound, character.parent, this.target[4].X, this.target[4].Y, character.union, this.Power(character), false);
                    a2.breakinvi     = true;
                    a2.invincibility = false;
                    character.parent.attacks.Add(this.Paralyze(a2));
                    break;
                }
                break;

            case 48:
                AttackBase a3 = new CrackThunder(this.sound, character.parent, this.target[1].X, this.target[1].Y, character.union, this.Power(character), false);
                a3.breakinvi     = true;
                a3.invincibility = false;
                character.parent.attacks.Add(this.Paralyze(a3));
                break;

            case 56:
                if (this.command == 2)
                {
                    AttackBase a2 = new CrackThunder(this.sound, character.parent, this.target[3].X, this.target[3].Y, character.union, this.Power(character), false);
                    a2.breakinvi     = true;
                    a2.invincibility = false;
                    character.parent.attacks.Add(this.Paralyze(a2));
                    break;
                }
                break;

            case 64:
                AttackBase a4 = new CrackThunder(this.sound, character.parent, this.target[2].X, this.target[2].Y, character.union, this.Power(character), false);
                a4.breakinvi     = true;
                a4.invincibility = false;
                character.parent.attacks.Add(this.Paralyze(a4));
                break;

            case 84:
                character.parent.effects.Add(new MoveEnemy(this.sound, character.parent, character.position.X, character.position.Y));
                break;
            }
            if (character.waittime > 120 && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }
Пример #5
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            var totalAnimationTime = this.isElemental
                ? AnimationTiming.Select((a, i) => i == AnimationTiming.Length - 1 ? BurstWarning + this.ExtraElementalTime(BurstSpacing * 6 * 3) : a.Delay).Sum()
                : AnimationTiming.Sum(a => a.Delay);

            this.animePoint = this.Animation(character.waittime);
            if (character.waittime == 0)
            {
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.warp);
                this.initialEnemyHPSum = battle.AllChara().Where(c => character.UnionEnemy == c.union).Sum(c => c.Hp);
            }
            else if (character.waittime < AnimationTiming.First().Delay)
            {
                if (Input.IsPress(Button._A) && !this.isElemental)
                {
                    this.isElemental = true;
                    this.sound.PlaySE(SoundEffect.CommandSuccess);
                }
            }
            else if (character.waittime >= AnimationTiming.First().Delay&& character.waittime < totalAnimationTime)
            {
                var burstAttackTime = character.waittime - AnimationTiming.First().Delay;
                this.burstWarnings.ForEach(bw =>
                {
                    if (bw.Item2 == burstAttackTime)
                    {
                        if (this.isElemental)
                        {
                            if (Input.IsPush(Button.Left))
                            {
                                this.element = ELEMENT.aqua;
                            }
                            else if (Input.IsPush(Button.Right))
                            {
                                this.element = ELEMENT.earth;
                            }
                            else if (Input.IsPush(Button.Up))
                            {
                                this.element = ELEMENT.eleki;
                            }
                            else if (Input.IsPush(Button.Down))
                            {
                                this.element = ELEMENT.heat;
                            }
                            else if (Input.IsPush(Button._L))
                            {
                                this.element = ELEMENT.poison;
                            }
                            else if (Input.IsPush(Button._R))
                            {
                                this.element = ELEMENT.leaf;
                            }
                        }

                        var towerAttack = (AttackBase) new Tower(
                            this.sound,
                            character.parent,
                            bw.Item1.X,
                            bw.Item1.Y,
                            character.union,
                            this.Power(character),
                            -1,
                            this.element);
                        switch (this.element)
                        {
                        case ChipBase.ELEMENT.heat:
                            break;

                        case ChipBase.ELEMENT.aqua:
                            break;

                        case ChipBase.ELEMENT.eleki:
                            towerAttack = new CrackThunder(
                                this.sound,
                                character.parent,
                                bw.Item1.X,
                                bw.Item1.Y,
                                character.union,
                                this.Power(character),
                                false);
                            break;

                        case ChipBase.ELEMENT.leaf:
                            break;

                        case ChipBase.ELEMENT.poison:
                            break;

                        case ChipBase.ELEMENT.earth:
                            towerAttack = new SandHoleAttack(
                                this.sound,
                                character.parent,
                                bw.Item1.X,
                                bw.Item1.Y,
                                character.union,
                                this.Power(character),
                                4,
                                0,
                                SandHoleAttack.MOTION.set,
                                ChipBase.ELEMENT.earth);
                            break;
                        }

                        character.parent.attacks.Add(this.Paralyze(towerAttack));
                    }
                });
                var modifiedBurstSpacing = this.isElemental ? this.ExtraElementalTime(BurstSpacing) : BurstSpacing;
                if (burstAttackTime % modifiedBurstSpacing == 0)
                {
                    var columnProgress = (burstAttackTime / modifiedBurstSpacing) % 6;
                    var column         = character.union == Panel.COLOR.red ? columnProgress : (5 - columnProgress);
                    var validRows      = Enumerable.Range(0, 3).Where(r =>
                                                                      !character.parent.panel[column, r].Hole &&
                                                                      !this.burstWarnings.Any(bw => bw.Item1.X == column && bw.Item1.Y == r)).ToArray();
                    var row = validRows.Length > 0 ? validRows[this.Random.Next(0, validRows.Length)] : -1;
                    if (row != -1)
                    {
                        this.burstWarnings.Add(Tuple.Create(new Point(column, row), burstAttackTime + BurstWarning));
                        character.parent.attacks.Add(new Dummy(
                                                         this.sound,
                                                         character.parent,
                                                         column,
                                                         row,
                                                         character.union,
                                                         new Point(0, 0),
                                                         BurstWarning,
                                                         !this.isElemental));
                    }
                }
            }
            else if (character.waittime >= totalAnimationTime && character.waittime < totalAnimationTime + PostAttackDelay)
            {
                this.afterimage = true;

                if (!this.isElemental && this.initialEnemyHPSum != null)
                {
                    var afterBurstEnemyHpSum = battle.AllChara().Where(c => character.UnionEnemy == c.union).Sum(c => c.Hp);
                    var drainedLife          = this.initialEnemyHPSum.Value - afterBurstEnemyHpSum;
                    if (drainedLife > 0)
                    {
                        this.sound.PlaySE(SoundEffect.repair);
                        character.Hp += drainedLife;
                    }

                    this.initialEnemyHPSum = null;
                }
            }
            else if (character.waittime >= totalAnimationTime + PostAttackDelay && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }