public static Brawler GetBrawler() { float chance = instance.luckyFactor; Brawler brawler = null; chance += Random.value; if (chance > 1f) { brawler = GetRandomBrawler(Brawler.Rarity.Normal); } if (chance > 1.4f) { brawler = GetRandomBrawler(Brawler.Rarity.Rare); } if (chance > 1.6f) { brawler = GetRandomBrawler(Brawler.Rarity.SuperRare); } if (chance > 1.8f) { brawler = GetRandomBrawler(Brawler.Rarity.Epic); } if (chance > 1.9f) { brawler = GetRandomBrawler(Brawler.Rarity.Mythical); } if (chance > 2) { brawler = GetRandomBrawler(Brawler.Rarity.Legendary); } return(brawler); }
protected override void Awake() { base.Awake(); Assert.IsTrue(NPCBehavior is NPCBrawlerBehavior); Brawler = GetComponent <Brawler>(); }
public static void HandleAbnormalityEnd(S_ABNORMALITY_END p) { AbnormalityManager.EndAbnormality(p.TargetId, p.AbnormalityId); if (!SettingsManager.ClassWindowSettings.Enabled) { return; } switch (SessionManager.CurrentPlayer.Class) { case Class.Archer: Archer.CheckFocusEnd(p); Archer.CheckSniperEyeEnd(p); break; case Class.Warrior: Warrior.CheckBuffEnd(p); break; case Class.Lancer: Lancer.CheckLineHeldEnd(p); Lancer.CheckArushEnd(p); Lancer.CheckGshoutEnd(p); break; case Class.Mystic: Mystic.CheckBuffEnd(p); break; case Class.Brawler: Brawler.CheckBrawlerAbnormalEnd(p); break; case Class.Ninja: Ninja.CheckFocusEnd(p); break; case Class.Priest: Priest.CheckBuffEnd(p); break; case Class.Sorcerer: Sorcerer.CheckBuffEnd(p); break; case Class.Reaper: Reaper.CheckBuffEnd(p); break; case Class.Slayer: Slayer.CheckBuffEnd(p); break; case Class.Berserker: Berserker.CheckBuffEnd(p); break; } }
private void Brawler2_Click(object sender, RoutedEventArgs e) { //MessageBox.Show("Brawler"); this.Hide(); Brawler brawler = new Brawler(); brawler.ShowDialog(); this.Show(); }
protected override void Awake() { base.Awake(); Assert.IsTrue(PlayerInput is PlayerInput); Assert.IsTrue(PlayerBehavior is PlayerBehavior); Brawler = GetComponent <Brawler>(); }
/// <summary> /// Private helper method (to be refactored/potentially moved) that /// allows the creation of a Party of heroes (currently allows 3 members). /// </summary> private void CreateQuestParty() { //Input help information - print to the console Console.WriteLine(); Console.WriteLine("Create your Party (BRW = Brawler, CLR = Cleric, MAG = Mage, NEC = Necromancer, THF = Thief)..."); //Loop three times and allow the creation of the relevant heroes for (int i = 0; i < 3; i++) { //Create a new hero (based on user selection) Console.WriteLine(); Console.Write("Choose your hero number {0}: ", i); Hero newHero = null; switch (Utils.InterpretUserInput(Console.ReadLine())) { case GameAction.ClericChosen: { newHero = new Cleric(); } break; case GameAction.MageChosen: { newHero = new Mage(); } break; case GameAction.NecromancerChosen: { newHero = new Necromancer(); } break; case GameAction.ThiefChosen: { newHero = new Thief(); } break; case GameAction.BrawlerChosen: default: { newHero = new Brawler(); } break; } //Safety check - Only add the hero if it's set correctly if (newHero != null) { partyMembers.Add(newHero); Console.WriteLine("{0} added to the Party.", newHero.GetType().Name); } } }
private void saveBtn_Click(object sender, EventArgs e) { if (!(tbCharName.Text.Length == 0)) { selectedChar.CharacterName = tbCharName.Text; } else { System.Windows.Forms.MessageBox.Show("Character name cannot be empty."); return; } selectedChar.Health = healthSlider.Value; //Updating character values selectedChar.CharacterExperience = Convert.ToInt32(experienceIn.Value); selectedChar.WeightLimit = Convert.ToDouble(weightLimitIn.Value); if (selectedChar is BlackWitch) { BlackWitch temp = selectedChar as BlackWitch; temp.DarkPower = Convert.ToInt32(polyNumeric1.Value); temp.MagicProficiency = Convert.ToInt32(polyNumeric2.Value); selectedChar = temp; } if (selectedChar is Brawler) { Brawler temp = selectedChar as Brawler; temp.PunchDamage = Convert.ToInt32(polyNumeric1.Value); temp.Strength = Convert.ToInt32(polyNumeric2.Value); selectedChar = temp; } if (selectedChar is Cleric) { Cleric temp = selectedChar as Cleric; temp.PietyLevel = Convert.ToInt32(polyNumeric1.Value); selectedChar = temp; } if (selectedChar is Orc) { Orc temp = selectedChar as Orc; temp.Ferociousness = Convert.ToInt32(polyNumeric1.Value); temp.Strength = Convert.ToInt32(polyNumeric2.Value); selectedChar = temp; } editingMenuPanel.Hide(); charLayoutPanel.Controls.Clear(); displayCharacters(); selectedChar = null; }
public void CombatTestOne() { //Setup the aggressor and defender ICombatant supporting objects ICombatant aggressor = new Brawler(), defender = new Skeleton(); //Handle the combat. Take the defenders previous health and obtain the damage done from StaticGameActions.HandleCombat call int defenderPreviousHealth = defender.Health, damageDone = StaticGameActions.HandleCombat(aggressor, defender); //Test that the defenders health has been subtracted properly (TODO - Handle dead defenders and make sure this works if a defender is overkilled) Assert.AreEqual <int>((defenderPreviousHealth - damageDone), defender.Health); }
private static Brawler GetRandomBrawler(Brawler.Rarity rarity) { Brawler brawler = null; Brawler[] brawlersSorted; brawlersSorted = instance.Brawlers.FindAll(x => x.RarityType == rarity).ToArray(); brawler = brawlersSorted[Random.Range(0, brawlersSorted.Length)]; return(brawler); }
public static void HandleAbnormalityRefresh(S_ABNORMALITY_REFRESH p) { AbnormalityManager.BeginAbnormality(p.AbnormalityId, p.TargetId, p.Duration, p.Stacks); if (!SettingsManager.ClassWindowSettings.Enabled) { return; } switch (SessionManager.CurrentPlayer.Class) { case Class.Warrior: Warrior.CheckBuff(p); break; case Class.Archer: Archer.CheckFocus(p); Archer.CheckFocusX(p); Archer.CheckSniperEye(p); break; case Class.Lancer: Lancer.CheckLineHeld(p); break; case Class.Priest: Priest.CheckBuff(p); break; case Class.Mystic: Mystic.CheckBuff(p); break; case Class.Sorcerer: Sorcerer.CheckBuff(p); break; case Class.Reaper: Reaper.CheckBuff(p); break; case Class.Slayer: Slayer.CheckBuff(p); break; case Class.Berserker: Berserker.CheckBuff(p); break; case Class.Brawler: Brawler.CheckBrawlerAbnormal(p); break; } }
private void saveBtn_Click(object sender, EventArgs e) { if (!(tbCharName.Text.Length == 0)) { newChar.CharacterName = tbCharName.Text; } else { System.Windows.Forms.MessageBox.Show("Character name cannot be empty."); return; } newChar.Health = healthSlider.Value; newChar.CharacterExperience = Convert.ToInt32(experienceIn.Value); newChar.WeightLimit = Convert.ToDouble(weightLimitIn.Value); if (newChar is BlackWitch) { BlackWitch temp = newChar as BlackWitch; temp.DarkPower = Convert.ToInt32(polyNumeric1.Value); temp.MagicProficiency = Convert.ToInt32(polyNumeric2.Value); newChar = temp; } if (newChar is Brawler) { Brawler temp = newChar as Brawler; temp.PunchDamage = Convert.ToInt32(polyNumeric1.Value); temp.Strength = Convert.ToInt32(polyNumeric2.Value); newChar = temp; } if (newChar is Cleric) { Cleric temp = newChar as Cleric; temp.PietyLevel = Convert.ToInt32(polyNumeric1.Value); newChar = temp; } if (newChar is Orc) { Orc temp = newChar as Orc; temp.Ferociousness = Convert.ToInt32(polyNumeric1.Value); temp.Strength = Convert.ToInt32(polyNumeric2.Value); newChar = temp; } charList.Add(newChar); originForm.displayCharacters(); this.Close(); }
public void SetAttack(Brawler brawler, [NotNull] AttackData attackData, Vector3 direction) { _brawler = brawler; _attackData = attackData; _direction = direction; Vector3 offset = _attackData.AttackVolumeOffset; offset.x *= Mathf.Sign(direction.x); Offset = offset; Size = _attackData.AttackVolumeSize; BoneFollower.SetBone(attackData.BoneName); }
// Update is called once per frame void Update() { elapsedSinceSpawn += Time.deltaTime; if (elapsedSinceSpawn >= spawnDelay) { if (liveEnemies.Count < enemyCap) { GameObject newEnemyObj = Instantiate(enemyPrefab); newEnemyObj.transform.position = myCell.transform.position; Brawler newBrawler = newEnemyObj.GetComponent <Brawler>(); newBrawler.SetStartingCell(myCell); newBrawler.SetGenerator(this); liveEnemies.Add(newEnemyObj); } elapsedSinceSpawn = 0; } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); Brawler enemy = target as Brawler; if (GUILayout.Button("Add Waypoint")) { enemy.AddWaypoint(); } if (GUILayout.Button("Fetch Waypoints")) { enemy.GetWaypoints(); } if (GUILayout.Button("Clear Waypoints")) { enemy.ClearWaypoints(); } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag != "Trigger" && other.gameObject.tag != "Player" && other.gameObject.tag != "ShooterBullet") { switch (other.gameObject.tag) { case "Shooter": Shooter hitShooter = other.GetComponentInParent <Shooter>(); hitShooter.SubHealth(); break; case "Brawler": Brawler hitBrawler = other.GetComponentInParent <Brawler>(); hitBrawler.SubHealth(); break; case "Ghost": Ghost hitGhost = other.GetComponentInParent <Ghost>(); hitGhost.SubHealth(); break; case "BrawlerGenerator": BrawlerGenerator hitBrawlerGenerator = other.GetComponentInParent <BrawlerGenerator>(); hitBrawlerGenerator.SubHealth(); break; case "GhostGenerator": GhostGenerator hitGhostGenerator = other.GetComponentInParent <GhostGenerator>(); hitGhostGenerator.SubHealth(); break; case "ShooterGenerator": ShooterGenerator hitShooterGenerator = other.GetComponentInParent <ShooterGenerator>(); hitShooterGenerator.SubHealth(); break; default: break; } Destroy(this.gameObject); Debug.Log(other.gameObject.name); } }
private void SpawnBrawler() { int numColumns = NumCellsX; int numRows = NumCellsZ; int spawnColumn = Random.Range(MinEnemyDistFromPlayer, numColumns); int spawnRow = Random.Range(MinEnemyDistFromPlayer, numRows); Cell brawlerSpawnCell = GetCellAt(spawnColumn, spawnRow); Vector3 cellpos = brawlerSpawnCell.transform.position; Vector3 spawnPos = new Vector3(cellpos.x, 0.0f, cellpos.z); GameObject BrawlerObj = Instantiate(brawlerPrefab); BrawlerObj.transform.position = spawnPos; Brawler newBrawler = BrawlerObj.GetComponent <Brawler>(); newBrawler.SetStartingCell(brawlerSpawnCell); }
public Card(string name) { this.name = name; if(!name.ToLower().Equals("no counter")) { string[] card = name.Split('_'); Character temp; num = int.Parse(card[1]); if (card[0].Equals("cardHero")) { temp = new Hero(); makeCard(temp.cards[num]); } else if (card[0].Equals("cardLuchador")) { temp = new Luchador(); makeCard(temp.cards[num]); } else if (card[0].Equals("cardBrawler")) { temp = new Brawler(); makeCard(temp.cards[num]); } else if (card[0].Equals("cardGiant")) { temp = new Giant(); makeCard(temp.cards[num]); } else if (card[0].Equals("cardTechnician")) { temp = new Technician(); makeCard(temp.cards[num]); } } }
public ActionResult <Brawler> UpdateBrawler([FromBody] Brawler brawler) { context.Brawlers.Update(brawler); context.SaveChanges(); return(Created("", brawler)); }
/// <summary> /// Decodes the <see cref="Message" />, using the <see cref="Reader" /> instance. /// </summary> internal override void Decode() { this.Player.HighID = this.Reader.ReadVInt(); this.Player.LowID = this.Reader.ReadVInt(); this.Player.Username = this.Reader.ReadString(); this.Reader.ReadBoolean(); int CardCount = this.Reader.ReadVInt(); // Logging.Info(this.GetType(), "There is " + CardCount + " cards to read."); for (int i = 0; i < CardCount; i++) { Brawler Brawler = new Brawler(); Brawler.CardType = this.Reader.ReadVInt(); // Card Type Brawler.CardID = this.Reader.ReadVInt(); // Card ID if (this.Reader.ReadVInt() > 0) { this.Reader.ReadVInt(); } Brawler.Trophies = this.Reader.ReadVInt(); // Trophies Brawler.Trophies2 = this.Reader.ReadVInt(); // Trophies Brawler.Level = this.Reader.ReadVInt(); // Level this.Player.Cards.Add(Brawler); } int StatCount = this.Reader.ReadVInt(); // Logging.Info(this.GetType(), "There is " + StatCount + " stats to read."); for (int i = 0; i < StatCount; i++) { this.ParseStat(); } bool hasClan = this.Reader.ReadBoolean(); if (hasClan) { this.Player.Clan = new Clan(); this.Player.Clan.HighID = this.Reader.ReadInt32(); // High ID this.Player.Clan.LowID = this.Reader.ReadInt32(); // Low ID this.Player.Clan.Name = this.Reader.ReadString(); // Name this.Player.Clan.Badge = this.Reader.ReadVInt() * 1000000; // Badge Type this.Player.Clan.Badge += this.Reader.ReadVInt(); // Badge ID this.Player.Clan.Type = this.Reader.ReadVInt(); // Clan Type this.Player.Clan.MemberCount = this.Reader.ReadVInt(); // Members Count this.Player.Clan.Trophies = this.Reader.ReadVInt(); // Trophies this.Player.Clan.RequiredTrophies = this.Reader.ReadVInt(); // Required Trophies this.Reader.ReadVInt(); this.Player.Clan.MemberRole = this.Reader.ReadVInt() * 1000000; // Role Type this.Player.Clan.MemberRole += this.Reader.ReadVInt(); // Role ID } this.Reader.ReadBoolean(); }
public static void HandleAbnormalityBegin(S_ABNORMALITY_BEGIN p) { AbnormalityManager.BeginAbnormality(p.AbnormalityId, p.TargetId, p.Duration, p.Stacks); if (!SettingsManager.ClassWindowSettings.Enabled) { return; } switch (SessionManager.CurrentPlayer.Class) { case Class.Mystic: Mystic.CheckHurricane(p); Mystic.CheckBuff(p); break; case Class.Warrior: Warrior.CheckBuff(p); break; case Class.Valkyrie: Valkyrie.CheckRagnarok(p); break; case Class.Archer: Archer.CheckFocus(p); Archer.CheckFocusX(p); Archer.CheckSniperEye(p); break; case Class.Lancer: Lancer.CheckArush(p); Lancer.CheckGshout(p); Lancer.CheckLineHeld(p); break; case Class.Priest: Priest.CheckBuff(p); break; case Class.Brawler: Brawler.CheckBrawlerAbnormal(p); break; case Class.Ninja: Ninja.CheckFocus(p); break; case Class.Sorcerer: Sorcerer.CheckBuff(p); break; case Class.Reaper: Reaper.CheckBuff(p); break; case Class.Slayer: Slayer.CheckBuff(p); break; case Class.Berserker: Berserker.CheckBuff(p); break; } }
public ItemData(Type ItemType, int Count, Brawler BrawlerCard) { this.ItemType = ItemType; this.Count = Count; this.BrawlerCard = BrawlerCard; }
public override void Start(RAIN.Core.AI ai) { base.Start(ai); self = ai.Body.GetComponent <Brawler>(); }
private void openEditingMenu(GameCharacter selectedChar) { layout.ColumnCount = 2; tbCharName.Text = selectedChar.CharacterName; healthSlider.Value = selectedChar.Health; experienceIn.Text = selectedChar.CharacterExperience.ToString(); weightLimitIn.Text = selectedChar.WeightLimit.ToString(); if (selectedChar is BlackWitch) { BlackWitch temp = selectedChar as BlackWitch; polyLbl1.Text = "Dark Power:"; polyNumeric1.Maximum = 100; polyNumeric1.Value = temp.DarkPower; polyLbl2.Text = "M. Proficiency: "; polyNumeric2.Maximum = 100; polyNumeric2.Value = temp.MagicProficiency; polyLbl2.Show(); polyNumeric2.Show(); } if (selectedChar is Brawler) { Brawler temp = selectedChar as Brawler; polyLbl1.Text = "Punch Damage:"; polyNumeric1.Maximum = 100; polyNumeric1.Value = temp.PunchDamage; polyLbl2.Text = "Strength: "; polyNumeric2.Maximum = 100; polyNumeric2.Value = temp.Strength; polyLbl2.Show(); polyNumeric2.Show(); } if (selectedChar is Cleric) { Cleric temp = selectedChar as Cleric; polyLbl1.Text = "Piety Level:"; polyNumeric1.Maximum = 100; polyNumeric1.Value = temp.PietyLevel; polyLbl2.Hide(); polyNumeric2.Hide(); } if (selectedChar is Orc) { Orc temp = selectedChar as Orc; polyLbl1.Text = "Ferociousness:"; polyNumeric1.Maximum = 100; polyNumeric1.Value = temp.Ferociousness; polyLbl2.Text = "Strength: "; polyNumeric2.Maximum = 100; polyNumeric2.Value = temp.Strength; polyLbl2.Show(); polyNumeric2.Show(); } editingMenuPanel.Controls.Add(layout); editingMenuPanel.Show(); }
private void bunifuImageButton2_Click(object sender, EventArgs e) { Brawler popup = new Brawler(); popup.Show(); }