public void Update(int t, Vector2 pos, BossBackground bg, int colortype) { this.numflash -= 0.02f; if ((double)this.numflash <= 0.0) { this.numflash = 0.0f; } if (this.timecard) { this.boss.timecard = true; this.timecard = false; this.boss.nothide = this.nothide; } if (this.time == 40 && !this.boss.start) { this.boss.start = true; CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "24", new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); crazyStorm.BanSound(true); crazyStorm.effect = true; Program.game.game.PlaySound("ch02", true, this.boss.Position.X); } if (this.time == 80 && this.transform) { CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "24", new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); crazyStorm.BanSound(true); crazyStorm.effect = true; Program.game.game.PlaySound("ch02", true, this.boss.Position.X); } if (this.barrages[0] != null) { this.barrages[0].cs.SetPos(new Vector2(pos.X + 93f, pos.Y - 13f), false); } if ((double)Time.Stop != 0.0) { ++this.time; } if (this.cf && this.time == 1) { this.mcscale = 1f; this.cscale = this.mcscale; this.cx = 45f; } if (this.time <= 60) { Time.Init(); } if (this.time == 120) { this.Player.dead = false; this.Player.shot = false; this.Player.bombed = false; this.Player.shifted = false; } if (this.time > 60 && this.time <= 120) { this.numalpha += 0.01666667f; } if (this.time <= 120) { this.boss.Return(); } int num1 = 0; if (this.transform) { num1 = 100; } if (!this.cf && this.time <= 120) { if (t == this.type) { if (t == 0) { this.mfscale += 0.01085816f; this.fscale = this.mfscale; this.fx = 45f; } else { this.mcscale += 0.03584337f; this.cscale = this.mcscale; this.cx = 45f; } } else if (t == 0) { this.mcscale += 0.03584337f; this.cscale = this.mcscale; this.cx = 45f; } else { this.fdie = true; if (this.time <= 30) { this.mcscale += 0.03333334f; this.cscale = this.mcscale; } this.cx = 45f; if (this.time > 30) { this.mfscale += 0.01111111f; this.fscale = this.mfscale; } this.fx = 128f; } } else if (this.time > 120 + num1) { Program.game.achivmanager.Check(AchievementType.Challenge, 12, new Hashtable() { [(object)"bomb"] = (object)this.Player.bombed, [(object)"shot"] = (object)this.Player.shot }); Program.game.achivmanager.Check(AchievementType.Challenge, 13, new Hashtable() { [(object)"bomb"] = (object)this.Player.bombed }); Program.game.achivmanager.Check(AchievementType.Hidden, 2, new Hashtable() { [(object)"position"] = (object)this.Player.body.position, [(object)"type"] = (object)this.type }); if (this.boss.timecard && !this.boss.nothide) { this.boss.Hide(); } if (this.time == 121 + num1) { this.barrages[0].cs.Start(); } if (this.type == 0) { this.fscale = (float)this.hp / (float)this.maxhp * this.mfscale; } if (t == this.type || t != 1) { this.cscale = (float)this.hp / (float)this.maxhp * this.mcscale; } ++this.frame; if ((this.time - (120 + num1)) % 60 == 0 && this.realtime > 0) { --this.realtime; if (this.realtime <= 9) { Hashtable data = new Hashtable(); if (this.cd != null) { data[(object)"name"] = (object)this.cd.CardName; } else { data[(object)"name"] = (object)""; } data[(object)"level"] = (object)(int)(Main.Level - 1); Program.game.achivmanager.Check(AchievementType.Challenge, 0, data); Program.game.achivmanager.Check(AchievementType.Challenge, 3, new Hashtable() { [(object)"barrageid"] = (object)this.barrageid, [(object)"time"] = (object)this.realtime }); Program.game.game.PlaySound("timeout", true, this.boss.Position.X); this.numflash = 1f; } } if (this.barrages.Count >= 2 && (this.realtime <= this.barrages[1].time || this.hp <= this.barrages[1].hp)) { Program.game.game.PlaySound("tan", true, this.boss.Position.X); this.barrages[0].cs.Breakanditem(); Time.Init(); this.barrages.RemoveAt(0); this.barrages[0].cs.Start(); this.barrages[0].cs.SetPos(new Vector2(pos.X + 93f, pos.Y - 13f), false); } if (this.realtime == 0 && this.hp != 0) { Hashtable data = new Hashtable(); if (this.cd != null) { data[(object)"name"] = (object)this.cd.CardName; } else { data[(object)"name"] = (object)""; } data[(object)"level"] = (object)(int)(Main.Level - 1); data[(object)"shoot"] = (object)this.Player.shot; data[(object)"bomb"] = (object)this.Player.bombed; data[(object)"dead"] = (object)this.Player.dead; Program.game.achivmanager.Check(AchievementType.Challenge, 1, data); Program.game.achivmanager.Check(AchievementType.Challenge, 5, data); Program.game.achivmanager.Check(AchievementType.Challenge, 11, data); this.hp = 0; if (!Bonus.IsBonused()) { if (this.Player.dead || this.Player.bombed) { Bonus bonus1 = new Bonus(Bonus.GetScore(this.type, (float)this.frame, true), this.type, this.frame, true); } else { this.AddClearRecord(this.stage, this.barrageid); if (!this.boss.timecard) { Bonus bonus2 = new Bonus(Bonus.GetScore(this.type, (float)this.frame, false), this.type, this.frame); } else { Bonus bonus3 = new Bonus(Bonus.GetScore(this.type, 0.0f, false), this.type, this.frame); } } } if (this.itemm != null) { this.itemm.Shoot(pos, 70f, this.Player, this.boss); this.itemm.shot = false; } if (this.cd != null) { Program.game.game.Drawevents2 -= new Game.DrawDelegate3(this.cd.Draw); } this.cd = (CardDisplay)null; this.barrages[0].cs.Breakanditem(); this.boss.timecard = false; Time.Init(); Program.game.game.FindEffect("e" + (25 + colortype).ToString())?.Break(); this.die = true; } } if (this.type != 1) { return; } if (!this.first && this.time <= 120) { if (this.time == 30) { bg.Switch(true); this.boss.Image(); Program.game.game.PlaySound("cat", true, this.boss.Position.X); CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, (25 + colortype).ToString(), new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); crazyStorm.BanSound(true); crazyStorm.effect = true; crazyStorm.SetOPos(new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); Program.game.game.Quake(49, 4); this.AddSCRecord(this.stage, this.barrageid); this.cd = new CardDisplay(this.tex, this.boss.Spellcard, this.stage, this.barrageid); Program.game.game.Drawevents2 += new Game.DrawDelegate3(this.cd.Draw); } if (this.time == 90) { Program.game.game.PlaySound("ch02", true, this.boss.Position.X); } } else if (this.first && this.time > 120 && this.time == 121) { bg.Switch(true); Program.game.game.PlaySound("cat", true, this.boss.Position.X); CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, (25 + colortype).ToString(), new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); crazyStorm.BanSound(true); crazyStorm.effect = true; crazyStorm.SetOPos(new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f)); Program.game.game.Quake(49, 4); this.AddSCRecord(this.stage, this.barrageid); this.cd = new CardDisplay(this.tex, this.boss.Spellcard, this.stage, this.barrageid); Program.game.game.Drawevents2 += new Game.DrawDelegate3(this.cd.Draw); } Program.game.game.FindEffect("e" + (25 + colortype).ToString())?.SetPos(new Vector2(this.boss.Position.X + 93f, this.boss.Position.Y - 13f), true); int num2 = this.Player.dead || this.Player.bombed ? Bonus.GetScore(this.type, 0.0f, true) : (this.boss.timecard ? Bonus.GetScore(this.type, 0.0f, false) : Bonus.GetScore(this.type, (float)this.frame, false)); if (this.cd == null) { return; } this.cd.Update((float)num2); }
private void EM_BLAST(Boss b, EnemyManager em, int l, Vector2 p, bool Ban) { if (this.ps != null && !this.ps.allpan && (double)this.ptime <= 30.0) { ++this.ptime; int num1 = int.Parse(this.ps.Id.Split('e')[1]) - 19; int power = 30 + num1 * 12; int num2 = 15 + (num1 - 1) * 5; foreach (Enemy enemy in em.EnemyArray) { if (!enemy.IsInWudi() && (double)Math.Abs(enemy.Position.X - p.X) <= (double)num2 && ((double)enemy.Position.Y >= 0.0 && (double)enemy.Position.Y <= (double)p.Y)) { enemy.hp -= power; Program.game.game.Score += 10L; } } if (b != null && (double)Math.Abs(b.Position.X - p.X) <= (double)num2 && ((double)b.Position.Y >= 0.0 && (double)b.Position.Y <= (double)p.Y)) { Program.game.game.Score += 10L; if (b.CardArray.Count >= 1) { b.CardArray[0].DeHp(power, this.ps.isforshoot); } } } else if (this.ps != null && this.ps.allpan && (double)this.ptime <= 10.0) { ++this.ptime; if ((double)this.ptime == 10.0) { this.ps.shoot.AddRange((IEnumerable <byte>) new List <byte>() { (byte)0, (byte)37 }); } } CrazyStorm effect = Program.game.game.FindEffect("e2"); if (effect != null) { this.time2 += Time.Stop; effect.SetPos(new Vector2(p.X + 93f, p.Y - 13f), true); if (Main.IsKeyUp(Keys.Z) && (Main.Replay || PadState.IsKeyUp(JOYKEYS.Confirm))) { Program.game.game.StopSound("ch"); if ((double)this.time2 >= 90.0 && l >= 1) { if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)) { this.ps = Program.game.game.PlayEffect(true, (2 + l).ToString(), new Vector2(p.X + 93f, p.Y - 13f)); this.ps.allpan = true; } else { this.ps = Program.game.game.PlayEffect(true, (19 + l).ToString(), new Vector2(p.X + 93f, p.Y - 13f)); } this.ptime = 0.0f; this.ps.isforshoot = true; this.ps.BanSound(true); this.ps.effect = true; this.ps.bomb = true; Program.game.game.PlaySound("slash", true, p.X); this.time2 = 0.0f; } effect.Break(); } if (Ban) { effect.Break(); } } else if (!Ban && l >= 1 && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm)) && effect == null) { this.time2 = 0.0f; CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "2", new Vector2(p.X + 93f, p.Y - 13f)); crazyStorm.isforshoot = true; crazyStorm.BanSound(true); crazyStorm.effect = true; crazyStorm.specialnotkill = true; crazyStorm.SetOPos(new Vector2(p.X + 93f, p.Y - 13f)); Program.game.game.PlaySound("ch", true, p.X); } if (!this.inited) { this.inited = true; for (int index = 0; index < l; ++index) { this.sprites.Add(new Sprite(this.tex, new Rectangle(59, 61, 41, 41))); this.sprites[this.sprites.Count - 1].origin = new Vector2(21f, 21f); this.sprites[this.sprites.Count - 1].scale = Vector2.Zero; this.sprites[this.sprites.Count - 1].color.a = 1f; } switch (l) { case 1: this.sprites[0].position = new Vector2(0.0f, -30f); break; case 2: this.sprites[0].position = new Vector2(-30f, 0.0f); this.sprites[1].position = new Vector2(30f, 0.0f); break; case 3: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(-30f, 0.0f); this.sprites[2].position = new Vector2(30f, 0.0f); break; case 4: this.sprites[0].position = new Vector2(0.0f, -30f); this.sprites[1].position = new Vector2(0.0f, 30f); this.sprites[2].position = new Vector2(-30f, 0.0f); this.sprites[3].position = new Vector2(30f, 0.0f); break; } } for (int index = 0; index < this.sprites.Count; ++index) { this.sprites[index].scale += new Vector2(0.06f, 0.06f); if ((double)this.sprites[index].scale.X >= 0.800000011920929) { this.sprites[index].scale = new Vector2(0.8f, 0.8f); } this.sprites[index].rotation = 10f * (float)Math.Sin((double)this.time / 40.0 * Math.PI); } }