protected override void Moving() { this.neutlal = this.Motion == NaviBase.MOTION.neutral; switch (this.Motion) { case NaviBase.MOTION.neutral: this.animationpoint.X = 0; if (this.moveflame) { ++this.waittime; } if (this.moveflame && this.waittime >= 8 / version) { this.waittime = 0; ++this.roopneutral; this.animationpoint = this.AnimeNeutral(this.waittime); if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end) { this.roopneutral = 0; if (this.roopmove > this.moveroop && !this.badstatus[4]) { this.roopmove = 0; this.speed = 1; ++this.attackroop; this.waittime = 0; this.ready = false; this.NextAttack = false; this.powerPlus = this.powers[(int)this.attack]; this.Motion = NaviBase.MOTION.attack; } else { this.Badstatusresist = false; this.superArmor = false; if (this.hp <= this.HpMax / 2) { this.attack = (ScissorMan.ATTACK) this.pattern2[this.action]; if (this.parent.player.Hp <= this.animaHP && this.Random.Next(10) >= 5) { this.attack = ScissorMan.ATTACK.AnimaDeleater; this.Badstatusresist = true; this.superArmor = true; } this.NextAttack = true; ++this.action; if (this.action >= this.pattern.Length) { this.action = 0; } } else { this.attack = (ScissorMan.ATTACK) this.pattern[this.action]; if (this.parent.player.Hp <= this.animaHP && this.Random.Next(10) >= 5) { this.attack = ScissorMan.ATTACK.AnimaDeleater; this.Badstatusresist = true; this.superArmor = true; } this.NextAttack = true; ++this.action; if (this.action >= this.pattern2.Length) { this.action = 0; } } this.powerPlus = this.powers[this.pattern[this.action]]; this.attackMode = 0; this.waittime = 0; ++this.roopmove; this.Motion = NaviBase.MOTION.move; } } break; } break; case NaviBase.MOTION.attack: switch (this.attack) { case ScissorMan.ATTACK.CrossScissor: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeCross(this.waittime); switch (this.waittime) { case 1: this.MoveRandom(true, true); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X + this.UnionRebirth(this.union), this.positionre.Y, this.union, new Point(), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X + this.UnionRebirth(this.union) - 1, this.positionre.Y - 1, this.union, new Point(), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X + this.UnionRebirth(this.union) + 1, this.positionre.Y - 1, this.union, new Point(), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X + this.UnionRebirth(this.union) - 1, this.positionre.Y + 1, this.union, new Point(), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X + this.UnionRebirth(this.union) + 1, this.positionre.Y + 1, this.union, new Point(), 15, true)); break; case 5: this.counterTiming = true; this.effecting = true; if (!this.HeviSand) { this.parent.effects.Add(new StepShadow(this.sound, this.parent, new Rectangle(this.animationpoint.X * this.wide, (this.version < 4 ? 0 : 2) * this.height, this.wide, this.height), this.positionDirect, this.picturename, this.rebirth, this.position)); this.position = this.positionre; this.PositionDirectSet(); } this.PositionDirectSet(); break; case 7: this.counterTiming = false; this.sound.PlaySE(SoundEffect.breakObject); this.ShakeStart(5, 5); this.parent.attacks.Add(new SwordCloss(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 2, this.element, false)); break; case 12: this.effecting = false; this.attackCount = 0; this.roopneutral = 0; this.Motion = NaviBase.MOTION.move; this.speed = this.nspeed; break; } break; } break; case ScissorMan.ATTACK.SlashRush: if (this.moveflame) { ++this.waittime; if (this.attackMode == 0) { this.counterTiming = true; this.animationpoint = this.AnimeSlashRush1(this.waittime); switch (this.waittime) { case 1: this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.posis[1].X, this.posis[1].Y, this.union, new Point(), 30, true)); break; case 3: this.waittime = 0; this.counterTiming = false; ++this.attackMode; this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.posis[2].X, this.posis[2].Y, this.union, new Point(), 30, true)); break; } } else { if (this.attackMode % 2 == 1) { this.animationpoint = this.AnimeSlashRush2(this.waittime); } else { this.animationpoint = this.AnimeSlashRush3(this.waittime); } int index1 = this.attackMode % this.posis.Length; switch (this.waittime) { case 2: this.sound.PlaySE(SoundEffect.sword); KnifeAttack knifeAttack = new KnifeAttack(this.sound, this.parent, this.posis[index1].X, this.posis[index1].Y, this.union, this.Power, 2, this.element, false) { invincibility = false }; this.parent.attacks.Add(knifeAttack); break; case 4: ++this.attackMode; if (this.attackMode < 9 + version * 4 - 1) { int index2 = (this.attackMode + 1) % this.posis.Length; this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.posis[index2].X, this.posis[index2].Y, this.union, new Point(), 30, true)); } this.waittime = 0; if (this.attackMode >= 9 + version * 4) { this.roopneutral = 0; this.Motion = NaviBase.MOTION.move; this.speed = this.nspeed; break; } break; } } break; } break; case ScissorMan.ATTACK.MeteorSickle: switch (this.attackMode) { case 0: if (this.moveflame) { ++this.waittime; this.animationpoint = this.AnimeMeteorSickle1(this.waittime); switch (this.waittime) { case 1: this.posis = new Point[2]; this.posis[0].X = this.union == Panel.COLOR.blue ? 0 : 5; this.posis[0].Y = this.Random.Next(3); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.posis[0].X, this.posis[0].Y, this.union, new Point(), 30, true)); break; case 3: this.waittime = 0; this.counterTiming = false; this.nohit = true; ++this.attackMode; this.Throw(); break; } break; } break; case 1: if (this.moveflame) { this.animationpoint = this.AnimeMeteorSickle2(this.waittime % 2 + 1); ++this.waittime; } if (this.flyflame == this.time / 3) { this.sound.PlaySE(SoundEffect.knife); this.parent.attacks.Add(new DelayScissor(this.sound, this.parent, this.posis[0].X, this.posis[0].Y, this.union, this.Power, 16, this.element, new Vector2(this.positionDirect.X + 10 * this.UnionRebirth(this.union), this.positionDirect.Y - 10f + this.plusy), this.version > 3, 10)); this.posis[1] = this.RandomTarget(); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.posis[1].X, this.posis[1].Y, this.union, new Point(), 30, true)); } if (this.flyflame == this.time / 3 * 2) { this.sound.PlaySE(SoundEffect.knife); this.parent.attacks.Add(new DelayScissor(this.sound, this.parent, this.posis[1].X, this.posis[1].Y, this.union, this.Power, 16, this.element, new Vector2(this.positionDirect.X + 10 * this.UnionRebirth(this.union), this.positionDirect.Y - 10f + this.plusy), this.version > 3, 10)); } if (this.flyflame == this.time) { this.nohit = false; this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.animationpoint.X = 22; this.speed = this.nspeed; } else { this.positionDirect.X -= this.movex; this.positionDirect.Y -= this.movey; this.plusy -= this.speedy; this.speedy -= this.plusing; this.nohit = speedy * (double)this.speedy < 25.0; if (speedy < 0.0) { this.position = this.positionre; } } ++this.flyflame; break; } break; case ScissorMan.ATTACK.DeathWiper: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeDeathWiper(this.waittime); switch (this.waittime) { case 1: this.MoveRandom(true, true); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y - 1, this.union, new Point(1, 0), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, new Point(1, 0), 15, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y + 1, this.union, new Point(1, 0), 15, true)); break; case 5: this.counterTiming = true; this.sound.PlaySE(SoundEffect.sword); this.parent.attacks.Add(new Halberd(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 2, this.element, false)); break; case 7: this.counterTiming = false; break; case 10: this.effecting = false; this.attackCount = 0; this.roopneutral = 0; this.Motion = NaviBase.MOTION.move; this.speed = this.nspeed; break; } break; } break; case ScissorMan.ATTACK.AnimaDeleater: switch (this.attackMode) { case 0: this.animationpoint = this.AnimeDeleater1(this.waittime); if (this.moveflame) { ++this.waittime; switch (this.waittime) { case 0: case 1: case 2: case 3: case 4: case 5: case 7: case 8: break; case 6: this.ball = new AnimaBall(this.sound, this.parent, this.position.X, this.position.Y, this.union, 0, 1, new Vector2(this.positionDirect.X, this.positionDirect.Y + 24f), this.element, 8); this.parent.attacks.Add(ball); goto case 0; default: bool flag = false; if (this.ball != null) { if (this.ball.hit) { this.waittime = 0; ++this.attackMode; } else if (!this.ball.flag) { flag = true; } } else { flag = true; this.nohit = true; this.animationpoint.X = 0; } if (flag) { this.Badstatusresist = false; this.superArmor = false; this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.animationpoint.X = 0; this.speed = this.nspeed; goto case 0; } else { goto case 0; } } } break; case 1: this.parent.effects.Add(new StepShadow(this.sound, this.parent, new Rectangle(this.animationpoint.X * this.wide, (this.version < 4 ? 0 : 2) * this.height, this.wide, this.height), this.positionDirect, this.picturename, this.rebirth, this.position)); this.position = new Point(this.parent.player.position.X - 2 * this.UnionRebirth(this.union), this.parent.player.position.Y); this.PositionDirectSet(); ++this.attackMode; break; case 2: if (!this.distracted) { this.animationpoint = this.AnimeDeleater2(this.waittime); } if (this.moveflame) { ++this.waittime; switch (this.waittime) { case 4: this.sound.PlaySE(SoundEffect.damageplayer); this.parent.player.Hp /= 2; break; case 10: this.sound.PlaySE(SoundEffect.damageplayer); this.parent.player.Hp /= 2; break; case 16: this.parent.effects.Add(new ScreenFlash(this.sound, this.parent, Color.Red, 0)); this.ball.black = true; this.KillMode = true; this.parent.player.Hp = 0; break; default: if (this.parent.player.Hp > 0) { if (this.waittime >= 30) { if (!this.distracted && this.waittime < 60) { this.MoveRandom(false, false); this.position = this.positionre; this.PositionDirectSet(); this.distracted = true; this.originalReverse = this.rebirth; this.rebirth ^= true; } if (this.waittime < 35) { this.animationpoint = this.AnimeSlashRush1(this.waittime % 5); } else { this.animationpoint = (this.waittime % 10 < 5) ? this.AnimeSlashRush2(this.waittime % 5) : this.AnimeSlashRush3(this.waittime % 5); if (this.waittime % 5 == 0) { this.rebirth ^= true; } if (this.waittime % 10 == 0) { this.MoveRandom(false, false); this.position = this.positionre; this.PositionDirectSet(); } } } if (this.waittime >= 55 && this.waittime < 240) { this.parent.effects.RemoveAll(e => e is ScreenFlash); this.ball.black = false; this.ball.hit = false; this.KillMode = false; this.parent.player.printplayer = true; } if (this.waittime >= 240) { this.Motion = MOTION.knockback; } } break; } break; } break; } break; } break; case NaviBase.MOTION.move: this.animationpoint.X = 0; if (this.moveflame) { ++this.waittime; } ++this.roopmove; this.Motion = NaviBase.MOTION.neutral; if (this.NextAttack) { switch (this.attack) { case ScissorMan.ATTACK.SlashRush: List <Point> source = new List <Point>(); for (int x = 0; x < this.parent.panel.GetLength(0); ++x) { for (int y = 0; y < this.parent.panel.GetLength(1); ++y) { if (this.parent.panel[x, y].color == this.UnionEnemy) { source.Add(new Point(x, y)); } } } this.posis = source.OrderBy <Point, Guid>(i => Guid.NewGuid()).ToArray <Point>(); this.MoveRandom(false, false); break; case ScissorMan.ATTACK.DeathWiper: this.MoveRandom(true, true); break; case ScissorMan.ATTACK.AnimaDeleater: this.MoveRandom(true, true); break; default: this.MoveRandom(false, false); break; } } else { this.MoveRandom(false, false); } this.speed = this.nspeed; if (this.attackroop > 4) { this.attackroop = 0; } if (this.position == this.positionre) { this.frame = 0; this.roopneutral = 0; break; } this.parent.effects.Add(new StepShadow(this.sound, this.parent, new Rectangle(this.animationpoint.X * this.wide, (this.version < 4 ? 0 : 2) * this.height, this.wide, this.height), this.positionDirect, this.picturename, this.rebirth, this.position)); this.position = this.positionre; this.PositionDirectSet(); this.frame = 0; this.roopneutral = 0; break; case NaviBase.MOTION.knockback: if (this.distracted) { this.distracted = false; this.parent.effects.RemoveAll(e => e is ScreenFlash); this.ball.black = false; this.ball.hit = false; this.KillMode = false; this.parent.player.printplayer = true; this.rebirth = this.originalReverse; } switch (this.waittime) { case 2: this.Badstatusresist = false; this.superArmor = false; this.rebirth = this.union == Panel.COLOR.red; this.ready = false; this.attackCount = 0; this.speed = this.nspeed; this.effecting = false; this.NockMotion(); this.counterTiming = false; this.effecting = false; this.PositionDirectSet(); break; case 3: this.NockMotion(); break; case 15: this.animationpoint = new Point(9, 0); this.PositionDirectSet(); break; case 21: this.animationpoint = new Point(0, 0); this.waittime = 0; this.Motion = NaviBase.MOTION.neutral; break; } if (this.waittime >= 2 && this.waittime <= 6) { this.positionDirect.X -= this.UnionRebirth(this.union); } ++this.waittime; break; } if (this.effecting) { this.AttackMake(this.Power, 0, 0); } if (this.motion == NaviBase.MOTION.attack) { this.FlameControl(this.aspeed); } else { this.FlameControl(); } this.MoveAftar(); }
protected override void Moving() { this.neutlal = this.Motion == NaviBase.MOTION.neutral; switch (this.Motion) { case NaviBase.MOTION.neutral: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeNeutral(this.waittime); if (this.waittime >= 8 / version || this.atack) { this.waittime = 0; ++this.roopneutral; if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end) { this.roopneutral = 0; if (this.roopmove > this.moveroop && !this.badstatus[4]) { this.roopmove = this.version > 0 ? this.Random.Next(-1, this.moveroop + 1) : 0; ++this.atackroop; this.speed = 1; if (!this.atack) { //int index = this.Random.Next(this.version > 0 ? 3 : 1); int randMax = 4; /* * if (this.Hp <= this.HpMax / 2) { * randMax = 5; * }*/ int index = this.Random.Next(randMax); //if (index == 5) { index = 4; } /* * if (index != 4) * { * this.attack = (Flandre.ATTACK)index; * } * else * { * this.attack = Flandre.ATTACK.earthBreaker; * }*/ this.attack = (Flandre.ATTACK)index; //this.attack = Flandre.ATTACK.laevateinn; this.powerPlus = this.powers[index]; } this.waittime = 0; this.Motion = NaviBase.MOTION.attack; this.counterTiming = true; knifeTrue = 0; knifeNum = Math.Max(version - 1, 3); //Point[] knifePos = new Point[knifeNum]; } else { this.waittime = 0; if (this.atack) { this.roopmove = this.moveroop + 1; } this.Motion = NaviBase.MOTION.move; } } } break; } break; case NaviBase.MOTION.attack: if (this.moveflame) { ++this.waittime; if (this.moveflame) { switch (this.attack) { case Flandre.ATTACK.flanGear: this.animationpoint = this.AnimeSpark(this.waittime); int gearNum = 1; //if (version > 1) { gearNum = 2; } for (int gearA = 0; gearA < gearNum; gearA++) { switch (this.waittime) { case 2: this.MoveRandom(false, false, this.union == Panel.COLOR.red ? Panel.COLOR.blue : Panel.COLOR.red, 0); Point point1 = this.positionre; this.positionre = this.position; knifeX[0] = point1.X; knifeY[0] = point1.Y; int gTime = 60 + 22; this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y, this.union, new Point(), gTime, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X - 1, point1.Y, this.union, new Point(), gTime, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X + 1, point1.Y, this.union, new Point(), gTime, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y - 1, this.union, new Point(), gTime, true)); this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y + 1, this.union, new Point(), gTime, true)); break; case 34: this.counterTiming = false; //this.sound.PlaySE(SoundEffect.beam); //Point point1 = this.RandomTarget(); //this.parent.attacks.Add(new Beam(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, 2, false)); this.parent.attacks.Add(new FlanGear(this.sound, this.parent, knifeX[0], knifeY[0], this.union, this.Power, 0)); break; case 64: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; if (!this.atack) { this.speed = this.nspeed; break; } break; } } if (this.waittime != 24) { break; } break; case Flandre.ATTACK.randomSword: this.animationpoint = this.AnimeBomb(this.waittime); //KnifeAttack[] knifeArr = new KnifeAttack[3]; //int knifeTrue = 0; int knifeNum = Math.Max(version - 1, 3); //Point[] knifePos = new Point[knifeNum]; //int[] knifeX = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //int[] knifeY = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; switch (this.waittime) { case 1: //this.counterTiming = false; //this.sound.PlaySE(SoundEffect.throw_); Point point1 = this.RandomTarget(); knifeX[0] = point1.X; knifeY[0] = point1.Y; this.parent.attacks.Add(new Dummy(this.sound, this.parent, point1.X, point1.Y, this.union, new Point(), 30, true)); knifeTrue += 1; this.RandomTarget(); Vector2 v = new Vector2(this.positionDirect.X + 8 * this.UnionRebirth(this.union), this.positionDirect.Y - 8f); //KnifeAttack[] knifeArr = new KnifeAttack[3]; for (int seed = 1; seed < knifeNum; ++seed) { this.MoveRandom(false, false, this.union == Panel.COLOR.red ? Panel.COLOR.blue : Panel.COLOR.red, seed); Point positionre = this.positionre; knifeX[seed] = this.positionre.X; knifeY[seed] = this.positionre.Y; //knifePos[knifeTrue] = this.positionre; //this.parent.attacks.Add(new ClossBomb(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 1, v, positionre, 40, ClossBomb.TYPE.closs, false, ClossBomb.TYPE.big, false, false)); //this.sound.PlaySE(SoundEffect.sword); /* * KnifeAttack knifeAttack = new KnifeAttack(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, this.Power, 2, this.element, false) * { * invincibility = false * }; * knifeArr[knifeTrue] = knifeAttack;*/ knifeTrue += 1; this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.positionre.X, this.positionre.Y, this.union, new Point(), 30, true)); //this.parent.attacks.Add(knifeAttack); } this.positionre = this.position; break; case 36: //this.sound.PlaySE(SoundEffect.sword); this.counterTiming = false; for (int sva = 0; sva < knifeTrue; sva++) { this.sound.PlaySE(SoundEffect.sword); KnifeAttack knifeAttack = new KnifeAttack(this.sound, this.parent, knifeX[sva], knifeY[sva], this.union, this.Power, 2, ChipBase.ELEMENT.heat, false) { invincibility = false }; this.parent.attacks.Add(knifeAttack); } break; case 46: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; if (!this.atack) { this.speed = this.nspeed; break; } break; } break; case Flandre.ATTACK.bunshin: this.animationpoint = this.bunshin(this.waittime); switch (this.waittime) { case 1: //this.sound.PlaySE(SoundEffect.charge); // need to change this to use a different SE than Earth Breaker, playtest issue //this.speed = this.attackspeed; break; case 4: this.counterTiming = true; break; case 20: this.counterTiming = false; this.sound.PlaySE(SoundEffect.enterenemy); this.MoveRandom(false, false); Point posRef = this.positionre; this.positionre = this.position; //this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, posRef.X, posRef.Y)); flanBunshin bunshinAttack = new flanBunshin(this.sound, this.parent, posRef.X, posRef.Y, this.union, this.Power); this.parent.attacks.Add(bunshinAttack); this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; if (!this.atack) { this.speed = this.nspeed; break; } break; } break; case Flandre.ATTACK.laevateinn: switch (this.waittime) { case 1: this.counterTiming = false; this.animationpoint.X = -1; this.levStart[0] = new flanLev(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, this.speed); //this.levStart = levStart; this.parent.attacks.Add(levStart[0]); break; case 17: this.MoveRandom(true, true); this.Shadow(); this.positionReserved = this.position; this.position = this.positionre; this.PositionDirectSet(); levStart[0].position = this.position; break; case 26: flanLevF levEnd = new flanLevF(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.Power, this.speed); this.parent.attacks.Add(levEnd); break; case 40: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; if (!this.atack) { this.speed = this.nspeed; break; } break; } break; case Flandre.ATTACK.earthBreaker: this.animationpoint = this.AnimeMissile(this.waittime); //this.animationpoint.X = this.AnimeSlash4(this.frame).X; switch (this.waittime) { case 1: this.counterTiming = false; //this.chargeanime = 0; this.sound.PlaySE(SoundEffect.charge); this.speed = this.attackspeed; //this.chargeEffect = 1; break; case 20: this.counterTiming = true; this.sound.PlaySE(SoundEffect.chargemax); //this.chargeEffect = 2; break; case 35: this.speed = this.nspeed; //this.chargeEffect = 0; this.preX = this.position.X; this.positionReserved = this.position; this.position.X = this.TargetX(this, this.parent); if (this.position.X < 0) { this.position.X = 0; } if (this.position.X > 5) { this.position.X = 5; } this.PositionDirectSet(); break; case 38: //this.effecting = true; //this.Shadow(); /* * int x = this.union == Panel.COLOR.blue ? 2 : 3; * if (!this.HeviSand) * this.position = new Point(x, 1); * this.PositionDirectSet();*/ break; case 45: this.counterTiming = false; this.speed = this.attackspeed; this.sound.PlaySE(SoundEffect.bombmiddle); base.ShakeStart(2, 16); for (int j = 0; j < 3; j++) { AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + (1 + 0) * base.UnionRebirth(this.union), j, this.union, this.Power * 2, 4, this.element); //AttackBase attackBase = new BombAttack(this.sound, this.parent, this.position.X + (1 + 0) * base.UnionRebirth(this.union), j, this.union, this.Power * 2, 1, 1, new Point(), this.element); attackBase.breaking = true; this.parent.attacks.Add(attackBase); //BombAttack bombAttack = new BombAttack(this.sound, this.parent, this.position.X + (1 + index) * this.UnionRebirth(this.union), pY, this.union, this.Power, 1, 1, new Point(), ChipBase.ELEMENT.normal); if (!this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].OnCharaCheck()) { this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].Break(); } else { this.parent.panel[this.position.X + (1 + 0) * base.UnionRebirth(this.union), j].Crack(); } attackBase.invincibility = true; //this.parent.attacks.Add(base.Paralyze(attackBase)); this.parent.effects.Add(new Shock(this.sound, this.parent, attackBase.position.X, attackBase.position.Y, 2, Panel.COLOR.red)); } break; case 50: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.positionReserved = null; this.position.X = this.preX; this.PositionDirectSet(); if (!this.atack) { this.speed = this.nspeed; break; } break; } break; } } break; } break; case NaviBase.MOTION.move: this.animationpoint = this.AnimeMove(this.waittime); if (this.moveflame) { switch (this.waittime) { case 0: this.MoveRandom(false, false); if (this.position == this.positionre) { this.Motion = NaviBase.MOTION.neutral; this.frame = 0; this.roopneutral = 0; ++this.roopmove; break; } break; case 3: this.positionReserved = null; this.position = this.positionre; this.PositionDirectSet(); break; case 5: this.Motion = NaviBase.MOTION.neutral; this.frame = 0; this.roopneutral = 0; ++this.roopmove; break; } ++this.waittime; break; } break; case NaviBase.MOTION.knockback: switch (this.waittime) { case 2: this.NockMotion(); this.counterTiming = false; this.effecting = false; this.PositionDirectSet(); break; case 3: this.NockMotion(); break; case 15: this.animationpoint = new Point(20, 0); this.PositionDirectSet(); break; case 21: this.animationpoint = new Point(0, 0); this.waittime = 0; this.Motion = NaviBase.MOTION.neutral; break; } if (this.waittime >= 2 && this.waittime <= 6) { this.positionDirect.X -= this.UnionRebirth(this.union); } ++this.waittime; break; } this.FlameControl(); this.MoveAftar(); }
protected override void Moving() { this.neutlal = this.Motion == NaviBase.MOTION.neutral; switch (this.Motion) { case NaviBase.MOTION.neutral: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeNeutral(this.waittime); if (this.waittime >= (this.roopneutral == 1 ? 16 - Math.Min(8, (version - 1) * 2) : 8 - Math.Min(4, version - 1))) { this.waittime = 0; ++this.roopneutral; if (this.roopneutral >= 1 && this.parent.nowscene != SceneBattle.BATTLESCENE.end) { this.roopneutral = 0; if (this.roopmove > this.moveroop && !this.badstatus[4]) { this.roopmove = 0; this.speed = 1; ++this.attackroop; this.waittime = 0; this.Motion = NaviBase.MOTION.attack; this.counterTiming = true; } else { if (this.attackroop >= 2) { int index = this.Random.Next(2); switch (index) { case 0: this.attack = Sakuya.ATTACK.throwKnife3; break; case 1: this.attack = this.Random.Next(100) % 2 != 1 ? Sakuya.ATTACK.backKnife : Sakuya.ATTACK.frontKnife; break; case 2: this.attack = Sakuya.ATTACK.timeStop; break; } this.powerPlus = this.powers[index]; } else { int index = 0; if (this.version > 1 && this.Random.Next(100) % 2 == 1) { index = this.Hp >= this.HpMax / 2 ? 0 : 4; } this.attack = (Sakuya.ATTACK)index; this.powerPlus = this.powers[index]; } this.waittime = 0; this.Motion = NaviBase.MOTION.move; } } } break; } break; case NaviBase.MOTION.attack: switch (this.attack) { case Sakuya.ATTACK.throwKnife: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeThrow(this.waittime); switch (this.waittime) { case 1: this.speed = 1; break; case 16: this.counterTiming = false; this.sound.PlaySE(SoundEffect.knife); this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.version < 3 ? 6 : 10, this.Power, 0, 0, 3)); break; case 76: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; break; } break; } break; case Sakuya.ATTACK.throwKnife3: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeThrow(this.waittime); switch (this.waittime) { case 1: this.speed = 1; break; case 16: int[] array = ((IEnumerable <int>) new int[3] { 30 - Math.Min(15, (version - 1) * 4), 50 - Math.Min(25, (version - 1) * 5), 70 - Math.Min(35, (version - 1) * 6) }).OrderBy <int, Guid>(i => Guid.NewGuid()).ToArray <int>(); this.counterTiming = false; this.sound.PlaySE(SoundEffect.chain); int stoptime = 20 - Math.Min(15, (version - 1) * 3); this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), 0, this.union, this.version < 3 ? 6 : 10, this.Power, array[0], stoptime, 3)); this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), 1, this.union, this.version < 3 ? 6 : 10, this.Power, array[1], stoptime, 3)); this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), 2, this.union, this.version < 3 ? 6 : 10, this.Power, array[2], stoptime, 3)); break; case 76: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; this.attackroop = 0; break; } break; } else { break; } case Sakuya.ATTACK.frontKnife: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeSwors(this.waittime); switch (this.waittime) { case 1: this.effecting = true; break; case 20: ((IEnumerable <int>) new int[3] { 30, 50, 70 }).OrderBy <int, Guid>(i => Guid.NewGuid()).ToArray <int>(); this.counterTiming = false; this.sound.PlaySE(SoundEffect.sword); this.parent.attacks.Add(new KnifeAttack(this.sound, this.parent, this.position.X + this.UnionRebirth(this.union), this.position.Y, this.union, this.Power, this.speed, ChipBase.ELEMENT.normal, false)); break; case 50: this.attack = Sakuya.ATTACK.throwKnife; this.roopneutral = 0; this.attackroop = 0; this.effecting = false; this.speed = this.nspeed; this.Motion = NaviBase.MOTION.move; break; } if (this.waittime != 20) { } break; } break; case Sakuya.ATTACK.backKnife: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeSwors(this.waittime); switch (this.waittime) { case 1: this.effecting = true; this.rebirth = !this.rebirth; break; case 20: ((IEnumerable <int>) new int[3] { 30, 50, 70 }).OrderBy <int, Guid>(i => Guid.NewGuid()).ToArray <int>(); this.counterTiming = false; this.sound.PlaySE(SoundEffect.sword); AttackBase attackBase = new KnifeAttack(this.sound, this.parent, this.position.X - this.UnionRebirth(this.union), this.position.Y, this.union == Panel.COLOR.blue ? Panel.COLOR.red : Panel.COLOR.blue, this.Power, this.speed, ChipBase.ELEMENT.normal, false); attackBase.union = this.union; this.parent.attacks.Add(attackBase); break; case 50: this.rebirth = this.union == Panel.COLOR.red; this.attack = Sakuya.ATTACK.throwKnife; this.roopneutral = 0; this.attackroop = 0; this.effecting = false; this.Motion = NaviBase.MOTION.move; break; } if (this.waittime != 20) { } break; } break; case Sakuya.ATTACK.timeStop: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeThrow(this.waittime); switch (this.waittime) { case 1: this.speed = 1; break; case 16: this.counterTiming = false; this.sound.PlaySE(SoundEffect.chain); int stoptime = 20 - Math.Min(15, (version - 1) * 3); int spintime = 70 - Math.Min(30, version * 10); Point point = this.RandomTarget(); Point knifePosPlus; Point knifePosMinus; if (this.Random.Next(100) % 2 == 0) { knifePosPlus = new Point(point.X + this.UnionRebirth(this.union), point.Y); knifePosMinus = new Point(point.X - this.UnionRebirth(this.union), point.Y); if (this.NoObject(knifePosPlus) && this.InAreaCheck(knifePosPlus)) { this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, knifePosPlus.X, knifePosPlus.Y, this.union, this.version < 3 ? 6 : 10, this.Power, spintime, stoptime, 1)); } if (this.NoObject(knifePosMinus) && this.InAreaCheck(knifePosMinus)) { this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, knifePosMinus.X, knifePosMinus.Y, this.union, this.version < 3 ? 6 : 10, this.Power, spintime, stoptime, 3)); } break; } knifePosPlus = new Point(point.X, point.Y + 1); knifePosMinus = new Point(point.X, point.Y - 1); if (this.NoObject(knifePosPlus) && this.InAreaCheck(knifePosPlus)) { this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, knifePosPlus.X, knifePosPlus.Y, this.union, this.version < 3 ? 6 : 10, this.Power, spintime, stoptime, 0)); } if (this.NoObject(knifePosMinus) && this.InAreaCheck(knifePosMinus)) { this.parent.attacks.Add(new ThrowKnife(this.sound, this.parent, knifePosMinus.X, knifePosMinus.Y, this.union, this.version < 3 ? 6 : 10, this.Power, spintime, stoptime, 2)); } break; case 76: this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; this.attackroop = 0; break; } } break; case Sakuya.ATTACK.kawarimi: if (this.moveflame) { ++this.waittime; } if (this.moveflame) { this.animationpoint = this.AnimeThrow2(this.waittime); switch (this.waittime) { case 2: this.speed = 1; this.nohit = true; this.y = 48; this.shadow = new Shadow(this.sound, this.parent, this.position.X, this.position.Y, this); this.parent.effects.Add(shadow); this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y)); break; case 16: ((IEnumerable <int>) new int[3] { 30 - Math.Min(15, (version - 1) * 4), 50 - Math.Min(25, (version - 1) * 5), 70 - Math.Min(35, (version - 1) * 6) }).OrderBy <int, Guid>(i => Guid.NewGuid()).ToArray <int>(); this.counterTiming = false; this.sound.PlaySE(SoundEffect.knife); Point point1 = this.RandomTarget(); this.parent.attacks.Add(new DelayKnife(this.sound, this.parent, point1.X, point1.Y, this.union, this.Power, 16, this.element)); break; case 32: this.sound.PlaySE(SoundEffect.knife); Point point2 = this.RandomTarget(); this.parent.attacks.Add(new DelayKnife(this.sound, this.parent, point2.X, point2.Y, this.union, this.Power, 16, this.element)); break; case 48: this.sound.PlaySE(SoundEffect.knife); Point point3 = this.RandomTarget(); this.parent.attacks.Add(new DelayKnife(this.sound, this.parent, point3.X, point3.Y, this.union, this.Power, 16, this.element)); break; case 76: if (this.shadow != null) { this.shadow.flag = false; } this.y = 0; this.nohit = false; this.animationpoint.X = 0; this.roopneutral = 0; this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; this.attackroop = 0; break; } } break; } break; case NaviBase.MOTION.move: if (this.moveflame) { ++this.waittime; } ++this.roopmove; this.Motion = NaviBase.MOTION.neutral; switch (this.attack) { case Sakuya.ATTACK.throwKnife3: if (this.Canmove(new Point(this.union == Panel.COLOR.blue ? 5 : 0, 1), this.number, this.union)) { this.positionre = new Point(this.union == Panel.COLOR.blue ? 5 : 0, 1); this.attack = Sakuya.ATTACK.throwKnife3; this.powerPlus = this.powers[(int)this.attack] * version; this.motion = NaviBase.MOTION.attack; break; } this.attackroop = 0; this.MoveRandom(false, false); this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; break; case Sakuya.ATTACK.frontKnife: case Sakuya.ATTACK.backKnife: this.DammySet(); Point point4 = this.RandomTarget(); if (this.Canmove(new Point(point4.X + this.UnionRebirth(this.union) * (this.attack == Sakuya.ATTACK.backKnife ? 1 : -1), point4.Y), this.number, this.union == Panel.COLOR.blue ? Panel.COLOR.red : Panel.COLOR.blue)) { this.positionre = new Point(point4.X + this.UnionRebirth(this.union) * (this.attack == Sakuya.ATTACK.backKnife ? 1 : -1), point4.Y); this.motion = NaviBase.MOTION.attack; break; } this.attackroop = 0; this.MoveRandom(false, false); this.Motion = NaviBase.MOTION.neutral; break; default: this.MoveRandom(false, false); this.Motion = NaviBase.MOTION.neutral; this.speed = this.nspeed; this.dammy.flag = false; break; } if (this.attackroop > 4) { this.attackroop = 0; } if (this.position == this.positionre) { this.frame = 0; this.roopneutral = 0; break; } if (this.version > 2) { this.parent.effects.Add(new StepShadow(this.sound, this.parent, new Rectangle(this.animationpoint.X * this.wide, (this.version < 4 ? 0 : 2) * this.height, this.wide, this.height), this.positionDirect, this.picturename, this.rebirth, this.position)); } 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; break; case NaviBase.MOTION.knockback: switch (this.waittime) { case 2: this.nohit = false; if (this.shadow != null) { this.shadow.flag = false; } this.y = 0; this.rebirth = this.union == Panel.COLOR.red; this.effecting = false; this.NockMotion(); this.counterTiming = false; this.effecting = false; this.PositionDirectSet(); break; case 3: this.NockMotion(); break; case 15: this.animationpoint = new Point(9, 0); this.PositionDirectSet(); break; case 21: this.animationpoint = new Point(0, 0); this.waittime = 0; if (this.version > 1) { this.attack = Sakuya.ATTACK.kawarimi; this.powerPlus = this.powers[(int)this.attack]; this.Motion = NaviBase.MOTION.attack; break; } this.Motion = NaviBase.MOTION.neutral; break; } if (this.waittime >= 2 && this.waittime <= 6) { this.positionDirect.X -= this.UnionRebirth(this.union); } ++this.waittime; break; } if (this.effecting) { this.AttackMake(this.Power, 0, 0); } this.FlameControl(); this.MoveAftar(); }
protected override void Moving() { this.neutlal = this.motion == Musya.MOTION.neutral; if (this.moveflame) { this.positionre = this.position; switch (this.motion) { case Musya.MOTION.neutral: this.animationpoint = this.AnimeNeutral(this.frame); switch (this.frame) { case 4: this.dammy.flag = false; break; case 5: this.frame = 0; if (this.EnemySearch(this.position.Y)) { this.slide = true; this.potisionNeutral = this.position; this.DammySet(); this.motion = Musya.MOTION.attack; this.sound.PlaySE(SoundEffect.shoot); this.effecting = true; break; } this.motion = Musya.MOTION.move; break; } break; case Musya.MOTION.move: if (this.up) { if (this.Canmove(new Point(this.position.X, this.position.Y - 1), this.number)) { this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y)); --this.position.Y; this.PositionDirectSet(); this.motion = Musya.MOTION.neutral; break; } this.up = false; this.motion = Musya.MOTION.neutral; break; } if (this.Canmove(new Point(this.position.X, this.position.Y + 1), this.number)) { this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y)); ++this.position.Y; this.PositionDirectSet(); this.motion = Musya.MOTION.neutral; } else { this.up = true; this.motion = Musya.MOTION.neutral; } break; case Musya.MOTION.attack: if (!this.slide) { this.animationpoint = this.AnimeAttack(this.frame); this.PositionDirectSet(); switch (this.frame) { case 3: this.sound.PlaySE(SoundEffect.sword); AttackBase attackBase; if (this.version > 0) { attackBase = new KnifeAttack(this.sound, this.parent, this.position.X + this.UnionRebirth, this.position.Y, this.union, this.Power, 4, this.element, false); } else { attackBase = new KnifeAttack(this.sound, this.parent, this.position.X + this.UnionRebirth, this.position.Y, this.union, this.Power, 4, this.element, false); attackBase.breaking = true; } this.parent.attacks.Add(attackBase); break; case 4: this.counterTiming = false; break; case 12: this.parent.effects.Add(new MoveEnemy(this.sound, this.parent, this.position.X, this.position.Y)); this.frame = 0; this.animationpoint = this.AnimeNeutral(this.frame); this.motion = Musya.MOTION.move; this.position = this.potisionNeutral; this.PositionDirectSet(); this.effecting = false; break; } break; } break; } } if (this.motion == Musya.MOTION.attack && this.slide) { this.animationpoint = this.AnimeMove(this.frame); if (!this.InAreaCheck(new Point(this.position.X + this.UnionRebirth, this.position.Y))) { this.slide = false; this.effecting = false; this.frame = 0; this.counterTiming = true; } else if (this.parent.AllHitter().Any(o => (o is ObjectBase || this.UnionEnemy == o.union) && o.position == new Point(this.position.X + this.UnionRebirth, this.position.Y)) || this.parent.panel[this.position.X + this.UnionRebirth, this.position.Y].Hole) { this.slide = false; this.frame = 0; this.counterTiming = true; this.effecting = false; } else { if (this.SlideMove(slideSpeed, 0)) { this.SlideMoveEnd(); } } } this.AttackMake(this.Power, 0, 0); this.MoveAftar(); this.FlameControl(); }