Commit 217ca75b authored by 苍蓝's avatar 苍蓝

111

parent ab90d3d9
Pipeline #5615 passed with stage
in 54 seconds
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020) # flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020)
!齿车戒龙 !齿车戒龙
Name=齿车戒龙 Deck=RushDragonDragears Dialog=zh-CN Name=齿车戒龙 Deck=MokeyMokey Dialog=zh-CN
龙法卡组。 龙法卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!破坏剑士 !破坏剑士
Name=破坏剑士 Deck=BusterBlader Dialog=zh-CN Name=破坏剑士 Deck=MokeyMokeyKing Dialog=zh-CN
加强版龙法卡组。需勾选不检查卡组才能对战。 加强版龙法卡组。需勾选不检查卡组才能对战。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
......
#created by ...
#main
120170000
120170000
120170000
120110001
120110001
120110001
120145000
120145000
120105005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120151023
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120150019
120150019
120150019
#extra
!side
#created by ... #created by ygomobile
#main #main
120151006 120151006
120151006 120151006
......
#created by ... #created by ...
#main #main
39552864 120151023
39552864 120170000
39552864 120110001
12482652 120110001
12482652 120110001
12482652 120105001
42941100 120105001
42941100 120105001
42941100 120110005
79335209 120110005
79335209 120105005
79335209 120105005
487395 120145001
487395 120145001
487395 120145001
99171160 120105006
99171160 120105006
99171160 120105006
53776525 120145014
53776525 120145014
53776525 120120018
32274490 120120018
32274490 120120018
32274490 120130016
27288416 120130016
27288416 120130016
27288416 120110009
80825553 120110009
80825553 120110009
80825553
7902349 120105012
8124921 120105012
44519536 120105012
70903634 120110012
69380702 120110012
69380702 120105013
69380702 120105013
3557275 120105013
3557275 120105014
3557275 120170065
120150019
#extra #extra
!side !side
#created by ... #created by ...
#main #main
5464695 120170000
5464695 120170000
5464695 120170000
39256679 120110001
39256679 120110001
39256679 120110001
11549357 120145000
11549357 120145000
11549357 120105005
99785935 120105005
99785935 120105005
99785935 120145001
91152256 120145001
91152256 120145001
91152256 120105006
76812113 120105006
76812113 120105006
76812113 120145014
85639257 120145014
85639257 120120018
85639257 120120018
74093656 120120018
74093656 120130016
74093656 120130016
68505803 120130016
68505803 120110009
68505803 120110009
27288416 120151023
27288416 120105012
27288416 120105012
19384334 120105012
22702055 120110012
23424603 120110012
35956022 120105013
45778932 120105013
50913601 120105013
56594520 120105014
82999629 120150019
86318356 120150019
87430998 120150019
#extra #extra
45815891
45815891
45815891
71594310
71594310
71594310
67598234
67598234
67598234
!side !side
#created by ...
#main
120151023
120170000
120110001
120110001
120110001
120105001
120105001
120105001
120110005
120110005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120110009
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120170065
120150019
#extra
!side
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using System.Linq;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
using System;
namespace WindBot.Game.AI.Decks
{
[Deck("BusterBlader", "AI_BusterBlader")]
public class BusterBladerExecutor : DefaultExecutor
{
public class CardId
{
public const int 青眼白龙 = 120120000;
public const int 破坏之剑士 = 120170000;
public const int 黑魔术师 = 120130000;
public const int 真红眼黑龙 = 120125001;
public const int 恶魔召唤 = 120145000;
public const int 人造人 = 120155000;
public const int 连击龙 = 120110001;
public const int 七星道魔术师 = 120105001;
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 神秘庄家 = 120105006;
public const int 火星心少女 = 120145014;
public const int 斗牛士 = 120170035;
public const int 凤凰龙 = 120110009;
public const int 七星道法师 = 120130016;
public const int sionmax = 120150007;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 暗黑释放 = 120105013;
}
public BusterBladerExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.七星道法师, 七星道法师Effect);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.恶魔召唤, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.雅灭鲁拉, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.黑魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.真红眼黑龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.七星道法师, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.耳语妖精, monsterset);
AddExecutor(ExecutorType.Summon, CardId.七星道法师);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.Activate, CardId.耳语妖精, 耳语妖精Effect);
AddExecutor(ExecutorType.Activate, CardId.火星心少女, 火星心少女Effect);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.七星道魔术师);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
}
private List<int> HintMsgForEnemy = new List<int>
{
HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
};
private List<int> HintMsgForMaxSelect = new List<int>
{
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{
if (Duel.Phase == DuelPhase.BattleStart)
return null;
if (AI.HaveSelectedCards())
return null;
IList<ClientCard> selected = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>(_cards);
if (max > cards.Count)
max = cards.Count;
if (HintMsgForEnemy.Contains(hint))
{
IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
// select enemy's card first
while (enemyCards.Count > 0 && selected.Count < max)
{
ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
}
}
if (HintMsgForMaxSelect.Contains(hint))
{
// select max cards
while (selected.Count < max)
{
ClientCard card = cards[Program.Rand.Next(cards.Count)];
selected.Add(card);
cards.Remove(card);
}
}
return selected;
}
public override bool OnSelectHand()
{
// go first
return true;
}
public bool monsterset()
{
if (Duel.Turn == 1)
{
return true;
}
else if (Bot.HasInHand(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return false;
return true;
}
private bool 耳语妖精Effect()
{
IList<ClientCard> targets = new List<ClientCard>();
foreach (ClientCard card in Enemy.GetGraveyardMonsters())
{
if (card.Level <= 4)
targets.Add(card);
}
return true;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900)
return true;
}
return false;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, true))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
return false;
}
private bool 火星心少女Effect()
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
AI.SelectYesNo(true);
return true;
}
}
}
\ No newline at end of file
using YGOSharp.OCGWrapper.Enums; using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
using WindBot.Game.AI; using WindBot.Game.AI;
using System;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("MokeyMokey", "AI_MokeyMokey", "Easy")] [Deck("MokeyMokey", "AI_MokeyMokey")]
public class MokeyMokeyExecutor : DefaultExecutor public class MokeyMokeyExecutor : DefaultExecutor
{ {
public class CardId public class CardId
{ {
public const int LeoWizard = 4392470; public const int 青眼白龙 = 120120000;
public const int Bunilla = 69380702; public const int 破坏之剑士 = 120170000;
public const int 黑魔术师 = 120130000;
public const int 真红眼黑龙 = 120125001;
public const int 恶魔召唤 = 120145000;
public const int 人造人 = 120155000;
public const int 连击龙 = 120110001;
public const int 七星道魔术师 = 120105001;
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 神秘庄家 = 120105006;
public const int 火星心少女 = 120145014;
public const int 斗牛士 = 120170035;
public const int 凤凰龙 = 120110009;
public const int 七星道法师 = 120130016;
public const int sionmax = 120150007;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 暗黑释放 = 120105013;
} }
private int RockCount = 0;
public MokeyMokeyExecutor(GameAI ai, Duel duel) public MokeyMokeyExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.Summon); AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.七星道法师,七星道法师Effect);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.恶魔召唤, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.雅灭鲁拉, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.黑魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.真红眼黑龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.七星道法师, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.耳语妖精, monsterset);
AddExecutor(ExecutorType.Summon, CardId.七星道法师);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet); AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.Activate, CardId.耳语妖精, 耳语妖精Effect);
AddExecutor(ExecutorType.Activate, CardId.火星心少女, 火星心少女Effect);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.七星道魔术师);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
} }
public override int OnRockPaperScissors()
private List<int> HintMsgForEnemy = new List<int>
{
HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
};
private List<int> HintMsgForMaxSelect = new List<int>
{
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{ {
RockCount++; if (Duel.Phase == DuelPhase.BattleStart)
if (RockCount <= 3) return null;
return 2; if (AI.HaveSelectedCards())
else return null;
return base.OnRockPaperScissors();
IList<ClientCard> selected = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>(_cards);
if (max > cards.Count)
max = cards.Count;
if (HintMsgForEnemy.Contains(hint))
{
IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
// select enemy's card first
while (enemyCards.Count > 0 && selected.Count < max)
{
ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
} }
}
if (HintMsgForMaxSelect.Contains(hint))
{
// select max cards
while (selected.Count < max)
{
ClientCard card = cards[Program.Rand.Next(cards.Count)];
selected.Add(card);
cards.Remove(card);
}
}
return selected;
}
public override bool OnSelectHand()
{
// go first
return true;
}
public bool monsterset()
{
if (Duel.Turn == 1)
{
return true;
}
else if (Bot.HasInHand(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return false;
return true;
}
private bool 耳语妖精Effect()
{
IList<ClientCard> targets = new List<ClientCard>();
foreach (ClientCard card in Enemy.GetGraveyardMonsters())
{
if (card.Level <= 4)
targets.Add(card);
}
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900)
return true;
}
return false;
}
private bool 火星心少女Effect()
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
AI.SelectYesNo(true);
return true;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
if (Enemy.GetMonsters().GetHighestAttackMonster() == null)
{
AI.SelectNextCard(Enemy.MonsterZone.GetHighestDefenseMonster());
}
AI.SelectNextCard(Enemy.MonsterZone.GetHighestAttackMonster());
return true;
}
return false;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
} }
} }
using YGOSharp.OCGWrapper.Enums; using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
using WindBot.Game.AI; using WindBot.Game.AI;
using System;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("MokeyMokeyKing", "AI_MokeyMokeyKing", "Easy")] [Deck("MokeyMokeyKing", "AI_MokeyMokeyKing")]
public class MokeyMokeyKingExecutor : DefaultExecutor public class MokeyMokeyKingExecutor : DefaultExecutor
{ {
public class CardId public class CardId
{ {
public const int LeoWizard = 4392470; public const int 青眼白龙 = 120120000;
public const int Bunilla = 69380702; public const int 破坏之剑士 = 120170000;
public const int 黑魔术师 = 120130000;
public const int 真红眼黑龙 = 120125001;
public const int 恶魔召唤 = 120145000;
public const int 人造人 = 120155000;
public const int 连击龙 = 120110001;
public const int 七星道魔术师 = 120105001;
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 神秘庄家 = 120105006;
public const int 火星心少女 = 120145014;
public const int 斗牛士 = 120170035;
public const int 凤凰龙 = 120110009;
public const int 七星道法师 = 120130016;
public const int sionmax = 120150007;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 暗黑释放 = 120105013;
} }
private int RockCount = 0;
public MokeyMokeyKingExecutor(GameAI ai, Duel duel) public MokeyMokeyKingExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.SpSummon); AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.SummonOrSet); AddExecutor(ExecutorType.Activate, CardId.七星道法师, 七星道法师Effect);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.恶魔召唤, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.雅灭鲁拉, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.黑魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.真红眼黑龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.七星道法师, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.耳语妖精, monsterset);
AddExecutor(ExecutorType.Summon, CardId.七星道法师);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Activate, DefaultField); AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.Activate, CardId.耳语妖精, 耳语妖精Effect);
AddExecutor(ExecutorType.Activate, CardId.火星心少女, 火星心少女Effect);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.七星道魔术师);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
} }
public override int OnRockPaperScissors()
private List<int> HintMsgForEnemy = new List<int>
{ {
RockCount++; HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
if (RockCount <= 3) HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
return 2; };
else private List<int> HintMsgForMaxSelect = new List<int>
return base.OnRockPaperScissors(); {
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{
if (Duel.Phase == DuelPhase.BattleStart)
return null;
if (AI.HaveSelectedCards())
return null;
IList<ClientCard> selected = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>(_cards);
if (max > cards.Count)
max = cards.Count;
if (HintMsgForEnemy.Contains(hint))
{
IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
// select enemy's card first
while (enemyCards.Count > 0 && selected.Count < max)
{
ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
}
} }
if (HintMsgForMaxSelect.Contains(hint))
{
// select max cards
while (selected.Count < max)
{
ClientCard card = cards[Program.Rand.Next(cards.Count)];
selected.Add(card);
cards.Remove(card);
}
}
return selected;
}
public override bool OnSelectHand()
{
// go first
return true;
}
public bool monsterset()
{
if (Duel.Turn == 1)
{
return true;
}
else if (Bot.HasInHand(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return false;
return true;
}
private bool 耳语妖精Effect()
{
IList<ClientCard> targets = new List<ClientCard>();
foreach (ClientCard card in Enemy.GetGraveyardMonsters())
{
if (card.Level <= 4)
targets.Add(card);
}
return true;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900)
return true;
}
return false;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, true))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
return false;
}
private bool 火星心少女Effect()
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
AI.SelectYesNo(true);
return true;
}
} }
} }
\ No newline at end of file
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using System.Linq;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
using System;
namespace WindBot.Game.AI.Decks
{
[Deck("RushDragonDragears", "AI_RushDragonDragears")]
public class RushDragonDragearsExecutor : DefaultExecutor
{
public class CardId
{
public const int 青眼白龙 = 120120000;
public const int 破坏之剑士 = 120170000;
public const int 黑魔术师 = 120130000;
public const int 真红眼黑龙 = 120125001;
public const int 恶魔召唤 = 120145000;
public const int 人造人 = 120155000;
public const int 连击龙 = 120110001;
public const int 七星道魔术师 = 120105001;
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 神秘庄家 = 120105006;
public const int 火星心少女 = 120145014;
public const int 斗牛士 = 120170035;
public const int 凤凰龙 = 120110009;
public const int 七星道法师 = 120130016;
public const int sionmax = 120150007;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 暗黑释放 = 120105013;
}
public RushDragonDragearsExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.七星道法师,七星道法师Effect);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.恶魔召唤, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.雅灭鲁拉, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.黑魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.真红眼黑龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.七星道法师, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.耳语妖精, monsterset);
AddExecutor(ExecutorType.Summon, CardId.七星道法师);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.Activate, CardId.耳语妖精, 耳语妖精Effect);
AddExecutor(ExecutorType.Activate, CardId.火星心少女, 火星心少女Effect);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.七星道魔术师);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
}
private List<int> HintMsgForEnemy = new List<int>
{
HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
};
private List<int> HintMsgForMaxSelect = new List<int>
{
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{
if (Duel.Phase == DuelPhase.BattleStart)
return null;
if (AI.HaveSelectedCards())
return null;
IList<ClientCard> selected = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>(_cards);
if (max > cards.Count)
max = cards.Count;
if (HintMsgForEnemy.Contains(hint))
{
IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
// select enemy's card first
while (enemyCards.Count > 0 && selected.Count < max)
{
ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
}
}
if (HintMsgForMaxSelect.Contains(hint))
{
// select max cards
while (selected.Count < max)
{
ClientCard card = cards[Program.Rand.Next(cards.Count)];
selected.Add(card);
cards.Remove(card);
}
}
return selected;
}
public override bool OnSelectHand()
{
// go first
return true;
}
public bool monsterset()
{
if (Duel.Turn == 1)
{
return true;
}
else if (Bot.HasInHand(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return false;
return true;
}
private bool 耳语妖精Effect()
{
IList<ClientCard> targets = new List<ClientCard>();
foreach (ClientCard card in Enemy.GetGraveyardMonsters())
{
if (card.Level <= 4)
targets.Add(card);
}
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900)
return true;
}
return false;
}
private bool 火星心少女Effect()
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster());
AI.SelectYesNo(true);
return true;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
if (Enemy.GetMonsters().GetHighestAttackMonster() == null)
{
AI.SelectNextCard(Enemy.MonsterZone.GetHighestDefenseMonster());
}
AI.SelectNextCard(Enemy.MonsterZone.GetHighestAttackMonster());
return true;
}
return false;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
}
}
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<Compile Include="Game\AI\DeckAttribute.cs" /> <Compile Include="Game\AI\DeckAttribute.cs" />
<Compile Include="Game\AI\DecksManager.cs" /> <Compile Include="Game\AI\DecksManager.cs" />
<Compile Include="Game\AI\Decks\AltergeistExecutor.cs" /> <Compile Include="Game\AI\Decks\AltergeistExecutor.cs" />
<Compile Include="Game\AI\Decks\DinocarriageDynarmixExecutor.cs" />
<Compile Include="Game\AI\Decks\FamiliarPossessedExecutor.cs" /> <Compile Include="Game\AI\Decks\FamiliarPossessedExecutor.cs" />
<Compile Include="Game\AI\Decks\BlackwingExecutor.cs" /> <Compile Include="Game\AI\Decks\BlackwingExecutor.cs" />
<Compile Include="Game\AI\Decks\LuckyExecutor.cs" /> <Compile Include="Game\AI\Decks\LuckyExecutor.cs" />
...@@ -154,9 +155,6 @@ ...@@ -154,9 +155,6 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="bots.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Decks\*.ydk"> <None Include="Decks\*.ydk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
{ {
"name": "齿车戒龙", "name": "齿车戒龙",
"deck": "RushDragonDragears", "deck": "MokeyMokey",
"dialog": "zh-CN" "dialog": "zh-CN"
}, },
{ {
"name": "破坏剑士", "name": "破坏剑士",
"deck": "BusterBlader", "deck": "MokeyMokeyKing",
"dialog": "zh-CN" "dialog": "zh-CN"
}, },
{ {
......
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