Commit 9e9d7442 authored by mercury233's avatar mercury233

update common S&T executors

parent aef57f18
......@@ -119,6 +119,21 @@ namespace WindBot.Game.AI
return null;
}
public ClientCard GetAnyEnemyMonster()
{
List<ClientCard> monsters = Enemy.GetMonsters();
ClientCard hmonster = monsters.GetHighestAttackMonster();
if (hmonster != null)
{
return hmonster;
}
foreach (ClientCard monster in monsters)
{
return monster;
}
return null;
}
public ClientCard GetProblematicCard(int attack = 0)
{
ClientCard card = Enemy.MonsterZone.GetInvincibleMonster();
......@@ -135,6 +150,20 @@ namespace WindBot.Game.AI
return GetOneEnemyBetterThanValue(attack, true);
}
public ClientCard GetBestEnemyCard()
{
ClientCard card = GetProblematicCard();
if (card != null)
return card;
card = Enemy.MonsterZone.GetHighestAttackMonster();
if (card != null)
return card;
List<ClientCard> spells = Enemy.GetSpells();
if (spells.Count > 0)
return spells[0];
return null;
}
public ClientCard GetProblematicMonsterCard(int attack = 0)
{
ClientCard card = Enemy.MonsterZone.GetInvincibleMonster();
......
......@@ -52,6 +52,7 @@ namespace WindBot.Game.AI.Decks
: base(ai, duel)
{
// 有坑先清
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫, DefaultHarpiesFeatherDusterFirst);
AddExecutor(ExecutorType.Activate, (int)CardId.银河旋风, DefaultGalaxyCyclone);
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫);
......@@ -71,7 +72,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, (int)CardId.抵价购物, 抵价购物效果);
// 吸一口
AddExecutor(ExecutorType.Activate, (int)CardId.强欲而贪欲之壶, 强欲而贪欲之壶效果);
AddExecutor(ExecutorType.Activate, (int)CardId.强欲而贪欲之壶, DefaultPotOfDesires);
// 有亚白就跳
AddExecutor(ExecutorType.SpSummon, (int)CardId.青眼亚白龙, 青眼亚白龙特殊召唤);
......@@ -484,11 +485,6 @@ namespace WindBot.Game.AI.Decks
return true;
}
private bool 强欲而贪欲之壶效果()
{
return Bot.Deck.Count > 15;
}
private bool 苍眼银龙效果()
{
Logger.DebugWriteLine("苍眼银龙效果.");
......
......@@ -19,7 +19,7 @@ namespace WindBot.Game.AI.Decks
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, DontChainMyself);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
......@@ -41,9 +41,5 @@ namespace WindBot.Game.AI.Decks
return Program.Rand.Next(options.Count);
}
private bool DontChainMyself()
{
return LastChainPlayer != 0;
}
}
}
\ No newline at end of file
......@@ -170,7 +170,7 @@ namespace WindBot.Game.AI.Decks
break;
}
}
if (!hasRealMonster || GetProblematicCard() != null)*/
if (!hasRealMonster || AI.Utils.GetProblematicCard() != null)*/
needId = (int)CardId.DragunityDux;
}
......@@ -344,13 +344,13 @@ namespace WindBot.Game.AI.Decks
{
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
// return true;
ClientCard invincible = GetProblematicCard();
ClientCard invincible = AI.Utils.GetProblematicCard();
return invincible != null;
}
private bool ScrapDragonEffect()
{
ClientCard invincible = GetProblematicCard();
ClientCard invincible = AI.Utils.GetProblematicCard();
if (invincible == null && !AI.Utils.IsOneEnemyBetterThanValue(2800 - 1, false))
return false;
......@@ -489,11 +489,5 @@ namespace WindBot.Game.AI.Decks
}
return Duel.Player == 1;
}
private ClientCard GetProblematicCard()
{
ClientCard card = Enemy.MonsterZone.GetInvincibleMonster();
return card ?? Enemy.SpellZone.GetFloodgate();
}
}
}
\ No newline at end of file
......@@ -23,28 +23,18 @@ namespace WindBot.Game.AI.Decks
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, (int)CardId.黑洞, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultSolemnStrike);
AddExecutor(ExecutorType.SpellSet, (int)CardId.侵略的泛发感染);
AddExecutor(ExecutorType.Activate, DontChainMyself);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Summon);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
private bool DontChainMyself()
{
foreach (CardExecutor exec in Executors)
{
if (exec.Type == Type && exec.CardId == Card.Id)
return false;
}
return LastChainPlayer != 0;
}
// will be added soon...?
}
}
\ No newline at end of file
......@@ -189,11 +189,6 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool DarkHole()
{
return AI.Utils.IsEnemyBetter(false, false);
}
private bool Terraforming()
{
if (Bot.HasInHand((int)CardId.Wetlands))
......
......@@ -52,7 +52,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, (int)CardId.王家长眠之谷, 王家长眠之谷);
AddExecutor(ExecutorType.Activate, (int)CardId.奈落的落穴, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.次元幽闭, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.降灵的仪式, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.王家长眠之谷的王墓, DefaultUniqueTrap);
......
......@@ -22,27 +22,17 @@ namespace WindBot.Game.AI.Decks
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, (int)CardId.黑洞, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultTrap);
AddExecutor(ExecutorType.Activate, DontChainMyself);
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.MonsterSet);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
private bool DontChainMyself()
{
foreach (CardExecutor exec in Executors)
{
if (exec.Type == Type && exec.CardId == Card.Id)
return false;
}
return LastChainPlayer != 0;
}
// will be added soon...?
}
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
AddExecutor(ExecutorType.Activate, (int)CardId.HorusTheBlackFlameDragonLv6);
AddExecutor(ExecutorType.Activate, (int)CardId.StampingDestruction, DefaultStampingDestruction);
AddExecutor(ExecutorType.Activate, (int)CardId.StampingDestruction, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, (int)CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, (int)CardId.FoolishBurial, FoolishBurial);
AddExecutor(ExecutorType.Activate, (int)CardId.Mountain, DefaultField);
......
......@@ -112,7 +112,7 @@ namespace WindBot.Game.AI.Decks
// 坑人
AddExecutor(ExecutorType.Activate, (int)CardId.反大革命, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, 神之通告);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, (int)CardId.技能抽取, 技能抽取);
AddExecutor(ExecutorType.Activate, (int)CardId.虚无空间, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.强制脱出装置, DefaultCompulsoryEvacuationDevice);
......@@ -159,11 +159,6 @@ namespace WindBot.Game.AI.Decks
return true;
}
private bool 神之通告()
{
return (Duel.LifePoints[0] > 1500) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool 技能抽取()
{
return (Duel.LifePoints[0] > 1000) && DefaultUniqueTrap();
......@@ -425,9 +420,5 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool DontChainMyself()
{
return LastChainPlayer != 0;
}
}
}
\ No newline at end of file
......@@ -64,7 +64,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, (int)CardId.救援兔);
AddExecutor(ExecutorType.Activate, (int)CardId.救援兔, 救援兔效果);
AddExecutor(ExecutorType.Activate, (int)CardId.强欲而贪欲之壶, 强欲而贪欲之壶效果);
AddExecutor(ExecutorType.Activate, (int)CardId.强欲而贪欲之壶, DefaultPotOfDesires);
AddExecutor(ExecutorType.Summon, (int)CardId.曼陀罗天使号手, 曼陀罗天使号手通常召唤);
AddExecutor(ExecutorType.Summon, (int)CardId.打喷嚏的河马龙, 打喷嚏的河马龙通常召唤);
......@@ -94,7 +94,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, (int)CardId.芙莉西亚之虫惑魔, 芙莉西亚之虫惑魔特殊召唤);
AddExecutor(ExecutorType.Activate, (int)CardId.芙莉西亚之虫惑魔);
AddExecutor(ExecutorType.Activate, (int)CardId.地碎, 地碎效果);
AddExecutor(ExecutorType.Activate, (int)CardId.地碎, DefaultSmashingGround);
AddExecutor(ExecutorType.SpSummon, (int)CardId.鸟铳士卡斯泰尔, 鸟铳士卡斯泰尔特殊召唤);
AddExecutor(ExecutorType.Activate, (int)CardId.鸟铳士卡斯泰尔, 鸟铳士卡斯泰尔效果);
......@@ -507,16 +507,6 @@ namespace WindBot.Game.AI.Decks
return AI.Utils.IsEnemyBetter(false, false);
}
private bool 强欲而贪欲之壶效果()
{
return Bot.Deck.Count > 15;
}
private bool 地碎效果()
{
return AI.Utils.IsEnemyBetter(false, false);
}
private bool 陷阱卡覆盖()
{
return !Bot.HasInMonstersZone((int)CardId.No59背反之料理人, true, true);
......
......@@ -415,19 +415,5 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private ClientCard GetBestEnemyCard()
{
ClientCard card = AI.Utils.GetProblematicCard();
if (card != null)
return card;
card = Enemy.MonsterZone.GetHighestAttackMonster();
if (card != null)
return card;
List<ClientCard> spells = Enemy.GetSpells();
if (spells.Count > 0)
return spells[0];
return null;
}
}
}
......@@ -45,6 +45,7 @@ namespace WindBot.Game.AI.Decks
public ToadallyAwesomeExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫, DefaultHarpiesFeatherDusterFirst);
AddExecutor(ExecutorType.Activate, (int)CardId.银河旋风, DefaultGalaxyCyclone);
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫);
AddExecutor(ExecutorType.Activate, (int)CardId.黑洞, DefaultDarkHole);
......
......@@ -58,7 +58,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, (int)CardId.我我我枪手);
// 清场
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, 宇宙旋风);
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫, DefaultHarpiesFeatherDusterFirst);
AddExecutor(ExecutorType.Activate, (int)CardId.宇宙旋风, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫);
AddExecutor(ExecutorType.Activate, (int)CardId.黑洞, DefaultDarkHole);
......@@ -140,9 +141,9 @@ namespace WindBot.Game.AI.Decks
// 坑人
AddExecutor(ExecutorType.Activate, (int)CardId.星光大道, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.魔力抽取);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, 神之警告);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, 神之通告);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, 神之宣告);
AddExecutor(ExecutorType.Activate, (int)CardId.神之警告, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.神之通告, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, (int)CardId.神之宣告, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, (int)CardId.大宇宙, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.虚无空间, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.波纹防护罩波浪之力, DefaultUniqueTrap);
......@@ -192,29 +193,6 @@ namespace WindBot.Game.AI.Decks
return attacker.RealPower > defender.GetDefensePower();
}
private bool 宇宙旋风()
{
foreach (ClientCard card in CurrentChain)
if (card.Id == (int)CardId.宇宙旋风)
return false;
return (Duel.LifePoints[0] > 1000) && DefaultMysticalSpaceTyphoon();
}
private bool 神之警告()
{
return (Duel.LifePoints[0] > 2000) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool 神之通告()
{
return (Duel.LifePoints[0] > 1500) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool 神之宣告()
{
return !(Duel.ChainTargets.Count == 1 && Card.Equals(Duel.ChainTargets[0])) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool 强欲而谦虚之壶()
{
if (已发动削命)
......@@ -372,9 +350,5 @@ namespace WindBot.Game.AI.Decks
return LastChainPlayer == 1;
}
private bool DontChainMyself()
{
return LastChainPlayer != 0;
}
}
}
\ No newline at end of file
......@@ -116,9 +116,9 @@ namespace WindBot.Game.AI.Decks
// Set and activate traps
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
AddExecutor(ExecutorType.Activate, (int)CardId.BreakthroughSkill, BreakthroughSkill);
AddExecutor(ExecutorType.Activate, (int)CardId.SolemnWarning, SolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.SolemnStrike, SolemnStrike);
AddExecutor(ExecutorType.Activate, (int)CardId.BreakthroughSkill, DefaultBreakthroughSkill);
AddExecutor(ExecutorType.Activate, (int)CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, (int)CardId.SolemnStrike, DefaultSolemnStrike);
}
public override bool OnSelectHand()
......@@ -276,21 +276,6 @@ namespace WindBot.Game.AI.Decks
return true;
}
private bool BreakthroughSkill()
{
return (CurrentChain.Count > 0 && DefaultTrap());
}
private bool SolemnWarning()
{
return (Duel.LifePoints[0] > 2000) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool SolemnStrike()
{
return (Duel.LifePoints[0] > 1500) && !(Duel.Player == 0 && LastChainPlayer == -1) && DefaultTrap();
}
private bool MonsterRepos()
{
if (Card.Id == (int)CardId.NumberS39UtopiatheLightning)
......
......@@ -39,11 +39,7 @@ namespace WindBot.Game.AI.Decks
十二兽虎炮 = 11510448,
十二兽狗环 = 41375811,
十二兽龙枪 = 48905153,
十二兽牛犄 = 85115440,
雷击坏兽雷鸣龙王 = 48770333,
怒炎坏兽多哥兰 = 93332803,
对坏兽用决战兵器超级机械多哥兰 = 84769941
十二兽牛犄 = 85115440
}
bool 已特殊召唤虎炮 = false;
......@@ -56,14 +52,14 @@ namespace WindBot.Game.AI.Decks
{
// Quick spells
AddExecutor(ExecutorType.Activate, (int)CardId.鹰身女妖的羽毛扫);
AddExecutor(ExecutorType.Activate, (int)CardId.遭受妨碍的坏兽安眠, 遭受妨碍的坏兽安眠效果);
AddExecutor(ExecutorType.Activate, (int)CardId.遭受妨碍的坏兽安眠, DefaultInterruptedKaijuSlumber);
AddExecutor(ExecutorType.Activate, (int)CardId.黑洞, DefaultDarkHole);
AddExecutor(ExecutorType.SpSummon, (int)CardId.海龟坏兽加美西耶勒, 坏兽特殊召唤);
AddExecutor(ExecutorType.SpSummon, (int)CardId.黏丝坏兽库莫古斯, 坏兽特殊召唤);
AddExecutor(ExecutorType.SpSummon, (int)CardId.怪粉坏兽加达拉, 坏兽特殊召唤);
AddExecutor(ExecutorType.SpSummon, (int)CardId.多次元坏兽拉迪安, 坏兽特殊召唤);
AddExecutor(ExecutorType.SpSummon, (int)CardId.坏星坏兽席兹奇埃鲁, 坏兽特殊召唤);
AddExecutor(ExecutorType.SpSummon, (int)CardId.海龟坏兽加美西耶勒, DefaultKaijuSpsummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.黏丝坏兽库莫古斯, DefaultKaijuSpsummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.怪粉坏兽加达拉, DefaultKaijuSpsummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.多次元坏兽拉迪安, DefaultKaijuSpsummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.坏星坏兽席兹奇埃鲁, DefaultKaijuSpsummon);
AddExecutor(ExecutorType.Activate, (int)CardId.星球改造);
AddExecutor(ExecutorType.Activate, (int)CardId.暴走魔法阵);
......@@ -150,73 +146,6 @@ namespace WindBot.Game.AI.Decks
return attacker.RealPower > defender.GetDefensePower();
}
private bool 遭受妨碍的坏兽安眠效果()
{
if (Card.Location == CardLocation.Grave)
{
AI.SelectCard(new[]
{
(int)CardId.海龟坏兽加美西耶勒,
(int)CardId.黏丝坏兽库莫古斯,
(int)CardId.多次元坏兽拉迪安,
(int)CardId.怪粉坏兽加达拉
});
return true;
}
AI.SelectCard(new[]
{
(int)CardId.坏星坏兽席兹奇埃鲁,
(int)CardId.多次元坏兽拉迪安,
(int)CardId.怪粉坏兽加达拉,
(int)CardId.黏丝坏兽库莫古斯
});
AI.SelectNextCard(new[]
{
(int)CardId.海龟坏兽加美西耶勒,
(int)CardId.黏丝坏兽库莫古斯,
(int)CardId.怪粉坏兽加达拉,
(int)CardId.多次元坏兽拉迪安
});
return DefaultDarkHole();
}
private bool 坏兽特殊召唤()
{
IList<int> kaijus = new[] {
(int)CardId.坏星坏兽席兹奇埃鲁,
(int)CardId.怪粉坏兽加达拉,
(int)CardId.海龟坏兽加美西耶勒,
(int)CardId.多次元坏兽拉迪安,
(int)CardId.黏丝坏兽库莫古斯,
(int)CardId.雷击坏兽雷鸣龙王,
(int)CardId.怒炎坏兽多哥兰,
(int)CardId.对坏兽用决战兵器超级机械多哥兰
};
foreach (ClientCard monster in Enemy.GetMonsters())
{
if (kaijus.Contains(monster.Id))
return Card.GetDefensePower() > monster.GetDefensePower();
}
ClientCard card = Enemy.MonsterZone.GetFloodgate();
if (card != null)
{
AI.SelectCard(card);
return true;
}
card = Enemy.MonsterZone.GetDangerousMonster();
if (card != null)
{
AI.SelectCard(card);
return true;
}
card = AI.Utils.GetOneEnemyBetterThanValue(Card.GetDefensePower(), false);
if (card != null)
{
AI.SelectCard(card);
return true;
}
return false;
}
private bool 电光皇特殊召唤()
{
......
This diff is collapsed.
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