コード例 #1
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (character.waittime == 3)
            {
                this.sound.PlaySE(SoundEffect.sword);
            }
            character.animationpoint = CharacterAnimation.SworsAnimation(character.waittime);
            if (character.waittime >= 30)
            {
                base.Action(character, battle);
            }
            if (character.waittime != 10)
            {
                return;
            }
            int  num  = this.power + this.pluspower;
            bool flag = false;

            if (character is Player && ((Player)character).style == Player.STYLE.shinobi)
            {
                flag = true;
            }
            foreach (CharacterBase characterBase in battle.AllChara())
            {
                if (characterBase.union == character.UnionEnemy && (characterBase.guard != CharacterBase.GUARD.none || characterBase.invincibilitytime > 0 || characterBase.nohit || (uint)characterBase.barrierType > 0U))
                {
                    var hpDecrease = this.Power(character);
                    characterBase.Hp -= hpDecrease;
                    this.sound.PlaySE(SoundEffect.damageenemy);
                    characterBase.Dameged(new NSAttack.AttackBase(this.sound, battle, characterBase.position.X, characterBase.position.Y, character.union, hpDecrease, ELEMENT.normal));
                }
            }
        }
コード例 #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;
        }
コード例 #3
0
 public bool BlackOutEnd(CharacterBase character, SceneBattle parent)
 {
     if (true /* prev: if not netbattle */ || this.boEndOK2)
     {
         if (parent.blackOutChips.Count > 1)
         {
             parent.blackOutChips.RemoveAt(0);
             foreach (CharacterBase characterBase in parent.AllChara())
             {
                 if (characterBase.number == parent.blackOutChips[0].userNum)
                 {
                     characterBase.waittime = 0;
                 }
             }
             return(true);
         }
         if (character.animationpoint.X < 0)
         {
             character.animationpoint.X = 0;
             this.nameAlpha             = 0;
         }
         if (parent.backscreen > 0)
         {
             parent.backscreen -= 10;
             if (parent.backscreen < 0)
             {
                 parent.backscreen = 0;
             }
             return(false);
         }
         parent.blackOut        = false;
         parent.blackOutStopper = false;
         parent.blackOutChips.Clear();
         return(true);
     }
     this.boEndOK2 = true;
     return(false);
 }
コード例 #4
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (!this.init)
            {
                List <Point> pointList = new List <Point>();
                foreach (CharacterBase characterBase in battle.AllChara())
                {
                    if (characterBase.union == character.UnionEnemy && (!(characterBase is DammyEnemy) || !characterBase.nohit) && character.InAreaCheck(character.position))
                    {
                        pointList.Add(characterBase.position);
                    }
                }
                this.targets = pointList.ToArray();
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.warp);
                this.init = true;
            }
            if (character.waittime == this.shot * 20 + 20 && this.shot < this.targets.Length)
            {
                this.sound.PlaySE(SoundEffect.chain);
                for (int angle = 0; angle < 4; ++angle)
                {
                    int x = this.targets[this.shot].X;
                    int y = this.targets[this.shot].Y;
                    switch (angle)
                    {
                    case 0:
                        ++y;
                        break;

                    case 1:
                        x += this.UnionRebirth(character.union);
                        break;

                    case 2:
                        --y;
                        break;

                    case 3:
                        x -= this.UnionRebirth(character.union);
                        break;
                    }
                    var knifePos = new Point(x, y);
                    if (character.NoObject(knifePos) && character.InAreaCheck(knifePos))
                    {
                        AttackBase a = new ThrowKnife(this.sound, battle, x, y, character.union, 10, this.Power(character), 6, 30, angle);
                        a.invincibility = false;
                        battle.attacks.Add(this.Paralyze(a));
                    }
                }
                ++this.shot;
            }
            if (this.shot >= this.targets.Length && character.waittime >= this.targets.Length * 20 + 80)
            {
                if (!this.end)
                {
                    this.animePoint.X = -1;
                    battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
                    this.end = true;
                }
                if (this.BlackOutEnd(character, battle))
                {
                    base.Action(character, battle);
                }
            }
            else
            {
                this.animePoint = this.Animation(character.waittime);
            }
        }
コード例 #5
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.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&& character.waittime < AnimationTiming.TakeWhile(a => a.Row == 2 || a.Row == 0).Sum(a => a.Delay))
            {
                var burstAttackTime = character.waittime - AnimationTiming.First().Delay;
                this.burstWarnings.ForEach(bw =>
                {
                    if (bw.Item2 == burstAttackTime)
                    {
                        var burst = this.Paralyze(new Tower(
                                                      this.sound,
                                                      character.parent,
                                                      bw.Item1.X,
                                                      bw.Item1.Y,
                                                      character.union,
                                                      this.Power(character),
                                                      -1,
                                                      ChipBase.ELEMENT.poison));
                        character.parent.attacks.Add(burst);
                    }
                });
                if (burstAttackTime % BurstSpacing == 0)
                {
                    var columnProgress = (burstAttackTime / BurstSpacing) % 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,
                                                         true));
                    }
                }
            }
            else if (character.waittime >= AnimationTiming.TakeWhile(a => a.Row == 2 || a.Row == 0).Sum(a => a.Delay) && character.waittime < AnimationTiming.Sum(a => a.Delay))
            {
                if (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;
                }

                var waveAttackTime = character.waittime - AnimationTiming.TakeWhile(a => a.Row == 2 || a.Row == 0).Sum(a => a.Delay) - AnimationTiming.First().Delay;

                if (waveAttackTime >= WaveAttackDelay)
                {
                    var waveDelay = waveAttackTime - WaveAttackDelay;
                    if (waveDelay / (WaveSpeed * 2) < 6 && waveDelay % (WaveSpeed * 2) == 0)
                    {
                        var waveAttack = new DruidManWave(
                            this.sound,
                            character.parent,
                            character.rebirth ? 5 : 0,
                            character.position.Y,
                            character.union,
                            waveDelay / (WaveSpeed * 2) < 1 ? this.Power(character) / 2 : 0,
                            WaveSpeed,
                            this.element);
                        waveAttack.BadStatusSet(CharacterBase.BADSTATUS.poison, this.poisonPower * 8);
                        character.parent.attacks.Add(this.Paralyze(waveAttack));
                    }
                }
            }
            else if (character.waittime >= AnimationTiming.Sum(a => a.Delay) && character.waittime < AnimationTiming.Sum(a => a.Delay) + PostAttackDelay)
            {
                this.afterimage = true;
            }
            else if (character.waittime >= AnimationTiming.Sum(a => a.Delay) + PostAttackDelay && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }
コード例 #6
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (this.screen == null)
            {
                this.screen = new ScreenBlack(this.sound, battle, new Vector2(), new Point(), this.element, 0, false);
                battle.effects.Add(screen);
                this.position = new Point(character.union == Panel.COLOR.red ? 0 : 5, 2);
                int[] numArray = new int[6];
                foreach (CharacterBase characterBase in battle.AllChara())
                {
                    if (characterBase.union == character.UnionEnemy)
                    {
                        switch (characterBase.element)
                        {
                        case ChipBase.ELEMENT.heat:
                            ++numArray[1];
                            ++numArray[5];
                            break;

                        case ChipBase.ELEMENT.aqua:
                            ++numArray[3];
                            ++numArray[4];
                            break;

                        case ChipBase.ELEMENT.eleki:
                            ++numArray[2];
                            ++numArray[5];
                            break;

                        case ChipBase.ELEMENT.leaf:
                            ++numArray[0];
                            ++numArray[4];
                            break;

                        case ChipBase.ELEMENT.poison:
                            ++numArray[0];
                            ++numArray[3];
                            break;

                        case ChipBase.ELEMENT.earth:
                            ++numArray[1];
                            ++numArray[2];
                            break;
                        }
                    }
                }
                int num = 1;
                for (int index = 0; index < numArray.Length; ++index)
                {
                    if (numArray[index] >= num)
                    {
                        switch (index)
                        {
                        case 0:
                            this.element = ChipBase.ELEMENT.heat;
                            break;

                        case 1:
                            this.element = ChipBase.ELEMENT.aqua;
                            break;

                        case 2:
                            this.element = ChipBase.ELEMENT.leaf;
                            break;

                        case 3:
                            this.element = ChipBase.ELEMENT.eleki;
                            break;

                        case 4:
                            this.element = ChipBase.ELEMENT.poison;
                            break;

                        case 5:
                            this.element = ChipBase.ELEMENT.earth;
                            break;
                        }
                        num = numArray[index];
                    }
                }
            }
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            switch (character.waittime)
            {
            case 1:
                character.animationpoint.X = 1;
                break;

            case 3:
                character.animationpoint.X = 2;
                break;

            case 5:
                character.animationpoint.X = 3;
                break;

            case 7:
                character.animationpoint.X = -1;
                break;
            }
            if (character.waittime % 2 == 0)
            {
                this.eye = !this.eye;
            }
            int num1 = 30;

            if (character.waittime == 44)
            {
                this.sound.PlaySE(SoundEffect.pikin);
            }
            if (character.waittime == 44 + num1)
            {
                battle.effects.Add(new Charge(this.sound, battle, this.position.X, this.position.Y));
            }
            if (character.waittime > 44 + num1 + 50)
            {
                this.open = true;
                this.FlameControl(1);
                if (this.count < 3)
                {
                    if (this.frame > 8)
                    {
                        this.frame = 0;
                        this.sound.PlaySE(SoundEffect.quake);
                        this.ShakeStart(8);
                        Point point = new Point();
                        switch (this.count)
                        {
                        case 0:
                            point.X = character.union == Panel.COLOR.red ? 2 : 4;
                            point.Y = 1;
                            ElementFire elementFire1 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire1));
                            break;

                        case 1:
                            point.X = character.union == Panel.COLOR.red ? 3 : 3;
                            point.Y = 0;
                            ElementFire elementFire2 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire2));
                            point.Y = 1;
                            ElementFire elementFire3 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire3));
                            point.Y = 2;
                            ElementFire elementFire4 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire4));
                            break;

                        default:
                            point.X = character.union == Panel.COLOR.red ? 4 : 2;
                            point.Y = 0;
                            ElementFire elementFire5 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire5));
                            point.Y = 1;
                            ElementFire elementFire6 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire6));
                            point.Y = 2;
                            ElementFire elementFire7 = new ElementFire(this.sound, character.parent, point.X, point.Y, character.union, this.Power(character), 6, this.element, false, 1);
                            battle.attacks.Add(this.Paralyze(elementFire7));
                            break;
                        }
                        ++this.count;
                    }
                }
                else if (this.frame > 60)
                {
                    switch (this.frame)
                    {
                    case 61:
                        this.ShakeEnd();
                        character.animationpoint.X = 3;
                        break;

                    case 63:
                        character.animationpoint.X = 2;
                        break;

                    case 65:
                        character.animationpoint.X = 1;
                        break;

                    case 67:
                        character.animationpoint.X = 0;
                        break;
                    }
                    if (this.frame > 80)
                    {
                        if (!this.screen.end)
                        {
                            this.screen.end = true;
                        }
                        if (this.BlackOutEnd(character, battle))
                        {
                            base.Action(character, battle);
                        }
                    }
                }
            }
        }
コード例 #7
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.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 >= 24 && character.waittime < AnimationTiming.Sum(a => a.Delay))
            {
                var burstAttackTime = character.waittime - 24;
                this.burstWarnings.ForEach(bw =>
                {
                    if (bw.Item2 == burstAttackTime)
                    {
                        var burst = this.Paralyze(new Tower(
                                                      this.sound,
                                                      character.parent,
                                                      bw.Item1.X,
                                                      bw.Item1.Y,
                                                      character.union,
                                                      this.Power(character),
                                                      -1,
                                                      ChipBase.ELEMENT.poison));
                        character.parent.attacks.Add(burst);
                    }
                });
                if (burstAttackTime % BurstSpacing == 0)
                {
                    var columnProgress = (burstAttackTime / BurstSpacing) % 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,
                                                         true));
                    }
                }
            }
            else if (character.waittime >= AnimationTiming.Sum(a => a.Delay))
            {
                this.afterimage = true;

                if (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;
                }
            }
            if (character.waittime > AnimationTiming.Sum(a => a.Delay) + 40 && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }
コード例 #8
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (this.end)
            {
                this.animePoint.X = -1;
                if (this.BlackOutEnd(character, battle))
                {
                    base.Action(character, battle);
                }
            }
            else if (this.moveflame)
            {
                if (this.targetNow < 0)
                {
                    this.animePoint = this.Anime(this.frame);
                    switch (this.frame)
                    {
                    case 1:
                        this.posi = character.position;
                        character.animationpoint.X = -1;
                        if (character.StandPanel.state == Panel.PANEL._grass)
                        {
                            this.beast  = true;
                            this.power *= 2;
                            this.sound.PlaySE(SoundEffect.docking);
                        }
                        this.sound.PlaySE(SoundEffect.warp);
                        foreach (CharacterBase characterBase in battle.AllChara())
                        {
                            if (characterBase.union == character.UnionEnemy)
                            {
                                Point position = characterBase.position;
                                position.X -= this.UnionRebirth(character.union);
                                if (character.InAreaCheck(position) && ((character.NoObject(position) || position == character.position) && !battle.panel[position.X, position.Y].Hole && (!(characterBase is DammyEnemy) || !characterBase.nohit) && character.InAreaCheck(character.position)))
                                {
                                    this.target.Add(position);
                                }
                            }
                        }
                        break;

                    case 10:
                        this.frame = 0;
                        ++this.targetNow;
                        if (this.targetNow >= this.target.Count)
                        {
                            this.end = true;
                            break;
                        }
                        this.posi = this.target[this.targetNow];
                        break;
                    }
                }
                else
                {
                    this.animePoint = this.targetNow % 2 != 1 ? (this.beast ? this.AnimeWideBO(this.frame) : this.AnimeWide(this.frame)) : (this.beast ? this.AnimeLongBO(this.frame) : this.AnimeLong(this.frame));
                    switch (this.frame)
                    {
                    case 9:
                        this.sound.PlaySE(SoundEffect.shotwave);
                        AttackBase a = this.beast ? new SwordAttack(this.sound, battle, this.posi.X + this.UnionRebirth(character.union), this.posi.Y, character.union, this.Power(character), 3, this.element, false, false) : (AttackBase) new KnifeAttack(this.sound, battle, this.posi.X + this.UnionRebirth(character.union), this.posi.Y, character.union, this.Power(character), 3, this.element, false);
                        battle.attacks.Add(this.Paralyze(a));
                        break;

                    case 12:
                        this.frame = 0;
                        ++this.targetNow;
                        if (this.targetNow >= this.target.Count)
                        {
                            this.end = true;
                            break;
                        }
                        this.posi = this.target[this.targetNow];
                        break;
                    }
                }
            }
            this.FlameControl(3);
        }
コード例 #9
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;
            }
        }
コード例 #10
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;
        }
コード例 #11
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }

            this.animePoint = this.AnimeReincarnation(this.waittime % 6);


            this.sound.PlaySE(SoundEffect.warp);
            //break;
            //this.animationpoint = this.AnimeReincarnation(this.waittime % 6);
            switch (this.waittime)
            {
            case 1:
                this.animePoint.X          = 0;
                this.animePoint.Y          = 0;
                character.animationpoint.X = -1;

                this.sound.PlaySE(SoundEffect.thunder);
                //battle.effects.Add(new f);

                character.parent.effects.Add(new FlashFead(this.sound, battle, Color.White, 15));
                break;

            case 15:
                this.sound.PlaySE(SoundEffect.thunder);
                battle.effects.Add(new FlashFead(this.sound, battle, Color.White, 15));
                break;

            case 30:
                this.sound.PlaySE(SoundEffect.bombbig);
                this.sound.PlaySE(SoundEffect.damageplayer);
                battle.effects.Add(new FlashFead(this.sound, battle, Color.White, 90));
                this.ShakeStart(4, 60);
                break;

            case 31:
                foreach (CharacterBase characterBase in battle.AllChara())
                {
                    if (characterBase.union == character.UnionEnemy)     //&& (!(characterBase is DammyEnemy) || !characterBase.nohit) && character.InAreaCheck(character.position))
                    {
                        characterBase.HPhalf();
                    }
                    //pointList.Add(characterBase.position);
                }

                //this.parent.player.HPhalf();
                break;

            case 90:
                this.animePoint.X = 0;
                //this.nohit = false;
                break;
            }

            if (this.waittime < 30)
            {
                this.animePoint.X = 0;
                this.animePoint.Y = 0;
            }

            ++this.waittime;

            /*switch (character.waittime)
             * {
             *  case 1:
             *      this.animePoint.X = 0;
             *      this.animePoint.Y = 0;
             *      character.animationpoint.X = -1;
             *      this.sound.PlaySE(SoundEffect.warp);
             *      break;
             *  case 10:
             *      //this.sound.PlaySE(SoundEffect.futon);
             *      this.animePoint.X = 0;
             *      this.animePoint.Y = 0;
             *      break;
             *  case 15:
             *      //this.animePoint.X = 1;
             *      break;
             *  case 20:
             *      //this.animePoint.X = 2;
             *      break;
             *  case 44:
             *      this.sound.PlaySE(SoundEffect.shoot);
             *      character.parent.attacks.Add(this.Paralyze(new MimaCharge(this.sound, character.parent, 5, character.position.Y, character.union, this.Power(character), 1, character.positionDirect, this.element, -8)));
             *      //AttackBase attackBase1 = this.Paralyze(new UthuhoChip(this.sound, character.parent, character.position.X, character.position.Y - 1, character.union, this.Power(character), this.color));
             *      //attackBase1.breaking = false;
             *
             *      //new MimaCharge(this.sound, character.parent, character.position.X, 1, character.union, this.Power(character), 1, this.positionDirect, this.element, 8);
             *
             *      //character.parent.attacks.Add(attackBase1);
             *      //AttackBase attackBase2 = this.Paralyze(new UthuhoChip(this.sound, character.parent, character.position.X, character.position.Y + 1, character.union, this.Power(character), this.color));
             *      //attackBase2.breaking = false;
             *      //character.parent.attacks.Add(attackBase2);
             *      break;
             * }*/
            if (character.waittime > 100 && this.BlackOutEnd(character, battle))
            {
                base.Action(character, battle);
            }
        }
コード例 #12
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);
            }
        }
コード例 #13
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (SaveData.HAVEVirus[this.id] == null)
            {
                if (character.waittime == 3)
                {
                    this.sound.PlaySE(SoundEffect.throwbomb);
                }
                character.animationpoint = CharacterAnimation.BombAnimation(character.waittime);
                if (character.waittime == 6)
                {
                    int   num = this.power + this.pluspower;
                    int   t   = 40;
                    Point end = new Point(character.position.X + 3 * this.UnionRebirth(character.union), character.position.Y);
                    battle.attacks.Add(this.Paralyze(new VirusBall(this.sound, character.parent, character.position.X, character.position.Y, character.union, this.Power(character), 1, new Vector2(character.positionDirect.X, character.positionDirect.Y - 16f), end, t, this.id)));
                }
                if (character.waittime != 25)
                {
                    return;
                }
                base.Action(character, battle);
            }
            else if (character.waittime <= 3)
            {
                character.animationpoint = new Point(0, 1);
            }
            else if (character.waittime <= 12)
            {
                character.animationpoint = new Point((character.waittime - 3) / 3, 1);
            }
            else if (character.waittime < 24)
            {
                character.animationpoint = new Point(3, 1);
            }
            else if (character.waittime == 24)
            {
                if (character.Canmove(character.positionold))
                {
                    this.sound.PlaySE(SoundEffect.enterenemy);
                    Virus     haveViru;
                    EnemyBase e;
                    haveViru = SaveData.HAVEVirus[this.id];

                    var newVirus = new Virus
                    {
                        type      = haveViru.type,
                        eatBug    = haveViru.eatBug,
                        eatError  = haveViru.eatError,
                        eatFreeze = haveViru.eatFreeze,
                    };
                    if ((character as Player)?.addonSkill[73] == true)
                    {
                        var enemies      = battle.AllChara().Where(c => character.UnionEnemy == c.union);
                        var maxEnemyRank = enemies.Max(c => (c as EnemyBase)?.version ?? 0);

                        if (enemies.Any(c => c is NaviBase))
                        {
                            maxEnemyRank++;
                        }

                        var rankUpgrades = Math.Max(0, maxEnemyRank - haveViru.rank - (3 - haveViru.rank));
                        newVirus.eatBug += 20 * rankUpgrades;
                        newVirus.ReturnVirus(newVirus.type);
                    }
                    e = new EnemyBase(this.sound, battle, character.positionold.X, character.positionold.Y, 0, character.union, newVirus.rank);
                    EnemyBase enemyBase = EnemyBase.EnemyMake(newVirus.type, e, false);
                    enemyBase.number = battle.enemys.Count;
                    if (this.randomSeed != null)
                    {
                        enemyBase.randomSeed = this.randomSeed;
                    }
                    enemyBase.HPset(newVirus.HP);
                    enemyBase.power = newVirus.Power;
                    if (enemyBase.Canmove(enemyBase.position))
                    {
                        battle.enemys.Add(enemyBase);
                        enemyBase.Init();
                        enemyBase.InitAfter();
                    }
                    else
                    {
                        battle.effects.Add(new MoveEnemy(this.sound, battle, character.positionold.X, character.positionold.Y));
                    }
                }
            }
            else if (character.waittime >= 48)
            {
                base.Action(character, battle);
            }
        }