Commit ddbdbd85 authored by mercury233's avatar mercury233

ennemy -> enemy

parent 811e3d61
......@@ -46,14 +46,14 @@ namespace WindBot.Game.AI
ClientCard card = field.MonsterZone[i];
if (card == null) continue;
if (onlyatk && card.IsDefense()) continue;
int ennemyValue = card.GetDefensePower();
if (ennemyValue > bestAtk)
bestAtk = ennemyValue;
int enemyValue = card.GetDefensePower();
if (enemyValue > bestAtk)
bestAtk = enemyValue;
}
return bestAtk;
}
public bool IsEnnemyBetter(bool onlyatk, bool all)
public bool IsEnemyBetter(bool onlyatk, bool all)
{
if (Duel.Fields[1].GetMonsterCount() == 0)
return false;
......@@ -63,11 +63,11 @@ namespace WindBot.Game.AI
if (monsters.Count > 0)
bestAtk = monsters[monsters.Count - 1].Attack;
if (all)
return IsAllEnnemyBetterThanValue(bestAtk, onlyatk);
return IsOneEnnemyBetterThanValue(bestAtk, onlyatk);
return IsAllEnemyBetterThanValue(bestAtk, onlyatk);
return IsOneEnemyBetterThanValue(bestAtk, onlyatk);
}
public bool IsOneEnnemyBetterThanValue(int value, bool onlyatk)
public bool IsOneEnemyBetterThanValue(int value, bool onlyatk)
{
int bestValue = -1;
bool nomonster = true;
......@@ -77,15 +77,15 @@ namespace WindBot.Game.AI
if (card == null) continue;
if (onlyatk && card.IsDefense()) continue;
nomonster = false;
int ennemyValue = card.GetDefensePower();
if (ennemyValue > bestValue)
bestValue = ennemyValue;
int enemyValue = card.GetDefensePower();
if (enemyValue > bestValue)
bestValue = enemyValue;
}
if (nomonster) return false;
return bestValue > value;
}
public bool IsAllEnnemyBetterThanValue(int value, bool onlyatk)
public bool IsAllEnemyBetterThanValue(int value, bool onlyatk)
{
bool nomonster = true;
for (int i = 0; i < 7; ++i)
......@@ -94,22 +94,22 @@ namespace WindBot.Game.AI
if (card == null || card.Data == null) continue;
if (onlyatk && card.IsDefense()) continue;
nomonster = false;
int ennemyValue = card.GetDefensePower();
if (ennemyValue <= value)
int enemyValue = card.GetDefensePower();
if (enemyValue <= value)
return false;
}
return !nomonster;
}
public ClientCard GetOneEnnemyBetterThanValue(int value, bool onlyatk)
public ClientCard GetOneEnemyBetterThanValue(int value, bool onlyatk)
{
for (int i = 0; i < 7; ++i)
{
ClientCard card = Duel.Fields[1].MonsterZone[i];
if (card == null) continue;
if (onlyatk && card.IsDefense()) continue;
int ennemyValue = card.GetDefensePower();
if (ennemyValue >= value)
int enemyValue = card.GetDefensePower();
if (enemyValue >= value)
return card;
}
return null;
......@@ -128,7 +128,7 @@ namespace WindBot.Game.AI
return card;
if (attack == 0)
attack = GetBestAttack(Duel.Fields[0], true);
return GetOneEnnemyBetterThanValue(attack, true);
return GetOneEnemyBetterThanValue(attack, true);
}
public ClientCard GetProblematicMonsterCard(int attack = 0)
......@@ -141,7 +141,7 @@ namespace WindBot.Game.AI
return card;
if (attack == 0)
attack = GetBestAttack(Duel.Fields[0], true);
return GetOneEnnemyBetterThanValue(attack, true);
return GetOneEnemyBetterThanValue(attack, true);
}
public ClientCard GetProblematicSpellCard()
......
......@@ -430,7 +430,7 @@ namespace MycardBot.Game.AI.Decks
使用过的青眼亚白龙.Add(Card);
return true;
}
card = AI.Utils.GetOneEnnemyBetterThanValue(Card.GetDefensePower(), false);
card = AI.Utils.GetOneEnemyBetterThanValue(Card.GetDefensePower(), false);
if (card != null)
{
Logger.DebugWriteLine("炸比自己强的怪.");
......@@ -771,7 +771,7 @@ namespace MycardBot.Game.AI.Decks
Logger.DebugWriteLine("先攻不叠银河眼,叠银河巨神.");
return false;
}
if (AI.Utils.IsOneEnnemyBetterThanValue(2999, false))
if (AI.Utils.IsOneEnemyBetterThanValue(2999, false))
{
Logger.DebugWriteLine("有高攻怪兽,出银河眼.");
return true;
......@@ -797,7 +797,7 @@ namespace MycardBot.Game.AI.Decks
}
if (Duel.Fields[0].HasInMonstersZone((int)CardId.银河眼光子龙皇))
{
if (!AI.Utils.IsOneEnnemyBetterThanValue(4000, false))
if (!AI.Utils.IsOneEnemyBetterThanValue(4000, false))
{
Logger.DebugWriteLine("没有高攻怪兽,出重铠.");
AI.SelectCard((int)CardId.银河眼光子龙皇);
......@@ -1122,13 +1122,13 @@ namespace MycardBot.Game.AI.Decks
private bool 改变攻守表示()
{
bool ennemyBetter = AI.Utils.IsEnnemyBetter(true, true);
bool enemyBetter = AI.Utils.IsEnemyBetter(true, true);
if (Card.IsAttack() && ennemyBetter)
if (Card.IsAttack() && enemyBetter)
return true;
if (Card.IsFacedown())
return true;
if (Card.IsDefense() && !ennemyBetter && Card.Attack >= Card.Defense)
if (Card.IsDefense() && !enemyBetter && Card.Attack >= Card.Defense)
return true;
if (Card.IsDefense() && (
Card.Id == (int)CardId.青眼精灵龙
......
......@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
private bool 进化光焰()
{
if (!AI.Utils.IsOneEnnemyBetterThanValue(Bot.MonsterZone.GetHighestAttackMonster().Attack, false))
if (!AI.Utils.IsOneEnemyBetterThanValue(Bot.MonsterZone.GetHighestAttackMonster().Attack, false))
return false;
else
AI.SelectCard(Duel.Fields[1].MonsterZone.GetHighestAttackMonster());
......@@ -143,7 +143,7 @@ namespace WindBot.Game.AI.Decks
private bool 装甲电子翼()
{
if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.电子龙三型) || Bot.HasInHand((int)CardId.电子凤凰)) && !AI.Utils.IsOneEnnemyBetterThanValue(1800,true))
if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.电子龙三型) || Bot.HasInHand((int)CardId.电子凤凰)) && !AI.Utils.IsOneEnemyBetterThanValue(1800,true))
return false;
return true;
}
......@@ -152,7 +152,7 @@ namespace WindBot.Game.AI.Decks
{
if (Bot.GetCountCardInZone(Bot.Hand, (int)CardId.电子龙) + Bot.GetCountCardInZone(Bot.MonsterZone, (int)CardId.电子龙) + Bot.GetCountCardInZone(Bot.MonsterZone, (int)CardId.电子龙核) >= 1 && Bot.HasInHand((int)CardId.融合) || Bot.GetCountCardInZone(Bot.Hand, (int)CardId.电子龙) + Bot.GetCountCardInZone(Bot.MonsterZone, (int)CardId.电子龙) + Bot.GetCountCardInZone(Bot.Graveyard, (int)CardId.电子龙) + Bot.GetCountCardInZone(Bot.Graveyard, (int)CardId.电子龙核) >= 1 && Bot.HasInHand((int)CardId.力量结合))
return true;
if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.电子龙三型) || Bot.HasInHand((int)CardId.电子凤凰)) && !AI.Utils.IsOneEnnemyBetterThanValue(1800, true))
if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.电子龙三型) || Bot.HasInHand((int)CardId.电子凤凰)) && !AI.Utils.IsOneEnemyBetterThanValue(1800, true))
return false;
return true;
}
......@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks
return true;
else if (Card.Location == CardLocation.SpellZone)
{
if (AI.Utils.IsOneEnnemyBetterThanValue(Bot.GetMonsters().GetHighestAttackMonster().Attack, true))
if (AI.Utils.IsOneEnemyBetterThanValue(Bot.GetMonsters().GetHighestAttackMonster().Attack, true))
if (ActivateDescription == AI.Utils.GetStringId((int)CardId.装甲电子翼, 2))
return true;
return false;
......
......@@ -344,7 +344,7 @@ namespace DevBot.Game.AI.Decks
private bool ScrapDragonSummon()
{
//if (AI.Utils.IsOneEnnemyBetterThanValue(2500, true))
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
// return true;
ClientCard invincible = GetProblematicCard();
return invincible != null;
......@@ -353,7 +353,7 @@ namespace DevBot.Game.AI.Decks
private bool ScrapDragonEffect()
{
ClientCard invincible = GetProblematicCard();
if (invincible == null && !AI.Utils.IsOneEnnemyBetterThanValue(2800 - 1, false))
if (invincible == null && !AI.Utils.IsOneEnemyBetterThanValue(2800 - 1, false))
return false;
ClientField field = Duel.Fields[0];
......
......@@ -95,7 +95,7 @@ namespace DevBot.Game.AI.Decks
private bool SwapFrogSummon()
{
int atk = Card.Attack + GetSpellBonus();
if (AI.Utils.IsAllEnnemyBetterThanValue(atk, true))
if (AI.Utils.IsAllEnemyBetterThanValue(atk, true))
return false;
AI.SelectCard((int)CardId.Ronintoadin);
......@@ -152,7 +152,7 @@ namespace DevBot.Game.AI.Decks
{
int atk = Card.Attack + GetSpellBonus();
if (AI.Utils.IsOneEnnemyBetterThanValue(atk, true))
if (AI.Utils.IsOneEnemyBetterThanValue(atk, true))
return false;
if (Card.Id == (int)CardId.SwapFrog)
......@@ -164,7 +164,7 @@ namespace DevBot.Game.AI.Decks
{
List<int> cards = new List<int>();
if (AI.Utils.IsEnnemyBetter(false, false))
if (AI.Utils.IsEnemyBetter(false, false))
{
cards.Add((int)CardId.FlipFlopFrog);
}
......@@ -190,7 +190,7 @@ namespace DevBot.Game.AI.Decks
private bool DarkHole()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
private bool Terraforming()
......@@ -226,13 +226,13 @@ namespace DevBot.Game.AI.Decks
if (Card.Id == (int)CardId.DewdarkOfTheIceBarrier)
return Card.IsDefense();
bool ennemyBetter = AI.Utils.IsOneEnnemyBetterThanValue(Card.Attack + (Card.IsFacedown() ? GetSpellBonus() : 0), true);
bool enemyBetter = AI.Utils.IsOneEnemyBetterThanValue(Card.Attack + (Card.IsFacedown() ? GetSpellBonus() : 0), true);
if (Card.Attack < 800)
ennemyBetter = true;
enemyBetter = true;
bool result = false;
if (Card.IsAttack() && ennemyBetter)
if (Card.IsAttack() && enemyBetter)
result = true;
if (Card.IsDefense() && !ennemyBetter)
if (Card.IsDefense() && !enemyBetter)
result = true;
if (!result && Card.Id == (int)CardId.FlipFlopFrog && Duel.Fields[1].GetMonsterCount() > 0 && Card.IsFacedown())
......
......@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
private bool 守墓的末裔()
{
int bestatk = Duel.Fields[0].GetMonsters().GetHighestAttackMonster().Attack;
if (AI.Utils.IsOneEnnemyBetterThanValue(bestatk, true))
if (AI.Utils.IsOneEnemyBetterThanValue(bestatk, true))
{
AI.SelectCard(Duel.Fields[1].GetMonsters().GetHighestAttackMonster());
return true;
......
......@@ -147,7 +147,7 @@ namespace WindBot.Game.AI.Decks
private bool WhiteNightDragon()
{
// We should summon Horus the Black Flame Dragon LV6 if he can lvlup.
if (Duel.Fields[1].GetMonsterCount() != 0 && !AI.Utils.IsAllEnnemyBetterThanValue(2300 - 1, false))
if (Duel.Fields[1].GetMonsterCount() != 0 && !AI.Utils.IsAllEnemyBetterThanValue(2300 - 1, false))
foreach (ClientCard card in Main.SummonableCards)
if (card.Id == 11224103)
return false;
......
......@@ -291,7 +291,7 @@ namespace WindBot.Game.AI.Decks
private bool 辉光子帕拉迪奥斯效果()
{
ClientCard result = AI.Utils.GetOneEnnemyBetterThanValue(2000, true);
ClientCard result = AI.Utils.GetOneEnemyBetterThanValue(2000, true);
if (result != null)
{
AI.SelectNextCard(result);
......@@ -302,7 +302,7 @@ namespace WindBot.Game.AI.Decks
private bool 电光皇特殊召唤()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
}
}
\ No newline at end of file
......@@ -156,14 +156,14 @@ namespace WindBot.Game.AI.Decks
private bool 三叉龙之影灵衣()
{
if (AI.Utils.IsAllEnnemyBetterThanValue(2700, true) && Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
if (AI.Utils.IsAllEnemyBetterThanValue(2700, true) && Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
return false;
return true;
}
private bool 决战兵器之影灵衣()
{
if (AI.Utils.IsAllEnnemyBetterThanValue(3300, true))
if (AI.Utils.IsAllEnemyBetterThanValue(3300, true))
{
AI.SelectCard((int)CardId.决战兵器之影灵衣);
return true;
......@@ -173,7 +173,7 @@ namespace WindBot.Game.AI.Decks
private bool 励辉士入魔蝇王()
{
if (AI.Utils.IsAllEnnemyBetterThanValue(Duel.Fields[0].GetMonsters().GetHighestAttackMonster().Attack, true))
if (AI.Utils.IsAllEnemyBetterThanValue(Duel.Fields[0].GetMonsters().GetHighestAttackMonster().Attack, true))
{
return true;
}
......@@ -189,7 +189,7 @@ namespace WindBot.Game.AI.Decks
private bool 天枪龙之影灵衣()
{
if (AI.Utils.IsOneEnnemyBetterThanValue(Duel.Fields[0].GetMonsters().GetHighestAttackMonster().Attack,true) && Duel.Phase == DuelPhase.Main1)
if (AI.Utils.IsOneEnemyBetterThanValue(Duel.Fields[0].GetMonsters().GetHighestAttackMonster().Attack,true) && Duel.Phase == DuelPhase.Main1)
{
AI.SelectCard(Duel.Fields[1].GetMonsters().GetHighestAttackMonster());
return true;
......@@ -209,12 +209,12 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard((int)CardId.影灵衣的降魔镜);
return true;
}
else if (AI.Utils.IsOneEnnemyBetterThanValue(3300, true) && !Duel.Fields[0].HasInHand((int)CardId.三叉龙之影灵衣))
else if (AI.Utils.IsOneEnemyBetterThanValue(3300, true) && !Duel.Fields[0].HasInHand((int)CardId.三叉龙之影灵衣))
{
AI.SelectCard((int)CardId.三叉龙之影灵衣);
return true;
}
else if (AI.Utils.IsAllEnnemyBetterThanValue(2700,true) && !Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
else if (AI.Utils.IsAllEnemyBetterThanValue(2700,true) && !Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
{
AI.SelectCard((int)CardId.决战兵器之影灵衣);
return true;
......@@ -234,12 +234,12 @@ namespace WindBot.Game.AI.Decks
private bool 千手神效果()
{
if (AI.Utils.IsOneEnnemyBetterThanValue(3300, true) && !Duel.Fields[0].HasInHand((int)CardId.三叉龙之影灵衣))
if (AI.Utils.IsOneEnemyBetterThanValue(3300, true) && !Duel.Fields[0].HasInHand((int)CardId.三叉龙之影灵衣))
{
AI.SelectCard((int)CardId.三叉龙之影灵衣);
return true;
}
else if (AI.Utils.IsAllEnnemyBetterThanValue(2700, true) && !Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
else if (AI.Utils.IsAllEnemyBetterThanValue(2700, true) && !Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
{
AI.SelectCard((int)CardId.决战兵器之影灵衣);
return true;
......@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
foreach (int Id in NekrozCard)
{
if (Id == (int)CardId.三叉龙之影灵衣 && AI.Utils.IsAllEnnemyBetterThanValue(2700, true) && Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
if (Id == (int)CardId.三叉龙之影灵衣 && AI.Utils.IsAllEnemyBetterThanValue(2700, true) && Duel.Fields[0].HasInHand((int)CardId.决战兵器之影灵衣))
{
AI.SelectCard((int)CardId.三叉龙之影灵衣);
return true;
......
......@@ -85,7 +85,7 @@
if (handCard.IsFacedown())
return true;
}
return AI.Utils.IsEnnemyBetter(true, false);
return AI.Utils.IsEnemyBetter(true, false);
}
}
}
\ No newline at end of file
......@@ -390,7 +390,7 @@ namespace MycardBot.Game.AI.Decks
private bool No37希望织龙蜘蛛鲨特殊召唤()
{
return AI.Utils.IsAllEnnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnnemyBetterThanValue(3600, true);
return AI.Utils.IsAllEnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnemyBetterThanValue(3600, true);
}
private bool 电光千鸟特殊召唤()
......@@ -424,7 +424,7 @@ namespace MycardBot.Game.AI.Decks
private bool 星尘龙特殊召唤()
{
return (AI.Utils.IsEnnemyBetter(false, false) && !AI.Utils.IsOneEnnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
return (AI.Utils.IsEnemyBetter(false, false) && !AI.Utils.IsOneEnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
}
private bool 星尘龙效果()
......@@ -434,7 +434,7 @@ namespace MycardBot.Game.AI.Decks
private bool 进化帝半鸟龙特殊召唤()
{
return (AI.Utils.IsAllEnnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
return (AI.Utils.IsAllEnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
}
private bool 入魔梦魇骑士特殊召唤()
......@@ -460,7 +460,7 @@ namespace MycardBot.Game.AI.Decks
private bool No59背反之料理人特殊召唤()
{
return ((Duel.Fields[0].GetMonsterCount() + Duel.Fields[0].GetSpellCount() - 2) <= 1) &&
((AI.Utils.IsEnnemyBetter(false, false) && !AI.Utils.IsOneEnnemyBetterThanValue(2300, true)) || AI.Utils.IsTurn1OrMain2());
((AI.Utils.IsEnemyBetter(false, false) && !AI.Utils.IsOneEnemyBetterThanValue(2300, true)) || AI.Utils.IsTurn1OrMain2());
}
private bool No59背反之料理人效果()
......@@ -493,7 +493,7 @@ namespace MycardBot.Game.AI.Decks
private bool 辉光子帕拉迪奥斯效果()
{
ClientCard result = AI.Utils.GetOneEnnemyBetterThanValue(2000, true);
ClientCard result = AI.Utils.GetOneEnemyBetterThanValue(2000, true);
if (result != null)
{
AI.SelectNextCard(result);
......@@ -504,7 +504,7 @@ namespace MycardBot.Game.AI.Decks
private bool 电光皇特殊召唤()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
private bool 强欲而贪欲之壶效果()
......@@ -514,7 +514,7 @@ namespace MycardBot.Game.AI.Decks
private bool 地碎效果()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
private bool 陷阱卡覆盖()
......
......@@ -280,14 +280,14 @@ namespace DevBot.Game.AI.Decks
private bool No61火山恐龙特殊召唤()
{
return AI.Utils.IsOneEnnemyBetterThanValue(2000, false);
return AI.Utils.IsOneEnemyBetterThanValue(2000, false);
}
private bool No61火山恐龙效果()
{
ClientCard target = Duel.Fields[1].MonsterZone.GetFloodgate();
if (target == null)
target = AI.Utils.GetOneEnnemyBetterThanValue(2000, false);
target = AI.Utils.GetOneEnemyBetterThanValue(2000, false);
if (target != null)
{
AI.SelectCard((int)CardId.电子龙);
......@@ -416,7 +416,7 @@ namespace DevBot.Game.AI.Decks
return false;
}
private ClientCard GetBestEnnemyCard()
private ClientCard GetBestEnemyCard()
{
ClientCard card = AI.Utils.GetProblematicCard();
if (card != null)
......
......@@ -421,7 +421,7 @@ namespace WindBot.Game.AI.Decks
private bool 猫鲨特殊召唤()
{
bool should = Duel.Fields[0].HasInMonstersZone((int)CardId.饼蛙)
&& ((AI.Utils.IsEnnemyBetter(true, false)
&& ((AI.Utils.IsEnemyBetter(true, false)
&& !Duel.Fields[0].HasInMonstersZone(new List<int>
{
(int)CardId.猫鲨,
......@@ -480,7 +480,7 @@ namespace WindBot.Game.AI.Decks
num++;
}
}
return AI.Utils.IsEnnemyBetter(true, false)
return AI.Utils.IsEnemyBetter(true, false)
&& AI.Utils.GetBestAttack(Duel.Fields[1], true) > 2200
&& num < 4
&& !Duel.Fields[0].HasInMonstersZone(new List<int>
......@@ -508,7 +508,7 @@ namespace WindBot.Game.AI.Decks
{
defence += monster.GetDefensePower();
}
if (attack - 2000 - defence > Duel.LifePoints[1] && !AI.Utils.IsEnnemyBetter(true, false))
if (attack - 2000 - defence > Duel.LifePoints[1] && !AI.Utils.IsEnemyBetter(true, false))
return true;
}
return false;
......@@ -522,11 +522,11 @@ namespace WindBot.Game.AI.Decks
private bool 改变攻守表示()
{
bool ennemyBetter = AI.Utils.IsEnnemyBetter(true, true);
bool enemyBetter = AI.Utils.IsEnemyBetter(true, true);
if (Card.IsFacedown())
return true;
if (Card.IsDefense() && !ennemyBetter && Card.Attack >= Card.Defense)
if (Card.IsDefense() && !enemyBetter && Card.Attack >= Card.Defense)
return true;
return false;
}
......
......@@ -352,7 +352,7 @@ namespace WindBot.Game.AI.Decks
private bool 暗叛逆超量龙效果()
{
int oppoBestAttack = AI.Utils.GetBestAttack(Duel.Fields[1], true);
ClientCard target = AI.Utils.GetOneEnnemyBetterThanValue(oppoBestAttack, true);
ClientCard target = AI.Utils.GetOneEnemyBetterThanValue(oppoBestAttack, true);
if (target != null)
{
AI.SelectNextCard(target);
......
......@@ -151,7 +151,7 @@ namespace DevBot.Game.AI.Decks
private bool Number61Volcasaurus()
{
return AI.Utils.IsOneEnnemyBetterThanValue(2000, false);
return AI.Utils.IsOneEnemyBetterThanValue(2000, false);
}
private bool ZwLionArms()
......
......@@ -209,7 +209,7 @@ namespace MycardBot.Game.AI.Decks
AI.SelectCard(card);
return true;
}
card = AI.Utils.GetOneEnnemyBetterThanValue(Card.GetDefensePower(), false);
card = AI.Utils.GetOneEnemyBetterThanValue(Card.GetDefensePower(), false);
if (card != null)
{
AI.SelectCard(card);
......@@ -241,7 +241,7 @@ namespace MycardBot.Game.AI.Decks
|| Duel.Phase == DuelPhase.Damage))
return false;
return Duel.Player==0
|| AI.Utils.IsEnnemyBetter(false, false);
|| AI.Utils.IsEnemyBetter(false, false);
}
return true;
}
......
......@@ -96,7 +96,7 @@ namespace WindBot.Game.AI
protected bool DefaultBookOfMoon()
{
if (AI.Utils.IsEnnemyBetter(true, true))
if (AI.Utils.IsEnemyBetter(true, true))
{
ClientCard monster = Duel.Fields[1].GetMonsters().GetHighestAttackMonster();
if (monster != null && monster.HasType(CardType.Effect) && (monster.HasType(CardType.Xyz) || monster.Level > 4))
......@@ -133,7 +133,7 @@ namespace WindBot.Game.AI
protected bool DefaultCallOfTheHaunted()
{
if (!AI.Utils.IsEnnemyBetter(true, true))
if (!AI.Utils.IsEnemyBetter(true, true))
return false;
ClientCard selected = null;
int BestAtk = 0;
......@@ -151,7 +151,7 @@ namespace WindBot.Game.AI
protected bool DefaultTorrentialTribute()
{
return (AI.Utils.IsEnnemyBetter(true, true));
return (AI.Utils.IsEnemyBetter(true, true));
}
protected bool DefaultHeavyStorm()
......@@ -161,17 +161,17 @@ namespace WindBot.Game.AI
protected bool DefaultHammerShot()
{
return AI.Utils.IsEnnemyBetter(true, false);
return AI.Utils.IsEnemyBetter(true, false);
}
protected bool DefaultDarkHole()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
protected bool DefaultRaigeki()
{
return AI.Utils.IsEnnemyBetter(false, false);
return AI.Utils.IsEnemyBetter(false, false);
}
protected bool DefaultSpellSet()
......@@ -206,11 +206,11 @@ namespace WindBot.Game.AI
protected bool DefaultMonsterRepos()
{
bool ennemyBetter = AI.Utils.IsEnnemyBetter(true, true);
bool enemyBetter = AI.Utils.IsEnemyBetter(true, true);
if (Card.IsAttack() && ennemyBetter)
if (Card.IsAttack() && enemyBetter)
return true;
if (Card.IsDefense() && !ennemyBetter && Card.Attack >= Card.Defense)
if (Card.IsDefense() && !enemyBetter && Card.Attack >= Card.Defense)
return true;
return false;
}
......
......@@ -298,7 +298,7 @@ namespace WindBot.Game
}
if (ShouldExecute(exec, card, ExecutorType.SummonOrSet))
{
if (Utils.IsEnnemyBetter(true, true) && Utils.IsAllEnnemyBetterThanValue(card.Attack + 300, false) &&
if (Utils.IsEnemyBetter(true, true) && Utils.IsAllEnemyBetterThanValue(card.Attack + 300, false) &&
main.MonsterSetableCards.Contains(card))
{
_dialogs.SendSetMonster();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment