Пример #1
0
        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);
        }
Пример #2
0
        public void Update(CSManager csm, EnemyManager e, Boss b)
        {
            praticle.posrect = new Vector4(body.position.X, body.position.Y, 0.0f, 0.0f);
            equip.Update(b, e, type, mattribute.CHILDREN, eqlevel, body.position, Dis | Ban | BanShoot);
            SelfBarrageManager.Update(e, b, this);
            ++f;
            if (f % 3 == 0)
            {
                if (flash <= 40)
                {
                    ++flash;
                }
                if (flash % 2 == 0)
                {
                    body.color.r = 0.0f;
                    body.color.g = 0.0f;
                }
                else
                {
                    body.color.r = 1f;
                    body.color.g = 1f;
                }
            }
            if (f == 6)
            {
                f = 0;
                ++ani;
                if (ani == 7)
                {
                    ani = 0;
                }
            }
            eqlevel  = Program.game.game.Point / 50;
            runtime += Time.Stop;
            if (body.position.X >= rangex.X && body.position.X <= rangex.Y && (body.position.Y >= rangey.X && body.position.Y <= rangey.Y))
            {
                int num1 = -1;
                if (!Dis)
                {
                    if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                    {
                        num1   = -90;
                        change = false;
                    }
                    if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                    {
                        num1   = 90;
                        change = false;
                    }
                    if (Main.IsKeyDown(Keys.Left) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Left))
                    {
                        num1 = 180;
                        if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                        {
                            num1 = 225;
                        }
                        if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                        {
                            num1 = 135;
                        }
                    }
                    if (Main.IsKeyDown(Keys.Right) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Right))
                    {
                        num1 = 0;
                        if (Main.IsKeyDown(Keys.Up) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Up))
                        {
                            num1 = -45;
                        }
                        if (Main.IsKeyDown(Keys.Down) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Down))
                        {
                            num1 = 45;
                        }
                    }
                }
                if (num1 != -1)
                {
                    if (runtime - runtimebf >= 1.0)
                    {
                        if (num1 == 225 || num1 == 135 || (num1 == 180 || num1 == 0) || (num1 == -45 || num1 == 45))
                        {
                            ansave = num1;
                            change = true;
                            f3     = 1;
                            ++f2;
                            if (f2 == 3)
                            {
                                switch (num1)
                                {
                                case -45:
                                case 0:
                                case 45:
                                    body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60);
                                    break;

                                case 135:
                                case 180:
                                case 225:
                                    body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60);
                                    break;
                                }
                            }
                            else if (f2 == 7)
                            {
                                ++ani2;
                                if (ani2 >= 4)
                                {
                                    ani2 = 1;
                                }
                                switch (num1)
                                {
                                case -45:
                                case 0:
                                case 45:
                                    body.rect = new Rectangle((11 + ani2) * 60, (int)(type - 1) * 60, 60, 60);
                                    break;

                                case 135:
                                case 180:
                                case 225:
                                    body.rect = new Rectangle((7 + ani2) * 60, (int)(type - 1) * 60, 60, 60);
                                    break;
                                }
                                f2 = 4;
                            }
                        }
                        else
                        {
                            change = false;
                        }
                    }
                    float num2;
                    if (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow))
                    {
                        num2    = Characters.attribute[(int)(type - 1 + 4)].MOVE * 0.5f * speedadd.X;
                        shifted = true;
                    }
                    else
                    {
                        num2 = (float)(1.0 + Characters.attribute[(int)(type - 1)].MOVE * 0.5 * speedadd.Y);
                    }
                    body.position.X = MathHelper.Clamp(body.position.X + num2 * (float)Math.Cos(num1 * Math.PI / 180.0) * Time.Stop, rangex.X, rangex.Y);
                    body.position.Y = MathHelper.Clamp(body.position.Y + num2 * (float)Math.Sin(num1 * Math.PI / 180.0) * Time.Stop, rangey.X, rangey.Y);
                }
                else
                {
                    change = false;
                    f2     = 0;
                    ani2   = 0;
                }
                if (runtime - runtimebf >= 1.0)
                {
                    if (!change && f3 == 0)
                    {
                        body.rect = new Rectangle(ani * 60, (int)(type - 1) * 60, 60, 60);
                    }
                    else if (!change && f3 >= 1)
                    {
                        if (ansave == 225 || ansave == 135 || ansave == 180)
                        {
                            body.rect = new Rectangle(420, (int)(type - 1) * 60, 60, 60);
                        }
                        else if (ansave == 0 || ansave == -45 || ansave == 45)
                        {
                            body.rect = new Rectangle(660, (int)(type - 1) * 60, 60, 60);
                        }
                        ++f3;
                        if (f3 == 4)
                        {
                            f3 = 0;
                        }
                    }
                    runtimebf = runtime;
                }
                Program.game.achivmanager.Check(AchievementType.Hidden, 3, new Hashtable()
                {
                    ["itemline"] = Main.gn.Itemline[(int)(Main.Character - 1)],
                    ["y"]        = body.position.Y
                });
            }
            if ((Dis || free) && Time.Stop == 1.0)
            {
                ++time;
                if (time > 30 && time <= 100)
                {
                    for (int index = 0; index < e.EnemyArray.Count; ++index)
                    {
                        if (!e.EnemyArray[index].IsInWudi() && !e.EnemyArray[index].die && (e.EnemyArray[index].hp > 0 && !Main.IsOut(e.EnemyArray[index].Position)) && Math.Sqrt((e.EnemyArray[index].Position.X - body.position.X) * (e.EnemyArray[index].Position.X - body.position.X) + (e.EnemyArray[index].Position.Y - body.position.Y) * (e.EnemyArray[index].Position.Y - body.position.Y)) < Math.Abs((time - 10) * 10))
                        {
                            e.EnemyArray[index].deadkill = true;
                            e.EnemyArray[index].hp      -= 2;
                        }
                    }
                }
                if (time == 1)
                {
                    Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable()
                    {
                        ["missorjust"] = true
                    });
                    CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "14", new Vector2(body.position.X + 93f, body.position.Y - 13f));
                    crazyStorm.BanSound(true);
                    crazyStorm.effect = true;
                    Program.game.game.PlaySound("pldead00", true, body.position.X);
                    body.color.a = 0.0f;
                }
                else if (time == 30)
                {
                    if (Program.game.game.Point >= 50)
                    {
                        Program.game.game.DeathItem();
                    }
                    Program.game.game.SpecialSystemReset();
                    dead     = true;
                    havedead = true;
                    Program.game.game.Life -= 5;
                    if (Program.game.game.Bomb < 10)
                    {
                        Program.game.game.Bomb = 10 + Program.game.game.Bomb % 5;
                    }
                    if (Program.game.game.Life == 0)
                    {
                        Program.game.game.Life = 0;
                        if (!makeup)
                        {
                            Program.game.game.Point = 150;
                        }
                        makeup = true;
                    }
                    else if (Program.game.game.Life < 0)
                    {
                        alreadycal = true;
                        Program.game.game.PlaySound("pldead01", true, body.position.X);
                        Program.game.game.Life     = -5;
                        Program.game.game.Bomb     = 0;
                        Program.game.game.BanPause = true;
                        makeup = false;
                    }
                }
                else if (time > 30)
                {
                    if (time == 31)
                    {
                        body.position.X = 224f;
                        body.position.Y = 510f;
                    }
                    else if (Program.game.game.Life >= 0 && body.position.Y > 420.0 && !free)
                    {
                        body.position.Y -= 2f;
                        if (body.position.Y <= 420.0)
                        {
                            body.position.Y = 420f;
                        }
                    }
                    if (Program.game.game.Life >= 0)
                    {
                        if (time % 6 < 3)
                        {
                            body.color.r = 0.0f;
                            body.color.g = 0.0f;
                        }
                        else
                        {
                            body.color.r = 1f;
                            body.color.g = 1f;
                        }
                    }
                    body.color.a = 1f;
                }
                if (time == 95)
                {
                    if (!alreadycal)
                    {
                        Program.game.game.AddStgData(1, 0, 0);
                    }
                    else
                    {
                        alreadycal = false;
                    }
                    Dis  = false;
                    free = true;
                    if (Program.game.game.Life == -5)
                    {
                        free = false;
                        Dis  = true;
                        time = 50;
                        Program.game.game.DeathProcess();
                    }
                }
                if (time > 280)
                {
                    free = false;
                    time = 0;
                }
            }
            if (!Ban && !Dis && !BanShoot | type == Cname.PATCHOULI && (Main.IsKeyDown(Keys.Z) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Confirm)))
            {
                BEquipShoot(selfb, type, mattribute.BODY, body.position);
                shot = true;
            }
            if (bomb != null && !bomb.Die)
            {
                bomb.Update(this, csm, e, b);
            }
            else if (bomb != null)
            {
                bomb = null;
                Wudi = false;
                Auto = false;
            }
            int num = type != Cname.SANAE || Main.Mode != Modes.SINGLE || (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift)) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow) ? 5 : 3;

            if (!Ban && (jue <= 10 || free) && (Program.game.game.Bomb >= num && bomb == null) && ((Main.IsKeyPressed(Keys.X) || !Main.Replay && PadState.IsKeyPressed(JOYKEYS.Special, Main.prepadstat)) && Time.Stop != 0.0))
            {
                bombed     = true;
                BanShoot   = true;
                body.color = new Colors(1f, 1f, 1f, 1f);
                if (b != null)
                {
                    Program.game.game.AddStgData(0, 1, 0);
                }
                Program.game.game.Bomb -= num;
                if (Program.game.game.Bomb <= 0)
                {
                    Program.game.game.Bomb = 0;
                }
                if (!free)
                {
                    Dis  = false;
                    time = 0;
                    Program.game.achivmanager.Check(AchievementType.Challenge, 9, new Hashtable()
                    {
                        ["missorjust"] = false
                    });
                }
                Program.game.game.PlaySound("slash", true, body.position.X);
                bomb = new SingleBomb(type, body.position + new Vector2(93f, -13f));
                Wudi = true;
                Auto = true;
            }
            if (Dis || free)
            {
                ++jue;
            }
            else
            {
                jue = 0;
            }
            if (itemm == null)
            {
                return;
            }
            foreach (ItemManager itemManager in itemm)
            {
                if (!Dis)
                {
                    itemManager.Ban(false);
                }
                else
                {
                    itemManager.Ban(true);
                }
                itemManager.Transpos(body.position.X, body.position.Y);
            }
        }
Пример #3
0
Файл: Boss.cs Проект: THSJF/sjf
 private void SpecialUpdate()
 {
     if (this.type != 8)
     {
         return;
     }
     if (this.passedCards >= 2)
     {
         this.originsize          = this.fscenter["OriginSize"];
         this.fsrect["Throne"]    = new Rectangle(0, 1812, 137, 180);
         this.sppraticle.posrect  = new Vector4(this.Position.X - 40f, this.Position.Y, 45f, 45f);
         this.sppraticle2.posrect = new Vector4(this.Position.X - 10f, this.Position.Y, 45f, 45f);
         if (this.passedCards == 2 && this.CardArray[0].CurrentTime < 120)
         {
             this.spposition = this.position;
         }
         else
         {
             this.spposition.Y += (float)((-200.0 - (double)this.spposition.Y) / 120.0);
         }
     }
     else
     {
         this.originsize          = new Vector2(0.0f, 0.0f);
         this.spposition          = this.position;
         this.sppraticle.posrect  = new Vector4(this.spposition.X - 105f, this.spposition.Y, 45f, 45f);
         this.sppraticle2.posrect = new Vector4(this.spposition.X + 65f, this.spposition.Y, 45f, 45f);
     }
     this.floatimage               = (float)(5.0 + 5.0 * Math.Abs(Math.Sin((double)this.time / Math.PI / 10.0)));
     this.fsposition["Throne"]     = new Vector2(this.spposition.X, this.spposition.Y - 30f);
     this.fsposition["BackBone"]   = new Vector2(this.spposition.X + 6f, this.spposition.Y - 10f);
     this.fsposition["Skull"]      = new Vector2(this.spposition.X, this.spposition.Y + 50f);
     this.fsposition["LeftWing1"]  = new Vector2(this.spposition.X - 40f, this.spposition.Y + 60f);
     this.fsposition["RightWing1"] = new Vector2(this.spposition.X + 40f, this.spposition.Y + 60f);
     this.fsposition["LeftWing2"]  = new Vector2(this.spposition.X - 50f, this.spposition.Y + 50f);
     this.fsposition["RightWing2"] = new Vector2(this.spposition.X + 50f, this.spposition.Y + 50f);
     this.fsposition["LeftWing3"]  = new Vector2(this.spposition.X - 80f, this.spposition.Y + 40f);
     this.fsposition["RightWing3"] = new Vector2(this.spposition.X + 80f, this.spposition.Y + 40f);
     this.fsposition["LeftFlag1"]  = new Vector2(this.spposition.X - 65f, this.spposition.Y + 60f);
     this.fsposition["RightFlag1"] = new Vector2(this.spposition.X + 65f, this.spposition.Y + 60f);
     this.fsposition["LeftFlag2"]  = new Vector2(this.spposition.X - 100f, this.spposition.Y + 40f);
     this.fsposition["RightFlag2"] = new Vector2(this.spposition.X + 100f, this.spposition.Y + 40f);
     if (this.time % 7 == 0)
     {
         Dictionary <string, int> fsframe;
         (fsframe = this.fsframe)["Flag"] = fsframe["Flag"] + 1;
         if (this.fsframe["Flag"] >= 9)
         {
             this.fsframe["Flag"] = 0;
         }
         if (this.CardArray.Count >= 8)
         {
             this.fsrect["Flag"]     = new Rectangle(417 + this.fsframe["Flag"] * 50, this.fsrect["Flag"].Y, this.fsrect["Flag"].Width, this.fsrect["Flag"].Height);
             this.fsrect["BackFlag"] = new Rectangle(417 + this.fsframe["Flag"] * 50, this.fsrect["BackFlag"].Y, this.fsrect["BackFlag"].Width, this.fsrect["BackFlag"].Height);
         }
         else
         {
             this.fsrect["Flag"]     = new Rectangle(417 + this.fsframe["Flag"] * 50, 1627, this.fsrect["Flag"].Width, this.fsrect["Flag"].Height);
             this.fsrect["BackFlag"] = new Rectangle(417 + this.fsframe["Flag"] * 50, 1847, this.fsrect["BackFlag"].Width, this.fsrect["BackFlag"].Height);
         }
     }
     if (this.CardArray.Count < 6)
     {
         if (!this.level1)
         {
             CrazyStorm crazyStorm1 = Program.game.game.PlayEffect(true, "8", new Vector2(this.Position.X + 93f, (float)((double)this.Position.Y + 50.0 - 13.0)));
             crazyStorm1.BanSound(true);
             crazyStorm1.effect = true;
             CrazyStorm crazyStorm2 = Program.game.game.PlayEffect(true, "8", new Vector2((float)((double)this.Position.X - 50.0 + 93.0), (float)((double)this.Position.Y + 50.0 - 13.0)));
             crazyStorm2.BanSound(true);
             crazyStorm2.effect = true;
             CrazyStorm crazyStorm3 = Program.game.game.PlayEffect(true, "8", new Vector2((float)((double)this.Position.X + 50.0 + 93.0), (float)((double)this.Position.Y + 50.0 - 13.0)));
             crazyStorm3.BanSound(true);
             crazyStorm3.effect = true;
             this.level1        = true;
         }
         this.fsrect["Skull"] = new Rectangle(524, 1300, 178, 164);
     }
     if (this.CardArray.Count >= 2)
     {
         this.sppraticle.Update();
         this.sppraticle2.Update();
         this.sppraticle.stop  = false;
         this.sppraticle2.stop = false;
         this.praticle2.stop   = true;
     }
     else
     {
         this.praticle2.stop   = false;
         this.sppraticle.stop  = true;
         this.sppraticle2.stop = true;
     }
     if (this.CardArray.Count < 6 && this.CardArray.Count >= 4)
     {
         this.fsrect["Wing"] = new Rectangle(104, 1617, 104, 169);
     }
     else
     {
         if (this.CardArray.Count >= 4 || this.CardArray.Count < 2)
         {
             return;
         }
         if (!this.level2)
         {
             CrazyStorm crazyStorm1 = Program.game.game.PlayEffect(true, "8", new Vector2((float)((double)this.Position.X - 40.0 + 93.0), (float)((double)this.Position.Y + 60.0 - 13.0)));
             crazyStorm1.BanSound(true);
             crazyStorm1.effect = true;
             CrazyStorm crazyStorm2 = Program.game.game.PlayEffect(true, "8", new Vector2((float)((double)this.Position.X + 40.0 + 93.0), (float)((double)this.Position.Y + 60.0 - 13.0)));
             crazyStorm2.BanSound(true);
             crazyStorm2.effect = true;
             this.level2        = true;
         }
         this.fsrect["Wing"] = new Rectangle(312, 1617, 104, 169);
     }
 }
Пример #4
0
 public void Update(Character Player)
 {
     this.praticle.posrect = new Vector4(this.Position.X - 10f, this.Position.Y - 10f, 20f, 20f);
     if (this.barrage != null)
     {
         this.barrage.SetPos(new Vector2(this.Position.X + 93f, this.Position.Y - 13f), false);
     }
     for (int index = 0; index < this.EventArray.Count; ++index)
     {
         if (!this.EventArray[index].stop)
         {
             this.EventArray[index].Update(this);
         }
         else if (this.EventArray[index].stop && this.EventArray[index].Independent)
         {
             this.EventArray.RemoveAt(index);
             --index;
         }
     }
     this.presx       = this.Position.X;
     this.Position.X += this.speed * (float)Math.Cos((double)MathHelper.ToRadians(this.speedf));
     this.Position.Y += this.speed * (float)Math.Sin((double)MathHelper.ToRadians(this.speedf));
     this.sx          = this.Position.X;
     ++this.time;
     this.UpdateSpecial();
     if (!Player.Dis && !Player.free && !Player.Wudi)
     {
         this.Judge(Player);
     }
     if (this.barrage != null && !this.barrage.IsStarted() && this.time >= this.ftime)
     {
         this.barrage.Start();
     }
     if (this.step != Vector2.Zero)
     {
         this.se = (double)this.sx >= (double)this.presx ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
         if ((double)this.presx != (double)this.sx && !this.turned)
         {
             this.ns = (int)this.step.X;
         }
         if ((double)this.presx == (double)this.sx && this.turned)
         {
             if (this.prese == SpriteEffects.FlipHorizontally)
             {
                 this.se = this.prese;
             }
             this.ns = (int)this.step.X;
         }
         if (this.time % 7 == 0)
         {
             if ((double)this.presx == (double)this.sx)
             {
                 this.turned = false;
                 ++this.ns;
                 if ((double)this.ns >= (double)this.step.X)
                 {
                     this.ns = 0;
                 }
             }
             else
             {
                 this.turned = true;
                 ++this.ns;
                 if (this.typeid != 4)
                 {
                     if ((double)this.ns >= (double)this.step.X + (double)this.step.Y)
                     {
                         this.ns = (int)this.step.X + 1;
                     }
                 }
                 else if ((double)this.ns >= (double)this.step.X + (double)this.step.Y)
                 {
                     this.ns = (int)((double)this.step.X + (double)this.step.Y) - 1;
                 }
             }
         }
     }
     if (this.time >= this.life)
     {
         this.die = true;
         this.praticle.Delete();
         if (this.epraticle != null)
         {
             this.epraticle.Delete();
         }
         if (this.barrage != null)
         {
             this.barrage.Close();
         }
     }
     this.prese = this.se;
     if (this.hp > 0)
     {
         return;
     }
     this.hp = 0;
     if (!this.die)
     {
         CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, (this.color + 7).ToString(), new Vector2(this.Position.X + 93f, this.Position.Y - 13f));
         crazyStorm.BanSound(true);
         crazyStorm.effect = true;
     }
     this.die = true;
     this.praticle.Delete();
     if (this.epraticle != null)
     {
         this.epraticle.Delete();
     }
     if (this.barrage != null)
     {
         this.barrage.Close();
     }
     if (this.items == null || this.mana)
     {
         return;
     }
     if (this.pdie != null)
     {
         this.pdie();
     }
     Program.game.game.PlaySound("enep00", true, this.Position.X);
     if (!this.deadkill)
     {
         Program.game.game.AddStgData(0, 0, 1);
     }
     Program.game.game.Score += 20000L;
     this.items.Shoot(this.Position, Math.Max(this.originsize.X, this.originsize.Y), Player, (Boss)null);
 }
Пример #5
0
        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);
            }
        }
Пример #6
0
        private void S_BOMB(int l, Vector2 p, bool Ban)
        {
            if (!this.inited)
            {
                this.inited = true;
                for (int index = 0; index < l; ++index)
                {
                    this.sprites.Add(new Sprite(this.tex, new Rectangle(103, 61, 41, 41)));
                    this.sprites[this.sprites.Count - 1].origin  = new Vector2(20f, 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(-22f, 10f);
                    this.sprites[1].position = new Vector2(22f, 10f);
                    this.sprites[2].position = new Vector2(-40f, 0.0f);
                    this.sprites[3].position = new Vector2(40f, 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 * Time.Stop;
            }
            if ((double)Time.Stop == 1.0)
            {
                if (!Ban && (Main.IsKeyDown(Keys.LeftShift) || Main.IsKeyDown(Keys.RightShift) || !Main.Replay && PadState.IsKeyDown(JOYKEYS.Slow)))
                {
                    switch (l)
                    {
                    case 1:
                        this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0);
                        break;

                    case 2:
                        this.sprites[0].position.X += (float)((-17.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-11.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((17.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((-11.0 - (double)this.sprites[1].position.Y) / 5.0);
                        break;

                    case 3:
                        this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((-20.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((-10.0 - (double)this.sprites[1].position.Y) / 5.0);
                        this.sprites[2].position.X += (float)((20.0 - (double)this.sprites[2].position.X) / 5.0);
                        this.sprites[2].position.Y += (float)((-10.0 - (double)this.sprites[2].position.Y) / 5.0);
                        break;

                    case 4:
                        this.sprites[0].position.X += (float)((-12.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-25.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((12.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((-25.0 - (double)this.sprites[1].position.Y) / 5.0);
                        this.sprites[2].position.X += (float)((-26.0 - (double)this.sprites[2].position.X) / 5.0);
                        this.sprites[2].position.Y += (float)((-5.0 - (double)this.sprites[2].position.Y) / 5.0);
                        this.sprites[3].position.X += (float)((26.0 - (double)this.sprites[3].position.X) / 5.0);
                        this.sprites[3].position.Y += (float)((-5.0 - (double)this.sprites[3].position.Y) / 5.0);
                        break;
                    }
                }
                else
                {
                    switch (l)
                    {
                    case 1:
                        this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0);
                        break;

                    case 2:
                        this.sprites[0].position.X += (float)((-30.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((0.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((30.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0);
                        break;

                    case 3:
                        this.sprites[0].position.X += (float)((0.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((-30.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((-30.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((0.0 - (double)this.sprites[1].position.Y) / 5.0);
                        this.sprites[2].position.X += (float)((30.0 - (double)this.sprites[2].position.X) / 5.0);
                        this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0);
                        break;

                    case 4:
                        this.sprites[0].position.X += (float)((-22.0 - (double)this.sprites[0].position.X) / 5.0);
                        this.sprites[0].position.Y += (float)((10.0 - (double)this.sprites[0].position.Y) / 5.0);
                        this.sprites[1].position.X += (float)((22.0 - (double)this.sprites[1].position.X) / 5.0);
                        this.sprites[1].position.Y += (float)((10.0 - (double)this.sprites[1].position.Y) / 5.0);
                        this.sprites[2].position.X += (float)((-40.0 - (double)this.sprites[2].position.X) / 5.0);
                        this.sprites[2].position.Y += (float)((0.0 - (double)this.sprites[2].position.Y) / 5.0);
                        this.sprites[3].position.X += (float)((40.0 - (double)this.sprites[3].position.X) / 5.0);
                        this.sprites[3].position.Y += (float)((0.0 - (double)this.sprites[3].position.Y) / 5.0);
                        break;
                    }
                }
            }
            foreach (SelfBarrage sb in SelfBarrageManager.SBArray)
            {
                if (sb.label == 1 && ((double)sb.time >= 60.0 || sb.Judged))
                {
                    Program.game.game.PlaySound("explo", true, sb.Position.X);
                    CrazyStorm crazyStorm = Program.game.game.PlayEffect(true, "1", new Vector2(sb.Position.X + 93f, sb.Position.Y - 13f));
                    crazyStorm.isforshoot = true;
                    crazyStorm.BanSound(true);
                    crazyStorm.shoot.AddRange((IEnumerable <byte>) new List <byte>()
                    {
                        (byte)0,
                        (byte)1
                    });
                    crazyStorm.effect = true;
                    crazyStorm.allpan = true;
                    crazyStorm.bomb   = true;
                    sb.Judged         = true;
                    sb.label          = 0;
                }
            }
        }