public void ForTheKING() { Random rand = new Random(); if (150 <= lifecycle && lifecycle <= 250) { GameGlobal.FatboizPassMob(this, new Imp(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); } if (550 <= lifecycle && lifecycle <= 650) { GameGlobal.FatboizPassMob(this, new Elector(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); } if (1050 <= lifecycle && lifecycle <= 1150) { int gunnerchance = rand.Next(100); if (gunnerchance <= 25) //1 cú nerf :v { GameGlobal.FatboizPassMob(this, new Gunner(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); } } if (1550 <= lifecycle && lifecycle <= 1600) { GameGlobal.FatboizPassMob(this, new Elector(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); GameGlobal.FatboizPassMob(this, new Imp(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); int gunnerchance = rand.Next(100); if (gunnerchance <= 25) //1 cú nerf :v { GameGlobal.FatboizPassMob(this, new Gunner(new Vector2(rand.Next((int)(pos.X - 300), (int)(pos.X + 300)), rand.Next((int)(pos.Y - 300), (int)(pos.Y + 300))))); } } }
public void SprayAndPray(Hero HERO) //Chuột chít chíu chíu { if (Global.GetDistance(HERO.pos, pos) < 700) { speed = 2; GameGlobal.GunnerPassProjectiles(this, new GunnerProjectiles(pos, new Vector2(35, 35), false, pos, HERO.pos)); } }
public void MultiBullet() { MouseState mousestate = Mouse.GetState(); GameGlobal.PassProjectiles(new Fireball(new Vector2(pos.X, pos.Y), new Vector2(35, 35), false, this.pos, new Vector2(mousestate.X + cursor.pos.X, mousestate.Y + cursor.pos.Y))); GameGlobal.PassProjectiles(new Fireball(new Vector2(pos.X, pos.Y), new Vector2(35, 35), false, this.pos, new Vector2(mousestate.X + cursor.pos.X + 50, mousestate.Y + cursor.pos.Y + 50))); GameGlobal.PassProjectiles(new Fireball(new Vector2(pos.X, pos.Y), new Vector2(35, 35), false, this.pos, new Vector2(mousestate.X + cursor.pos.X - 50, mousestate.Y + cursor.pos.Y - 50))); }
public void RocketGrab(Hero HERO) { if ((250 <= lifecycle && lifecycle <= 500) || (750 <= lifecycle && lifecycle <= 1000) || (1250 <= lifecycle && lifecycle <= 1500) || (1750 <= lifecycle && lifecycle <= 2000)) { Random rand = new Random(); GameGlobal.BlitzHook(this, new BlitzHands(pos, new Vector2(150, 150), false, pos, HERO.pos + new Vector2(rand.Next(-350, 350), rand.Next(-350, 350)))); } }
public void GatlingGun(Hero HERO) { if (250 == lifecycle || 750 == lifecycle || 1250 == lifecycle || 1750 == lifecycle) { Global.soundcontrol.PLaySound("GatlingGun"); } if ((250 <= lifecycle && lifecycle <= 375) || (750 <= lifecycle && lifecycle <= 875) || (1250 <= lifecycle && lifecycle <= 1375) || (1750 <= lifecycle && lifecycle <= 1875)) { Random rand = new Random(); GameGlobal.FatboizPassProjectiles(this, new FatboizProjectiles(pos, new Vector2(50, 50), false, pos, HERO.pos + new Vector2(rand.Next(-350, 350), rand.Next(-350, 350)))); } }
public virtual void SpawnMob() { Random rand = new Random(); int spawnplace = rand.Next(0, 100); int whatmob = rand.Next(0, 100); if (0 <= spawnplace && spawnplace < 25) { if (0 <= GameGlobal.gametimepassed && GameGlobal.gametimepassed < 1000) { GameGlobal.PassMob(new Imp(new Vector2(100, 100))); } if (1000 <= GameGlobal.gametimepassed) { if (0 <= whatmob && whatmob < 40) { GameGlobal.PassMob(new Elector(new Vector2(100, 100))); } if (40 <= whatmob && whatmob < 55) { GameGlobal.PassMob(new Gunner(new Vector2(100, 100))); } if (55 <= whatmob && whatmob < 100) { GameGlobal.PassMob(new Imp(new Vector2(100, 100))); } } } if (25 <= spawnplace && spawnplace < 50) { if (0 <= GameGlobal.gametimepassed && GameGlobal.gametimepassed < 1000) { GameGlobal.PassMob(new Imp(new Vector2(3800, 100))); } if (1000 < GameGlobal.gametimepassed) { if (0 <= whatmob && whatmob < 40) { GameGlobal.PassMob(new Elector(new Vector2(3800, 100))); } if (40 <= whatmob && whatmob < 55) { GameGlobal.PassMob(new Gunner(new Vector2(3800, 100))); } if (55 <= whatmob && whatmob < 100) { GameGlobal.PassMob(new Imp(new Vector2(3800, 100))); } } } if (50 <= spawnplace && spawnplace < 75) { if (0 <= GameGlobal.gametimepassed && GameGlobal.gametimepassed < 1000) { GameGlobal.PassMob(new Imp(new Vector2(100, 3800))); } if (1000 < GameGlobal.gametimepassed) { if (0 <= whatmob && whatmob < 40) { GameGlobal.PassMob(new Elector(new Vector2(100, 3800))); } if (40 <= whatmob && whatmob < 55) { GameGlobal.PassMob(new Gunner(new Vector2(100, 3800))); } if (55 <= whatmob && whatmob < 100) { GameGlobal.PassMob(new Imp(new Vector2(100, 3800))); } } } if (75 <= spawnplace && spawnplace < 100) { if (0 <= GameGlobal.gametimepassed && GameGlobal.gametimepassed < 1000) { GameGlobal.PassMob(new Imp(new Vector2(3800, 3800))); } if (1000 < GameGlobal.gametimepassed) { if (0 <= whatmob && whatmob < 40) { GameGlobal.PassMob(new Elector(new Vector2(3800, 3800))); } if (40 <= whatmob && whatmob < 55) { GameGlobal.PassMob(new Gunner(new Vector2(3800, 3800))); } if (55 <= whatmob && whatmob < 100) { GameGlobal.PassMob(new Imp(new Vector2(3800, 3800))); } } } }
public override void Update(Vector2 OFFSET) { KeyboardState keystate = Keyboard.GetState(); MouseState mousestate = Mouse.GetState(); #region Hero Movement & Skill if ((keystate.IsKeyDown(Keys.A) || keystate.IsKeyDown(Keys.Left)) && !isdead && !triggergotohell && isstunned == false) { if (GameGlobal.herotouchscreen(this)) { pos = new Vector2(pos.X - speed, pos.Y); cursor.pos = new Vector2(cursor.pos.X - speed, cursor.pos.Y); } else { if (life > 0) { triggergotohell = true; } } } if ((keystate.IsKeyDown(Keys.D) || keystate.IsKeyDown(Keys.Right)) && !isdead && !triggergotohell && isstunned == false) { if (GameGlobal.herotouchscreen(this)) { pos = new Vector2(pos.X + speed, pos.Y); cursor.pos = new Vector2(cursor.pos.X + speed, cursor.pos.Y); } else { if (life > 0) { triggergotohell = true; } } } if ((keystate.IsKeyDown(Keys.W) || keystate.IsKeyDown(Keys.Up)) && !isdead && !triggergotohell && isstunned == false) { if (GameGlobal.herotouchscreen(this)) { pos = new Vector2(pos.X, pos.Y - speed); cursor.pos = new Vector2(cursor.pos.X, cursor.pos.Y - speed); } else { if (life > 0) { triggergotohell = true; } } } if ((keystate.IsKeyDown(Keys.S) || keystate.IsKeyDown(Keys.Down)) && !isdead && !triggergotohell && isstunned == false) { if (GameGlobal.herotouchscreen(this)) { pos = new Vector2(pos.X, pos.Y + speed); cursor.pos = new Vector2(cursor.pos.X, cursor.pos.Y + speed); } else { if (life > 0) { triggergotohell = true; } } } if (keystate.IsKeyDown(Keys.Space) && !isdead && !triggergotohell && isstunned == false) { Swift(); } if (triggeredSwift) { SwiftEffect(); timeSwift -= 2.5f; if (timeSwift <= 0) { triggeredSwift = false; // /=2 if (GameGlobal.gametimepassed < 2000) { speed = 5; } if (2000 <= GameGlobal.gametimepassed && GameGlobal.gametimepassed < 7500) { speed = 6; } if (7500 <= GameGlobal.gametimepassed) { speed = 8; } } } if (keystate.IsKeyDown(Keys.F)) { GameGlobal.triggerNuclear(); } #endregion rot = Global.RotateTowards(pos, new Vector2(mousestate.X + cursor.pos.X, mousestate.Y + cursor.pos.Y)); if (mousestate.LeftButton == ButtonState.Pressed) { if (isdead == false) { if (!IsCrit(critchance)) { if (GameGlobal.triggerboostatkspeed) { MultiBullet(); } else { GameGlobal.PassProjectiles(new Fireball(pos, new Vector2(35, 35), false, this.pos, new Vector2(mousestate.X + cursor.pos.X, mousestate.Y + cursor.pos.Y))); } } else { GameGlobal.PassProjectiles(new Fireball(pos, new Vector2(70, 70), true, this.pos, new Vector2(mousestate.X + cursor.pos.X, mousestate.Y + cursor.pos.Y))); } } } #region Buff TriggerHealing(); TriggerExtraHealth(); TriggerExtraCrit(); TriggerExtraLife(); UnrealAttack = 35 + GameGlobal.extradamage; #endregion if (IsDeadYet(currenthealth)) { if (life > 0) { triggergotohell = true; } } if (DeadEffect()) { Dead(); Respawn(); } if (2000 == GameGlobal.gametimepassed) { speed = 6; } if (7500 == GameGlobal.gametimepassed) { speed = 8; } base.Update(OFFSET); }