From c6119a65244b10dde2683ca1108e0fa903a82f49 Mon Sep 17 00:00:00 2001 From: xOlanga Date: Mon, 16 Jan 2023 19:05:52 +0000 Subject: [PATCH] updated aggro mage Signed-off-by: xOlanga --- ...S)\345\277\253\346\224\273\346\263\225.cs" | 141 ++++++++++++++++-- 1 file changed, 125 insertions(+), 16 deletions(-) diff --git "a/smartbot/Profiles/Olanga\346\240\207\345\207\206(S)\345\277\253\346\224\273\346\263\225.cs" "b/smartbot/Profiles/Olanga\346\240\207\345\207\206(S)\345\277\253\346\224\273\346\263\225.cs" index b0d16748c..6e654b651 100644 --- "a/smartbot/Profiles/Olanga\346\240\207\345\207\206(S)\345\277\253\346\224\273\346\263\225.cs" +++ "b/smartbot/Profiles/Olanga\346\240\207\345\207\206(S)\345\277\253\346\224\273\346\263\225.cs" @@ -137,7 +137,6 @@ namespace SmartBotProfiles }; #endregion - #region Attack Modes and Customization public ProfileParameters GetParameters(Board board) { @@ -216,14 +215,111 @@ namespace SmartBotProfiles { int friendCount = board.MinionFriend.Count; int HandCount = board.Hand.Count; + int AvailableMana = board.ManaAvailable; + + int MinionWith2Health=board.MinionEnemy.Count(minion => minion.CurrentHealth == 2); + int MinionWith3Health=board.MinionEnemy.Count(minion => minion.CurrentHealth == 3); + int MinionWith4Health=board.MinionEnemy.Count(minion => minion.CurrentHealth == 4); + int MinionWith5Health=board.MinionEnemy.Count(minion => minion.CurrentHealth == 5); + int MinionWith6Health=board.MinionEnemy.Count(minion => minion.CurrentHealth == 6); + + int MinionWith3OrLessHealth=board.MinionEnemy.Count(minion => minion.CurrentHealth <= 3); + int MinionWith4OrLessHealth=board.MinionEnemy.Count(minion => minion.CurrentHealth <= 4); + int MinionWith5OrLessHealth=board.MinionEnemy.Count(minion => minion.CurrentHealth <= 5); + int MinionWith6OrLessHealth=board.MinionEnemy.Count(minion => minion.CurrentHealth <= 6); + + int MinionWith2OrMoreAttack=board.MinionEnemy.Count(minion => minion.CurrentAtk >= 2); + int MinionWith3OrMoreAttack=board.MinionEnemy.Count(minion => minion.CurrentAtk >= 3); + int MinionWith4OrMoreAttack=board.MinionEnemy.Count(minion => minion.CurrentAtk >= 4); + int MinionWith5OrMoreAttack=board.MinionEnemy.Count(minion => minion.CurrentAtk >= 5); + int MinionWith6OrMoreAttack=board.MinionEnemy.Count(minion => minion.CurrentAtk >= 6); + + int NoOkani = board.MinionEnemy.Count(card => card.Template.Id == Card.Cards.TSC_032); + + int NoObjection = 0; + if(board.SecretEnemyCount > 0 + &&board.EnemyClass==Card.CClass.MAGE){NoObjection=1;} + +#endregion + +#region Face Damage with Spells + int HasBloodmage= board.MinionFriend.Count(card => card.Template.Id == Card.Cards.CORE_EX1_012); //Bloodmage Thalnos + int HasGuildTrader= board.MinionFriend.Count(card => card.Template.Id == Card.Cards.SW_061); //Guild Trader + int HasAegwynn= board.MinionFriend.Count(card => card.Template.Id == Card.Cards.CS3_001); // CS3_001 + + int TotalSpellDamage=0; + + int SpellDamage = board.MinionFriend.FindAll(x => x.IsSilenced == false).Sum(x => x.SpellPower); + + int BoltsInHand = board.Hand.Count(card => card.Template.Id == Card.Cards.RLK_843); + int BoltBurn = (BoltsInHand*2); + if(board.MaxMana>7){BoltBurn=(BoltsInHand*3);} + int BoltCost = board.Hand.FindAll(x => x.Template.Id == Card.Cards.RLK_843).Sum(x => x.CurrentCost); + + int TouchesInHand = board.Hand.Count(card => card.Template.Id == Card.Cards.REV_601); + int TouchBurn = (TouchesInHand*3); + int TouchCost = board.Hand.FindAll(x => x.Template.Id == Card.Cards.REV_601).Sum(x => x.CurrentCost); + + int InfusedTouchesInHand = board.Hand.Count(card => card.Template.Id == Card.Cards.REV_601t); + int InfusedTouchBurn = (InfusedTouchesInHand*3*2); + int InfusedTouchCost = InfusedTouchesInHand*4; + + int FireballsInHand = board.Hand.Count(card => card.Template.Id == Card.Cards.CORE_CS2_029); + int FireballBurn = (FireballsInHand*6); + int FireballCost = board.Hand.FindAll(x => x.Template.Id == Card.Cards.CORE_CS2_029).Sum(x => x.CurrentCost); + + int OrbsInhand = board.Hand.Count(card => card.Template.Id == Card.Cards.BAR_541); + int OrbBurn = (OrbsInhand*2); + int OrbCost = board.Hand.FindAll(x => x.Template.Id == Card.Cards.BAR_541).Sum(x => x.CurrentCost); + + int TotalBurn = (BoltBurn+TouchBurn+InfusedTouchBurn+FireballBurn+OrbBurn); + if(SpellDamage>0){TotalBurn=(TotalBurn)+((SpellDamage)*(TouchesInHand+InfusedTouchesInHand+FireballsInHand+BoltsInHand+OrbsInhand));} + int TotalBurnCost = (BoltCost+TouchCost+InfusedTouchCost+FireballCost+OrbCost); + + int LethalWithSpells = 0; + + int EnemyHeroHealth = (board.HeroEnemy.CurrentHealth + board.HeroEnemy.CurrentArmor) - TotalBurn; + + if(AvailableMana<=TotalBurnCost + &&TotalBurn>=(board.HeroEnemy.CurrentHealth + board.HeroEnemy.CurrentArmor)){LethalWithSpells=1;} + + + if(AvailableMana<=TotalBurnCost + &&TotalBurn>=(board.HeroEnemy.CurrentHealth + board.HeroEnemy.CurrentArmor)){ + p.GlobalAggroModifier=999; + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.RLK_843, new Modifier(-3000)); //Bolts + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.REV_601, new Modifier(-3000)); //Touches + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.REV_601t, new Modifier(-3000)); //Infused Touches + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.CORE_CS2_029, new Modifier(-3000)); //Fireballs + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.BAR_541, new Modifier(-3000)); //Orbs + Bot.Log("--> [AGGRO MAGE PROFILE] LETHAL WITH ONLY BURN! Aggro Modifier: 999 || Cast Spell Modifier: -3000");} + + if(AvailableMana<=TotalBurnCost + &&TotalBurn<=(board.HeroEnemy.CurrentHealth + board.HeroEnemy.CurrentArmor)){ + //Bot.Log("--> [AGGRO MAGE PROFILE] No Lethal with only Burn."); + } + + Bot.Log("--> [AGGRO MAGE PROFILE] Current Spell Damage: "+SpellDamage); + Bot.Log("--> [AGGRO MAGE PROFILE] Current Damage from Hand: "+TotalBurn); + Bot.Log("--> [AGGRO MAGE PROFILE] Current Cost of Damage from Hand: "+TotalBurnCost); +#endregion + +#region Astalor Damage Calculation +int AstalorDamage = 8; +if(board.MaxMana>9){AstalorDamage=16;} +if(AstalorDamage>=enemyMinionHealth+board.HeroEnemy.CurrentHealth+board.HeroEnemy.CurrentArmor +&&NoObjection==0 +&&NoOkani<1) +{p.CastMinionsModifiers.AddOrUpdate(Card.Cards.RLK_222t2, new Modifier(-9999)); + p.PlayOrderModifiers.AddOrUpdate(Card.Cards.RLK_222t2, new Modifier(9999)); + Bot.Log("--> [AGGRO MAGE PROFILE] LETHAL WITH ASTALOR!"); + } + +//>=enemyMinionHealth+board.HeroEnemy.CurrentHealth+board.HeroEnemy.CurrentArmor #endregion #region The Coin GAME_005 -if( - board.HasCardInHand(Card.Cards.GAME_005) - ){ - p.CastSpellsModifiers.AddOrUpdate(Card.Cards.GAME_005, new Modifier(-50)); -} + if( board.HasCardInHand(Card.Cards.GAME_005) &&board.SecretEnemyCount > 0 @@ -248,6 +344,7 @@ if( if( board.HasCardInHand(Card.Cards.REV_601) &&board.ManaAvailable>1 + &&LethalWithSpells==0 ){ p.CastSpellsModifiers.AddOrUpdate(Card.Cards.REV_601, new Modifier(999)); Bot.Log("--> [CARD IN HAND] Frozen Touch (INACTIVE). Castmodifier: 999"); @@ -255,6 +352,7 @@ if( if( board.HasCardInHand(Card.Cards.REV_601t) &&board.ManaAvailable>1 + &&LethalWithSpells==0 ){ p.CastSpellsModifiers.AddOrUpdate(Card.Cards.REV_601t, new Modifier(-100)); p.PlayOrderModifiers.AddOrUpdate(Card.Cards.REV_601t, new Modifier(700)); @@ -295,17 +393,19 @@ if( board.HasCardInHand(Card.Cards.RLK_843) &&board.MaxMana<8 &&board.ManaAvailable>0 + &&LethalWithSpells==0 ){ - p.CastSpellsModifiers.AddOrUpdate(Card.Cards.RLK_843, new Modifier(350)); - Bot.Log("--> [CARD IN HAND] Arcane Bolt (INACTIVE). Castmodifier: 350"); + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.RLK_843, new Modifier(999)); + Bot.Log("--> [CARD IN HAND] Arcane Bolt (INACTIVE). Castmodifier: 999"); } if( board.HasCardInHand(Card.Cards.RLK_843) &&board.ManaAvailable>0 &&board.MaxMana>7 + &&LethalWithSpells==0 ){ - p.CastSpellsModifiers.AddOrUpdate(Card.Cards.RLK_843, new Modifier(-100)); - Bot.Log("--> [CARD IN HAND] Arcane Bolt (ACTIVE). Castmodifier: -50"); + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.RLK_843, new Modifier(100)); + Bot.Log("--> [CARD IN HAND] Arcane Bolt (ACTIVE). Castmodifier: 100"); } #endregion @@ -444,8 +544,9 @@ if( board.HasCardInHand(Card.Cards.AV_115) &&board.ManaAvailable>1 ){ - p.CastMinionsModifiers.AddOrUpdate(Card.Cards.WC_805, new Modifier(-100)); - Bot.Log("--> [CARD IN HAND] Amplified Snowflurry. Castmodifier: -100"); + p.PlayOrderModifiers.AddOrUpdate(Card.Cards.AV_115, new Modifier(950)); + p.CastMinionsModifiers.AddOrUpdate(Card.Cards.AV_115, new Modifier(-100)); + Bot.Log("--> [CARD IN HAND] Amplified Snowflurry. Castmodifier: -100 || Ordermodifier 950"); } #endregion @@ -454,15 +555,15 @@ if( board.HasCardInHand(Card.Cards.RLK_542) &&board.ManaAvailable>2 ){ - p.CastMinionsModifiers.AddOrUpdate(Card.Cards.RLK_542, new Modifier(-100)); + p.CastMinionsModifiers.AddOrUpdate(Card.Cards.RLK_542, new Modifier(-300)); - Bot.Log("--> [CARD IN HAND] Arcsplitter. Castmodifier: -100"); + Bot.Log("--> [CARD IN HAND] Arcsplitter. Castmodifier: -300"); } if(board.HasCardOnBoard(Card.Cards.RLK_542) ) { - p.OnBoardFriendlyMinionsValuesModifiers.AddOrUpdate(Card.Cards.RLK_542, new Modifier(-250)); - Bot.Log("--> [AGGRO MAGE PROFILE] Arcsplitter Valuemodifier: -250"); + p.OnBoardFriendlyMinionsValuesModifiers.AddOrUpdate(Card.Cards.RLK_542, new Modifier(-50)); + Bot.Log("--> [AGGRO MAGE PROFILE] Arcsplitter Valuemodifier: -50"); } #endregion @@ -755,6 +856,14 @@ if( } #endregion +#region Objection! MAW_006 + if(board.HasCardInHand(Card.Cards.MAW_006) + ){ + p.CastSpellsModifiers.AddOrUpdate(Card.Cards.MAW_006, new Modifier(-150)); + Bot.Log("--> [CARD IN HAND] Objection!. Castmodifier: -150"); + } +#endregion + #region Tradevalue Modifiers Enemy Minions //just ignore it. basically gives all the listed minions a certain value as in how likely the bot is to kill it off. //Like "more dangerous" minions on the other side of the field). Higher Number = more important to kill -- Gitee