Commit b7592a90 authored by 苍蓝's avatar 苍蓝

传说更新

parent 90f88870
Pipeline #19983 passed with stage
in 2 minutes and 16 seconds
......@@ -6,12 +6,12 @@
!齿车戒龙
Name=齿车戒龙 Deck=MokeyMokey Dialog=rd-a
卡组。
卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!破坏剑士
Name=破坏剑士 Deck=MokeyMokeyKing Dialog=zh-CN
加强版龙法卡组。需勾选不检查卡组才能对战
加强版龙魔卡组
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!大恐龙驾
......@@ -33,3 +33,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
Name=幻宇子 Deck=Mituzi Dialog=Mituzi.zh-CN
新手友好型幻龙卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!P2-自选卡组
Name=P2 Deck=Lucky Dialog=gugugu.zh-CN
人机卡组由你选择。随缘出牌。
SELECT_DECKFILE SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
\ No newline at end of file
#created by ...
#main
2563463
81866673
72090076
63362460
30680659
30680659
30680659
26202165
26202165
26202165
91646304
14558127
14558127
14558127
72291078
72291078
23434538
23434538
9742784
97268402
3285551
3285551
3285551
18144506
52947044
52947044
52947044
81439173
83764718
24224830
24224830
65681983
65681983
39568067
38745520
10045474
10045474
10045474
40605147
40605147
#extra
15291624
60461804
84815190
92519087
27548199
42566602
90953320
98558751
21915012
44097050
50588353
70369116
98978921
98978921
60303245
!side
55063751
55063751
55063751
34267821
34267821
34267821
43534808
43534808
43534808
94145021
94145021
94145021
14532163
14532163
14532163
#created by ygomobile
#created by ...
#main
120151006
120151006
......@@ -9,6 +9,7 @@
120151005
120151005
120151005
120194001
120130029
120130029
120130029
......@@ -21,25 +22,23 @@
120151013
120151013
120151011
120151011
120151009
120151009
120151009
120151010
120151010
120151010
120151015
120151015
120151016
120151018
120151018
120151018
120151015
120151015
120151017
120151017
120151016
120151020
120151020
120151020
120151019
120232005
#extra
!side
#created by ...
#main
120238019
120199020
120199020
120199020
120155024
120155024
120155024
120151029
120151029
120155002
......@@ -8,17 +15,11 @@
120155001
120155001
120155001
120155022
120155022
120155024
120155024
120155024
120192010
120192010
120192010
120192011
120192011
120192011
120183034
120183034
120183034
......@@ -37,8 +38,8 @@
120155042
120151033
120151033
120155053
120155053
120155054
120155053
120198003
#extra
!side
#created by ...
#main
120151023
120170000
120110001
120110001
......@@ -8,8 +7,6 @@
120105001
120105001
120105001
120110005
120110005
120105005
120105005
120145001
......@@ -18,8 +15,6 @@
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
......@@ -29,16 +24,20 @@
120110009
120110009
120110009
120228031
120228031
120226013
120226013
120226013
120231069
120228050
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120170065
120150019
#extra
......
#created by ...
#main
120170000
120170000
120170000
120120000
120120000
120120000
120110001
120110001
120110001
120145000
120145000
120105001
120105005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120228031
120228031
120228031
120120018
120120018
120130016
......@@ -27,18 +26,20 @@
120130016
120110009
120110009
120151023
120105012
120110009
120181003
120194004
120231069
120203028
120203028
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120150019
120150019
120150019
120232005
120198003
#extra
!side
#created by ...
#main
120193002
120183002
120183031
120155015
120155015
120155015
120181011
120181011
120181011
120183054
120183054
120181001
120193002
120193002
120183002
120183002
120183002
120181001
120181001
120155015
120155015
120183024
120183024
120208000
120193002
120193002
120193002
120183002
120224010
120224010
120224010
120183031
120183031
120183030
120183030
120183030
120151010
120183031
120183031
120183031
120181011
120181011
120181011
120193003
120193003
120193003
120199052
120199052
120183054
120183054
120231069
120130039
120130039
120183054
120151023
120155060
120155060
120183062
120183063
120183063
120170061
120183064
120198003
#extra
!side
......@@ -3,42 +3,42 @@
120120000
120120000
120120000
120170000
120170000
120110001
120110001
120155000
120194001
120130000
120130000
120130000
120208000
120194002
120194002
120194002
120194003
120194003
120194003
120151010
120151010
120110009
120110009
120110009
120170035
120170035
120223101
120223101
120223101
120214001
120214001
120214001
120199032
120199032
120199032
120120017
120120017
120120017
120194004
120151023
120151023
120151023
120181003
120181003
120181003
120151018
120151018
120194005
120194005
120194005
120150019
120150019
120203028
120203028
120130041
120130041
120214010
120194004
120214003
120217100
120150019
120198003
120198003
120198003
#extra
!side
#created by ...
#main
5206415
32731036
32731036
90488465
6637331
6637331
33854624
33854624
29596581
29596581
83107873
83107873
31786629
31786629
31786629
56713174
56713174
56713174
61901281
61901281
99234526
99234526
92998610
92998610
44586426
44586426
44586426
14558127
14558127
23434538
23434538
23434538
76218313
20318029
20318029
20318029
1475311
1475311
1475311
75500286
95238394
95238394
99266988
99266988
99266988
24224830
24224830
34090915
10045474
10045474
#extra
41685633
41685633
15291624
21044178
98127546
21887175
86066372
4280258
38342335
83152482
65741786
50277355
70369116
73539069
41999284
!side
{
"welcome": [
"你好呀,打牌人",
"你好,欢迎和我耍牌"
],
"deckerror": [
"抱歉,我的卡组需要{0}才可以耍"
],
"duelstart": [
"嘿嘿,我要用二哥打爆你。",
"我的卡组不屁股,也就塞了几张禁卡捏",
"我只会耍简单的卡组,不要用禁卡和我打拉"
],
"newturn": [
"到我喽,抽卡!(裤裆偷偷掏出)",
"我抽一张卡"
],
"endturn": [
"我耍完了,到你了",
"到你回合了哦,不会是多线程决斗吧?"
],
"directattack": [
"{0},攻击对手!",
"{0},撞烂它!",
"{0},小拳揍它!"
],
"attack": [
"{0},把{1}打倒!",
"嘿嘿,{0},攻击{1}!"
],
"ondirectattack": [
"啊,不要打我,我放禁卡给你玩",
"呀,太强辣,可以带带我嘛",
"好痛...想拔电源"
],
"facedownmonstername": "怪兽",
"activate": [
"嘿嘿,我发动{0}",
"嘎嘎,我使用{0}的力量"
],
"summon": [
"我召唤(掏出){0}!",
"出来,我的小怪兽{0}!"
],
"setmonster": [
"我放置一只不知名怪兽。"
],
"chaining": [
"嘿,我能用禁卡气不气?",
"乎,我发动{0}!",
"不好意思拉,我有{0}",
"哈哈,发动{0}的效果!"
]
}
......@@ -12,7 +12,7 @@
"接下来就是我的舞台"
],
"endturn": [
"我的回合结束,试试来击溃我吧"
"每个人的目的不同,我更注重强度,我只想赢。"
],
"directattack": [
"老子上了,要你的命"
......
......@@ -22,7 +22,7 @@
"directattack": [
"{0},直接攻击!",
"不过如此嘛,直接攻击!",
"快走开,我要回去睡觉了。",
"快走开,我要回去睡觉了。"
],
"attack": [
"{0},攻击{1}!",
......
......@@ -23,7 +23,10 @@ namespace WindBot.Game.AI
{
return !card.IsDisabled() && Enum.IsDefined(typeof(DangerousMonster), card.Id);
}
public static bool IsMonsterImmuneTrap(this ClientCard card)
{
return !card.IsDisabled() && Enum.IsDefined(typeof(ImmuneTrapMonster), card.Id);
}
/// <summary>
/// Do this monster prevents activation of opponent's effect monsters in battle?
/// </summary>
......
using System;
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
using System.Linq;
namespace WindBot.Game.AI.Decks
{
[Deck("Brave", "AI_Brave")]
class BraveExecutor : DefaultExecutor
{
public class CardId
{
public const int WanderingGryphonRider = 2563463;
public const int DestinyHeroDasher = 81866673;
public const int NemesesCorridor = 72090076;
public const int DestinyHeroCelestial = 63362460;
public const int AquamancerOfTheSanctuary = 30680659;
public const int Sangan = 26202165;
public const int CrusadiaArboria = 91646304;
public const int AshBlossomJoyousSpring = 14558127;
public const int MechaPhantomBeastOLion = 72291078;
public const int MaxxC = 23434538;
public const int JetSynchron = 9742784;
public const int EffectVeiler = 97268402;
public const int RiteofAramesia = 3285551;
public const int HarpiesFeatherDuster = 18144506;
public const int FusionDestiny = 52947044;
public const int FoolishBurial = 81439173;
public const int MonsterReborn = 83764718;
public const int CalledByTheGrave = 24224830;
public const int CrossoutDesignator = 65681983;
public const int JourneyOfDestiny = 39568067;
public const int DracobackTheDragonSteed = 38745520;
public const int InfiniteImpermanence = 10045474;
public const int SolemnStrike = 40605147;
public const int ThunderDragonColossus = 15291624;
public const int DestinyHeroDestroyPhoenixEnforcer = 60461804;
public const int BaronessDeFleur = 84815190;
public const int VirtualWorldKyubiShenshen = 92519087;
public const int BorreloadSavageDragon = 27548199;
public const int CoralDragon = 42566602;
public const int TGHyperLibrarian = 90953320;
public const int TGWonderMagician = 98558751;
public const int CupidPitch = 21915012;
public const int MechaPhantomBeastAuroradon = 44097050;
public const int CrystronHalqifibrax = 50588353;
public const int PredaplantVerteAnaconda = 70369116;
public const int LinkSpider = 98978921;
public const int SalamangreatAlmiraj = 60303245;
public const int BraveToken = 3285552;
public const int MechaPhantomBeastToken = 31533705;
public const int PrimalBeingToken = 27204312;
}
public BraveExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.WanderingGryphonRider, WanderingGryphonRiderCounter);
AddExecutor(ExecutorType.Activate, CardId.AshBlossomJoyousSpring, DefaultAshBlossomAndJoyousSpring);
AddExecutor(ExecutorType.Activate, CardId.CalledByTheGrave, DefaultCalledByTheGrave);
AddExecutor(ExecutorType.Activate, CardId.CrossoutDesignator, CrossoutDesignatorEffect);
AddExecutor(ExecutorType.Activate, CardId.EffectVeiler, DefaultEffectVeiler);
AddExecutor(ExecutorType.Activate, CardId.InfiniteImpermanence, DefaultInfiniteImpermanence);
AddExecutor(ExecutorType.Activate, CardId.BorreloadSavageDragon, BorreloadSavageDragonEffect);
AddExecutor(ExecutorType.Activate, CardId.BaronessDeFleur, BaronessDeFleurEffect);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, CardId.MaxxC, DefaultMaxxC);
AddExecutor(ExecutorType.Activate, CardId.HarpiesFeatherDuster);
AddExecutor(ExecutorType.Activate, CardId.ThunderDragonColossus);
AddExecutor(ExecutorType.Activate, CardId.DracobackTheDragonSteed, DracobackTheDragonSteedBounce);
AddExecutor(ExecutorType.Activate, CardId.DestinyHeroDestroyPhoenixEnforcer, DestinyHeroDestroyPhoenixEnforcerEffect);
AddExecutor(ExecutorType.Activate, CardId.RiteofAramesia, RiteofAramesiaEffect);
AddExecutor(ExecutorType.Activate, CardId.AquamancerOfTheSanctuary, AquamancerOfTheSanctuarySearchEffect);
AddExecutor(ExecutorType.Activate, CardId.JourneyOfDestiny, JourneyOfDestinyActivate);
AddExecutor(ExecutorType.Activate, CardId.WanderingGryphonRider, WanderingGryphonRiderSummon);
AddExecutor(ExecutorType.Activate, CardId.FoolishBurial, FoolishBurialFirst);
AddExecutor(ExecutorType.Summon, CardId.Sangan);
AddExecutor(ExecutorType.Summon, CardId.MechaPhantomBeastOLion);
AddExecutor(ExecutorType.Activate, CardId.MechaPhantomBeastOLion, MechaPhantomBeastOLionEffect);
AddExecutor(ExecutorType.Summon, CardId.JetSynchron);
AddExecutor(ExecutorType.Activate, CardId.JourneyOfDestiny, JourneyOfDestinyEffect);
AddExecutor(ExecutorType.SpSummon, CardId.SalamangreatAlmiraj, SalamangreatAlmirajSummonFirst);
AddExecutor(ExecutorType.SpSummon, CardId.CrusadiaArboria, CrusadiaArboriaSummon);
AddExecutor(ExecutorType.SpSummon, CardId.CrystronHalqifibrax, CrystronNeedlefiberSummon);
AddExecutor(ExecutorType.Activate, CardId.CrystronHalqifibrax, CrystronNeedlefiberEffect);
AddExecutor(ExecutorType.SpSummon, CardId.MechaPhantomBeastAuroradon, MechaPhantomBeastAuroradonSummon);
AddExecutor(ExecutorType.Activate, CardId.MechaPhantomBeastAuroradon, MechaPhantomBeastAuroradonEffect);
AddExecutor(ExecutorType.Activate, CardId.AquamancerOfTheSanctuary, AquamancerOfTheSanctuarySummonEffect);
AddExecutor(ExecutorType.SpSummon, CardId.TGHyperLibrarian, TGHyperLibrarianSummon);
AddExecutor(ExecutorType.Activate, CardId.TGHyperLibrarian);
AddExecutor(ExecutorType.SpSummon, CardId.CupidPitch, CupidPitchSummon);
AddExecutor(ExecutorType.Activate, CardId.CupidPitch, CupidPitchEffect);
AddExecutor(ExecutorType.Activate, CardId.JetSynchron, JetSynchronEffect);
AddExecutor(ExecutorType.SpSummon, CardId.SalamangreatAlmiraj, SalamangreatAlmirajSummon);
AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider, LinkSpiderSummon);
AddExecutor(ExecutorType.Activate, CardId.DracobackTheDragonSteed, DracobackTheDragonSteedEquip);
AddExecutor(ExecutorType.SpSummon, CardId.BorreloadSavageDragon, BorreloadSavageDragonSummon);
AddExecutor(ExecutorType.Activate, CardId.NemesesCorridor);
AddExecutor(ExecutorType.SpSummon, CardId.ThunderDragonColossus);
AddExecutor(ExecutorType.Summon, CardId.CrusadiaArboria, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.AshBlossomJoyousSpring, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.EffectVeiler, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.AquamancerOfTheSanctuary, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.MaxxC, SummonForMaterial);
AddExecutor(ExecutorType.Activate, CardId.FoolishBurial, FoolishBurialEffect);
AddExecutor(ExecutorType.Activate, CardId.MonsterReborn, MonsterRebornEffect);
AddExecutor(ExecutorType.SpSummon, CardId.BaronessDeFleur, BaronessDeFleurSummon);
AddExecutor(ExecutorType.SpSummon, CardId.VirtualWorldKyubiShenshen, VirtualWorldKyubiShenshenSummon);
AddExecutor(ExecutorType.Activate, CardId.VirtualWorldKyubiShenshen, VirtualWorldKyubiShenshenEffect);
AddExecutor(ExecutorType.SpSummon, CardId.CoralDragon);
AddExecutor(ExecutorType.Activate, CardId.CoralDragon, CoralDragonEffect);
AddExecutor(ExecutorType.Activate, CardId.TGWonderMagician, TGWonderMagicianEffect);
AddExecutor(ExecutorType.Activate, CardId.FusionDestiny, FusionDestinyEffect);
AddExecutor(ExecutorType.SpSummon, CardId.PredaplantVerteAnaconda, PredaplantVerteAnacondaSummon);
AddExecutor(ExecutorType.Activate, CardId.PredaplantVerteAnaconda, PredaplantVerteAnacondaEffect);
AddExecutor(ExecutorType.Summon, CardId.NemesesCorridor, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.DestinyHeroCelestial, SummonForMaterial);
AddExecutor(ExecutorType.Activate, CardId.DestinyHeroDasher, DestinyHeroDasherEffect);
AddExecutor(ExecutorType.Activate, CardId.DestinyHeroCelestial, DestinyHeroCelestialEffect);
AddExecutor(ExecutorType.Repos, MonsterRepos);
AddExecutor(ExecutorType.SpellSet, CardId.InfiniteImpermanence, TrapSet);
AddExecutor(ExecutorType.SpellSet, CardId.SolemnStrike, TrapSet);
AddExecutor(ExecutorType.SpellSet, CardId.CrossoutDesignator, TrapSet);
AddExecutor(ExecutorType.MonsterSet, CardId.Sangan);
AddExecutor(ExecutorType.SpellSet, SetForCelestial);
}
private bool BeastOLionUsed = false;
private bool JetSynchronUsed = false;
private bool FusionDestinyUsed = false;
private bool BaronessDeFleurUsed = false;
private ClientCard PhoenixTarget = null;
private int PhoenixSelectingTarget = 0;
public override bool OnSelectHand()
{
// go first
return true;
}
public override void OnNewTurn()
{
BeastOLionUsed = false;
JetSynchronUsed = false;
FusionDestinyUsed = false;
PhoenixTarget = null;
PhoenixSelectingTarget = 0;
}
public override CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions)
{
YGOSharp.OCGWrapper.NamedCard cardData = YGOSharp.OCGWrapper.NamedCard.Get(cardId);
if (cardData != null)
{
if (cardData.Attack <= 1000)
return CardPosition.FaceUpDefence;
if (Util.IsTurn1OrMain2() && cardData.Attack <= 2500)
return CardPosition.FaceUpDefence;
}
return 0;
}
public override int OnSelectPlace(int cardId, int player, CardLocation location, int available)
{
if (location == CardLocation.MonsterZone)
{
if (cardId == CardId.SalamangreatAlmiraj)
{
return available & Zones.ExtraMonsterZones;
}
if (cardId == CardId.TGHyperLibrarian && Bot.GetMonsterCount() >= 3)
{
return available & Zones.ExtraMonsterZones;
}
return available & Zones.MainMonsterZones & ~Bot.GetLinkedZones() & ~(Zones.z2 + Zones.z4); // preserve place for arboria
}
return 0;
}
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
if (hint != HintMsg.Destroy)
PhoenixSelectingTarget = 0;
if (hint == HintMsg.AddToHand && max == 1)
{
foreach (ClientCard card in cards)
{
if (card.IsCode(CardId.CrusadiaArboria))
return new List<ClientCard>(new[] { card });
if (card.IsCode(CardId.NemesesCorridor))
return new List<ClientCard>(new[] { card });
}
foreach (ClientCard card in cards)
{
if (card.IsCode(CardId.MaxxC) && !Bot.HasInHand(CardId.MaxxC))
return new List<ClientCard>(new[] { card });
if (card.IsCode(CardId.AshBlossomJoyousSpring) && !Bot.HasInHand(CardId.AshBlossomJoyousSpring))
return new List<ClientCard>(new[] { card });
if (card.IsCode(CardId.EffectVeiler) && !Bot.HasInHand(CardId.EffectVeiler))
return new List<ClientCard>(new[] { card });
}
}
if (hint == HintMsg.SpSummon && max == 1)
{
foreach (ClientCard card in cards)
{
if (card.IsCode(CardId.DestinyHeroDestroyPhoenixEnforcer))
return new List<ClientCard>(new[] { card });
}
}
if (hint == HintMsg.Destroy && max == 1)
{
PhoenixSelectingTarget++;
if (PhoenixSelectingTarget >= 2 && !cards.Contains(PhoenixTarget))
{
ClientCard target = Util.GetProblematicEnemyCard();
if (target == null || !cards.Contains(target))
target = Util.GetBestEnemyCard();
if (target != null && cards.Contains(target))
return new List<ClientCard>(new[] { target });
}
}
if (hint == HintMsg.LinkMaterial && cancelable && min == 0)
{
// TODO: not working
return new List<ClientCard>();
}
return base.OnSelectCard(cards, min, max, hint, cancelable);
}
public override int OnSelectOption(IList<int> options)
{
if (options.Count == 2 && options[0] == Util.GetStringId(CardId.CupidPitch, 1))
return 0;
else return base.OnSelectOption(options);
}
private IList<int> GetHandCost()
{
List<int> result = new List<int> { };
if (Bot.HasInMonstersZone(CardId.BraveToken))
result.Add(CardId.DracobackTheDragonSteed);
if (Bot.Hand.Count(card => card.IsCode(CardId.FusionDestiny)) >= 2)
result.Add(CardId.FusionDestiny);
if (Bot.Hand.Count(card => card.IsCode(CardId.Sangan)) >= 2)
result.Add(CardId.Sangan);
if (Bot.Hand.Count(card => card.IsCode(CardId.RiteofAramesia)) >= 2)
result.Add(CardId.RiteofAramesia);
if (Bot.Hand.Count(card => card.IsCode(CardId.AquamancerOfTheSanctuary)) >= 2)
result.Add(CardId.AquamancerOfTheSanctuary);
if (Bot.HasInGraveyardOrInBanished(CardId.DestinyHeroCelestial) || !Bot.HasInExtra(CardId.DestinyHeroDestroyPhoenixEnforcer))
result.Add(CardId.DestinyHeroDasher);
if (Bot.HasInGraveyardOrInBanished(CardId.DestinyHeroDasher) || !Bot.HasInExtra(CardId.DestinyHeroDestroyPhoenixEnforcer))
result.Add(CardId.DestinyHeroCelestial);
if (Bot.Hand.Count(card => card.IsCode(CardId.AshBlossomJoyousSpring)) >= 2)
result.Add(CardId.AshBlossomJoyousSpring);
if (Bot.Hand.Count(card => card.IsCode(CardId.CrossoutDesignator)) >= 2)
result.Add(CardId.CrossoutDesignator);
if (Bot.HasInHand(result))
return result;
result.AddRange(new int[]{
CardId.HarpiesFeatherDuster,
CardId.MechaPhantomBeastOLion,
CardId.Sangan,
CardId.AshBlossomJoyousSpring,
CardId.MaxxC,
CardId.EffectVeiler,
CardId.CrossoutDesignator,
CardId.CalledByTheGrave,
CardId.RiteofAramesia,
CardId.AquamancerOfTheSanctuary,
CardId.InfiniteImpermanence,
CardId.SolemnStrike
});
return result;
}
private bool WanderingGryphonRiderCounter()
{
if (Card.Location == CardLocation.Hand)
return false;
return Duel.LastChainPlayer == 1;
}
private bool CrossoutDesignatorEffect()
{
ClientCard LastChainCard = Util.GetLastChainCard();
if (LastChainCard == null || Duel.LastChainPlayer != 1) return false;
return CrossoutDesignatorCheck(LastChainCard, CardId.AquamancerOfTheSanctuary, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.Sangan, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.AshBlossomJoyousSpring, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.MaxxC, 2)
|| CrossoutDesignatorCheck(LastChainCard, CardId.EffectVeiler, 1)
|| CrossoutDesignatorCheck(LastChainCard, CardId.RiteofAramesia, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.HarpiesFeatherDuster, 1)
|| CrossoutDesignatorCheck(LastChainCard, CardId.FusionDestiny, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.FoolishBurial, 1)
|| CrossoutDesignatorCheck(LastChainCard, CardId.MonsterReborn, 1)
|| CrossoutDesignatorCheck(LastChainCard, CardId.CalledByTheGrave, 2)
|| CrossoutDesignatorCheck(LastChainCard, CardId.CrossoutDesignator, 3)
|| CrossoutDesignatorCheck(LastChainCard, CardId.InfiniteImpermanence, 3)
;
}
private bool CrossoutDesignatorCheck(ClientCard LastChainCard, int id, int count)
{
if (LastChainCard.IsCode(id) && Bot.GetRemainingCount(id, count) > 0)
{
AI.SelectAnnounceID(id);
return true;
}
return false;
}
private bool DestinyHeroDestroyPhoenixEnforcerEffect()
{
if (Card.Location == CardLocation.Grave)
return true;
else
{
ClientCard target = Util.GetProblematicEnemyCard(2500);
if (target != null && !Util.ChainContainPlayer(0))
{
AI.SelectCard(CardId.DestinyHeroDestroyPhoenixEnforcer);
AI.SelectNextCard(target);
return true;
}
target = Util.GetBestEnemyCard();
if (target == null)
return false;
if (DefaultOnBecomeTarget() || Bot.UnderAttack || Duel.Phase == DuelPhase.End
|| (Duel.Player == 0 && Util.IsTurn1OrMain2())
|| (Duel.Player == 1 && Enemy.GetMonsterCount() >= 2))
{
PhoenixTarget = target;
AI.SelectCard(CardId.DestinyHeroDestroyPhoenixEnforcer);
AI.SelectNextCard(target);
return true;
}
return false;
}
}
private bool DracobackTheDragonSteedBounce()
{
if (Card.Location != CardLocation.SpellZone)
return false;
ClientCard target = Util.GetProblematicEnemyCard();
AI.SelectCard(target);
return true;
}
private bool DracobackTheDragonSteedEquip()
{
if (Card.Location == CardLocation.SpellZone)
return false;
if (Card.Location == CardLocation.Grave)
return true;
if (Bot.HasInMonstersZone(CardId.BraveToken, faceUp: true))
{
AI.SelectCard(CardId.BraveToken);
return true;
}
return false;
}
private bool BorreloadSavageDragonSummon()
{
int[] materials = new[] {
CardId.CupidPitch,
CardId.MechaPhantomBeastToken,
CardId.AquamancerOfTheSanctuary
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
return false;
}
private bool BorreloadSavageDragonEffect()
{
if (ActivateDescription == -1)
{
AI.SelectCard(new[] { CardId.MechaPhantomBeastAuroradon, CardId.CrystronHalqifibrax, CardId.PredaplantVerteAnaconda });
return true;
}
else
{
return true;
}
}
private bool RiteofAramesiaEffect()
{
AI.SelectYesNo(true);
return true;
}
private bool WanderingGryphonRiderSummon()
{
if (Card.Location != CardLocation.Hand)
return false;
return Bot.HasInMonstersZone(CardId.BraveToken) || (Duel.Player == 0 && (Duel.LastChainPlayer == -1 || Bot.HasInSpellZone(CardId.JourneyOfDestiny)));
}
private bool JourneyOfDestinyActivate()
{
return Card.Location == CardLocation.Hand;
}
private bool JourneyOfDestinyEffect()
{
if (Card.Location == CardLocation.Hand)
return false;
if (ActivateDescription == -1 || ActivateDescription == Util.GetStringId(CardId.JourneyOfDestiny, 1))
{
// search equip to hand
AI.SelectOption(0);
return true;
}
else
{
// search rider or aquamancer
if (Bot.GetRemainingCount(CardId.WanderingGryphonRider, 1) == 0 || Bot.GetHandCount() == 0 || !Bot.HasInMonstersZone(CardId.BraveToken))
{
AI.SelectCard(CardId.AquamancerOfTheSanctuary);
if (Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.AquamancerOfTheSanctuary))
AI.SelectNextCard(CardId.AquamancerOfTheSanctuary);
else
AI.SelectNextCard(GetHandCost());
}
else
{
AI.SelectCard(CardId.WanderingGryphonRider);
AI.SelectNextCard(GetHandCost());
}
return true;
}
}
private bool AquamancerOfTheSanctuarySearchEffect()
{
if (Card.Location == CardLocation.Grave)
{
AI.SelectCard(CardLocation.Deck);
return true;
}
if (ActivateDescription == Util.GetStringId(CardId.AquamancerOfTheSanctuary, 0))
{
// summon
return false;
}
else
{
// search
return !Bot.HasInHand(CardId.RiteofAramesia) && !Bot.HasInMonstersZone(CardId.BraveToken);
}
}
private bool AquamancerOfTheSanctuarySummonEffect()
{
if (ActivateDescription == Util.GetStringId(CardId.AquamancerOfTheSanctuary, 0))
{
// summon
return Bot.GetMonsterCount() <= 3;
}
return false;
}
private bool MechaPhantomBeastOLionEffect()
{
if (Bot.GetMonsterCount() >= 3
&& ((Bot.HasInExtra(CardId.MechaPhantomBeastAuroradon) && Bot.HasInMonstersZone(CardId.CrystronHalqifibrax))
|| Bot.HasInMonstersZone(CardId.MechaPhantomBeastAuroradon)))
return false;
if (ActivateDescription == -1)
{
BeastOLionUsed = true;
return true;
}
return !BeastOLionUsed;
}
private bool CrusadiaArboriaSummon()
{
return !Bot.GetMonsters().Any(card => card.IsFaceup() && card.IsTuner());
}
private bool CrystronNeedlefiberSummon()
{
if (JetSynchronUsed && !Bot.HasInMonstersZone(CardId.MechaPhantomBeastOLion))
return false;
List<int> materials = new List<int>{
CardId.Sangan,
_CardId.GamecieltheSeaTurtleKaiju,
CardId.PredaplantVerteAnaconda,
CardId.SalamangreatAlmiraj,
CardId.LinkSpider,
CardId.MaxxC,
CardId.MechaPhantomBeastToken,
CardId.AquamancerOfTheSanctuary,
CardId.CrusadiaArboria,
CardId.MechaPhantomBeastOLion,
CardId.JetSynchron,
CardId.AshBlossomJoyousSpring,
CardId.EffectVeiler
};
if (!Bot.HasInMonstersZone(CardId.BraveToken) || !Bot.HasInMonstersZone(CardId.WanderingGryphonRider))
{
materials.Add(CardId.BraveToken);
materials.Add(CardId.WanderingGryphonRider);
}
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
return false;
}
private bool CrystronNeedlefiberEffect()
{
if (Duel.Player == 0)
{
AI.SelectCard(CardId.JetSynchron, CardId.MechaPhantomBeastOLion, CardId.EffectVeiler);
return true;
}
else
{
if (Enemy.GetSpells().Any(card => card.IsFacedown() || card.HasType(CardType.Continuous) || card.HasType(CardType.Field) || card.HasType(CardType.Equip)))
{
AI.SelectCard(CardId.TGWonderMagician);
}
else
{
AI.SelectCard(CardId.CoralDragon);
}
return true;
}
}
private bool TGWonderMagicianEffect()
{
ClientCard target = Util.GetProblematicEnemySpell();
if (target == null)
target = Enemy.GetSpells().Find(card => card.IsFacedown() || card.HasType(CardType.Continuous) || card.HasType(CardType.Field) || card.HasType(CardType.Equip));
if (target == null)
return false;
AI.SelectCard(target);
return true;
}
private bool MechaPhantomBeastAuroradonSummon()
{
return Bot.GetMonsterCount() <= 4; // has 3 field for tokens
}
private bool MechaPhantomBeastAuroradonEffect()
{
if (ActivateDescription == -1)
return true;
else
{
AI.SelectOption(1); // release 2 monsters
AI.SelectCard(CardId.MechaPhantomBeastAuroradon);
AI.SelectNextCard(CardId.MechaPhantomBeastToken);
return true;
}
}
private bool TGHyperLibrarianSummon()
{
int[] materials = new[] {
CardId.MechaPhantomBeastOLion,
CardId.MechaPhantomBeastToken,
CardId.AquamancerOfTheSanctuary
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 3)
{
AI.SelectMaterials(materials);
return true;
}
return false;
}
private bool JetSynchronEffect()
{
int[] materials = new[] {
CardId.MechaPhantomBeastToken
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2 || Bot.GetMonsterCount() <= 3)
{
JetSynchronUsed = true;
AI.SelectCard(GetHandCost());
return true;
}
return false;
}
private bool CupidPitchSummon()
{
int[] materials = new[] {
CardId.JetSynchron,
CardId.EffectVeiler,
CardId.MechaPhantomBeastToken,
CardId.AquamancerOfTheSanctuary,
CardId.Sangan,
CardId.TGHyperLibrarian,
CardId.BraveToken
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 3)
{
AI.SelectMaterials(materials);
return true;
}
return false;
}
private bool CupidPitchEffect()
{
if (Card.Location == CardLocation.MonsterZone)
{
AI.SelectOption(1); // level up
}
else
{
AI.SelectCard(CardId.NemesesCorridor);
}
return true;
}
private bool SalamangreatAlmirajSummonFirst()
{
int[] materials = new[] {
CardId.Sangan
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials) && !card.IsSpecialSummoned) == 0)
return false;
AI.SelectMaterials(materials);
return true;
}
private bool SalamangreatAlmirajSummon()
{
if (PhoenixNotAvail())
return false;
int[] materials = new[] {
CardId.MechaPhantomBeastOLion,
CardId.JetSynchron
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials) && !card.IsSpecialSummoned) == 0)
return false;
AI.SelectMaterials(materials);
return true;
}
private bool LinkSpiderSummon()
{
if (PhoenixNotAvail())
return false;
List<int> materials = new List<int>{
CardId.MechaPhantomBeastToken
};
if (!Bot.HasInMonstersZone(CardId.BraveToken) || !Bot.HasInMonstersZone(CardId.WanderingGryphonRider))
{
materials.Add(CardId.BraveToken);
}
if (Bot.GetMonsters().Any(card => card.IsCode(CardId.PrimalBeingToken) && card.Attack <= 4000))
{
materials.Add(CardId.PrimalBeingToken);
}
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) == 0)
return false;
AI.SelectMaterials(materials);
return true;
}
private bool NeedMonster()
{
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true) || PhoenixNotAvail())
return false;
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level >= 8) > 0)
return false;
if (Bot.GetMonsterCount() == 0 && Bot.Hand.GetMatchingCardsCount(card => card.Level <= 4) == 0)
return false;
if (Bot.GetMonsterCount() >= 2)
return false;
return true;
}
private bool SummonForMaterial()
{
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true) || !Bot.HasInExtra(CardId.PredaplantVerteAnaconda))
return false;
if (Bot.MonsterZone.GetMatchingCardsCount(card => (card.HasType(CardType.Effect) || card.IsTuner()) && card.Level < 8) == 1)
return true;
return false;
}
private bool PhoenixNotAvail()
{
return Bot.LifePoints <= 2000 || Bot.GetRemainingCount(CardId.FusionDestiny, 3) == 0 || Bot.HasInHand(CardId.FusionDestiny)
|| !Bot.HasInExtra(CardId.PredaplantVerteAnaconda) || !Bot.HasInExtra(CardId.DestinyHeroDestroyPhoenixEnforcer)
|| (Bot.GetRemainingCount(CardId.DestinyHeroCelestial, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroCelestial))
|| (Bot.GetRemainingCount(CardId.DestinyHeroDasher, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroDasher));
}
private bool PredaplantVerteAnacondaSummon()
{
if (PhoenixNotAvail())
return false;
List<int> materials = new List<int>{
_CardId.GamecieltheSeaTurtleKaiju,
CardId.AquamancerOfTheSanctuary,
CardId.Sangan,
CardId.SalamangreatAlmiraj,
CardId.LinkSpider,
CardId.NemesesCorridor,
CardId.DestinyHeroCelestial,
CardId.DestinyHeroDasher,
CardId.CrusadiaArboria,
CardId.AshBlossomJoyousSpring,
CardId.MechaPhantomBeastOLion,
CardId.MaxxC,
CardId.JetSynchron,
CardId.EffectVeiler,
CardId.CrystronHalqifibrax,
CardId.TGHyperLibrarian
};
if (!Bot.HasInMonstersZone(CardId.BraveToken) || !Bot.HasInMonstersZone(CardId.WanderingGryphonRider))
{
materials.Add(CardId.WanderingGryphonRider);
}
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
return false;
}
private bool PredaplantVerteAnacondaEffect()
{
if (ActivateDescription == Util.GetStringId(CardId.PredaplantVerteAnaconda, 0))
return false;
FusionDestinyUsed = true;
AI.SelectCard(CardId.FusionDestiny);
AI.SelectMaterials(CardLocation.Deck);
return true;
}
private bool FusionDestinyEffect()
{
FusionDestinyUsed = true;
return true;
}
private bool FoolishBurialFirst()
{
if (!Bot.HasInHand(CardId.RiteofAramesia) && !Bot.HasInHandOrInGraveyard(CardId.AquamancerOfTheSanctuary) && !Bot.HasInMonstersZone(CardId.BraveToken))
{
AI.SelectCard(CardId.AquamancerOfTheSanctuary);
return true;
}
return false;
}
private bool FoolishBurialEffect()
{
if (FusionDestinyUsed)
return false;
if (!NeedMonster())
return false;
AI.SelectCard(new[] {
CardId.MechaPhantomBeastOLion
});
return true;
}
private bool MonsterRebornEffect()
{
if (Bot.HasInGraveyard(CardId.BaronessDeFleur))
{
AI.SelectCard(CardId.BaronessDeFleur);
return true;
}
else if (Bot.HasInGraveyard(CardId.WanderingGryphonRider))
{
AI.SelectCard(CardId.WanderingGryphonRider);
return true;
}
else
{
if (!NeedMonster())
return false;
AI.SelectCard(new[] {
CardId.Sangan,
CardId.MechaPhantomBeastOLion,
CardId.CrusadiaArboria,
CardId.AshBlossomJoyousSpring
});
return true;
}
}
private bool DestinyHeroDasherEffect()
{
return Bot.Hand.Count(card => card.IsMonster()) > 1;
}
private bool DestinyHeroCelestialEffect()
{
if (!Bot.HasInGraveyard(CardId.DestinyHeroDasher))
return false;
AI.SelectCard(CardId.DestinyHeroDasher);
return true;
}
private bool BaronessDeFleurSummon()
{
int[] materials = new[] {
CardId.CupidPitch,
CardId.TGWonderMagician,
CardId.TGHyperLibrarian
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
if (!Bot.HasInMonstersZone(CardId.BraveToken))
{
materials = new[] {
CardId.AshBlossomJoyousSpring,
CardId.CrusadiaArboria,
CardId.WanderingGryphonRider
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
}
if (!Bot.HasInMonstersZone(CardId.WanderingGryphonRider) || Bot.HasInHand(CardId.RiteofAramesia))
{
materials = new[] {
CardId.CoralDragon,
CardId.BraveToken
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
}
return false;
}
private bool BaronessDeFleurEffect()
{
if (Duel.LastChainPlayer == 0)
{
return false;
}
if (Duel.LastChainPlayer == 1)
{
BaronessDeFleurUsed = true;
return true;
}
if (Duel.Phase == DuelPhase.Standby && BaronessDeFleurUsed)
{
BaronessDeFleurUsed = false;
return true;
}
if (Duel.Phase == DuelPhase.Main1 || Duel.Phase == DuelPhase.Main2)
{
ClientCard target = Util.GetProblematicEnemyCard(canBeTarget: true);
if (target == null)
target = Util.GetBestEnemyCard(canBeTarget: true);
if (target != null)
{
AI.SelectCard(target);
return true;
}
}
return false;
}
private bool VirtualWorldKyubiShenshenSummon()
{
if (Bot.HasInMonstersZone(CardId.DestinyHeroDestroyPhoenixEnforcer))
return false;
int[] materials = new[] {
CardId.CoralDragon,
CardId.AquamancerOfTheSanctuary,
CardId.Sangan
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
if (!Bot.HasInMonstersZone(CardId.BraveToken))
{
materials = new[] {
CardId.MechaPhantomBeastOLion,
CardId.WanderingGryphonRider
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{
AI.SelectMaterials(materials);
return true;
}
}
return false;
}
private bool VirtualWorldKyubiShenshenEffect()
{
if (Card.Location == CardLocation.MonsterZone && Bot.HasInBanished(CardId.AquamancerOfTheSanctuary))
{
AI.SelectCard(CardId.AquamancerOfTheSanctuary);
return true;
}
else
{
int[] costs = new[] {
CardId.NemesesCorridor,
CardId.Sangan,
CardId.CrusadiaArboria,
CardId.AshBlossomJoyousSpring,
CardId.MechaPhantomBeastOLion,
CardId.MaxxC,
CardId.EffectVeiler,
CardId.ThunderDragonColossus,
CardId.BorreloadSavageDragon,
CardId.CoralDragon,
CardId.TGHyperLibrarian,
CardId.TGWonderMagician,
CardId.CupidPitch,
CardId.CrystronHalqifibrax,
CardId.PredaplantVerteAnaconda,
CardId.LinkSpider,
CardId.SalamangreatAlmiraj
};
AI.SelectCard(costs);
AI.SelectNextCard(costs);
return true;
}
}
private bool CoralDragonEffect()
{
if (Card.Location == CardLocation.Grave)
return true;
ClientCard target = Util.GetProblematicEnemyCard(canBeTarget: true);
if (target != null)
{
AI.SelectCard(target);
return true;
}
return false;
}
private bool TrapSet()
{
AI.SelectPlace(Zones.z0 + Zones.z1 + Zones.z3 + Zones.z4);
return true;
}
private bool SetForCelestial()
{
return !FusionDestinyUsed && Bot.HasInGraveyard(CardId.DestinyHeroCelestial) && Bot.HasInGraveyard(CardId.DestinyHeroDasher) && TrapSet();
}
private bool MonsterRepos()
{
if (Card.IsFacedown())
return true;
return DefaultMonsterRepos();
}
}
}
......@@ -53,16 +53,18 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SummonOrSet, CardId.荒野盗龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.名流雷龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.MonsterSet, _CardId.千年盾, DefaultMonsterSummon);
AddExecutor(ExecutorType.MonsterSet, CardId.大恐龙驾L, MAXLset);
AddExecutor(ExecutorType.MonsterSet, CardId.大恐龙驾R, MAXRset);
AddExecutor(ExecutorType.MonsterSet, CardId.抑龙);
AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.MonsterSet, CardId.名流雷龙, monsterset);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Activate, CardId.侏罗纪世界);
AddExecutor(ExecutorType.Activate, CardId.恐力重压);
AddExecutor(ExecutorType.Activate, CardId.超越进化, 超越进化Effect);
AddExecutor(ExecutorType.SpellSet);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, 圣防Repos);
//AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
}
......
......@@ -523,7 +523,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(e_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
/*AI.SelectCard(new[] {
CardId.BingirsuTheWorldChaliceWarrior,
CardId.TopologicTrisbaena,
......@@ -548,7 +548,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(s_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......
......@@ -13,16 +13,22 @@ namespace WindBot.Game.AI.Decks
public LuckyExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.Activate, ImFeelingLucky);
AddExecutor(ExecutorType.SpSummon, ImFeelingLucky);
AddExecutor(ExecutorType.SpSummon, ImFeelingUnlucky);
AddExecutor(ExecutorType.Activate, ImFeelingUnlucky);
AddExecutor(ExecutorType.SummonOrSet, ImFeelingLazy);
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Activate, _CardId.大风暴, 大风暴Effect);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, _CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.Activate, _CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, _CardId.暗黑释放, 圣防Effect);
AddExecutor(ExecutorType.Activate, _CardId.手枪龙, 手枪龙Effect);
AddExecutor(ExecutorType.Activate, _CardId.MysticalSpaceTyphoon, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, _CardId.CosmicCyclone, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, _CardId.GalaxyCyclone, DefaultGalaxyCyclone);
......@@ -81,6 +87,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, _CardId.LeftLegofTheForbiddenOne, JustDontIt);
AddExecutor(ExecutorType.Summon, _CardId.RightArmofTheForbiddenOne, JustDontIt);
AddExecutor(ExecutorType.Summon, _CardId.ExodiaTheForbiddenOne, JustDontIt);
AddExecutor(ExecutorType.Summon, _CardId.伟大魔兽, 伟大魔兽Sum);
AddExecutor(ExecutorType.MonsterSet, _CardId.千年盾, DefaultMonsterSummon);
AddExecutor(ExecutorType.Activate, _CardId.死供, 死供Effect);
AddExecutor(ExecutorType.Repos, 圣防Repos);
AddExecutor(ExecutorType.Activate, _CardId.死苏, 死苏Effect);
AddExecutor(ExecutorType.Activate, _CardId.死苏2, 死苏Effect);
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
}
private List<int> HintMsgForEnemy = new List<int>
......
......@@ -15,6 +15,7 @@ namespace WindBot.Game.AI.Decks
{
public class CardId
{
public const int 起重龙 = 120199020;
public const int 幻龙重骑 = 120155022;
public const int 建造龙 = 120155024;
public const int 幻刃破龙 = 120151029;
......@@ -38,36 +39,45 @@ namespace WindBot.Game.AI.Decks
}
public int[] priList = { CardId.建造龙, CardId.幻龙重骑, CardId.幻刃破龙 };
public int[] rePriList = { CardId.幻刃破龙, CardId.幻龙重骑, CardId.建造龙 };
public int[] priList = { CardId.起重龙, CardId.建造龙, CardId.幻龙重骑, CardId.幻刃破龙 };
public int[] rePriList = { CardId.幻刃破龙, CardId.幻龙重骑, CardId.建造龙, CardId.起重龙, };
public MituziExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, _CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.Activate, _CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.阴阳封阵, 阴阳封阵Effect);
AddExecutor(ExecutorType.SpellSet, CardId.阴阳封阵);
AddExecutor(ExecutorType.Activate, CardId.透幻乡险峻,DefaultField);
AddExecutor(ExecutorType.Repos, 圣防Repos);
AddExecutor(ExecutorType.Repos, 幻刃急攻Repos);
AddExecutor(ExecutorType.Activate, CardId.);
AddExecutor(ExecutorType.Activate,CardId.丰沃蟠龙,丰沃蟠龙Effect);
AddExecutor(ExecutorType.Activate, CardId.荒废蟠龙, 荒废蟠龙Effect);
AddExecutor(ExecutorType.Activate, CardId.搅拌龙, 搅拌龙Effect);
AddExecutor(ExecutorType.Activate, CardId.风车鳞虫);
AddExecutor(ExecutorType.Activate, CardId.镐头龙, 镐头龙Effect);
AddExecutor(ExecutorType.Activate, CardId.起重龙);
AddExecutor(ExecutorType.Activate, CardId.建造龙, 建造龙Effect);
AddExecutor(ExecutorType.Activate, CardId.镐头龙, 镐头龙Effect);
AddExecutor(ExecutorType.Summon, CardId.镐头龙, 镐头龙Summon);
AddExecutor(ExecutorType.Summon, CardId.搅拌龙, 搅拌龙Summon);
AddExecutor(ExecutorType.MonsterSet, 幻刃急攻Set);
AddExecutor(ExecutorType.Summon, 幻刃急攻Summon);
AddExecutor(ExecutorType.Activate, CardId.死者苏生, 者苏生Effect);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Activate, CardId.死者苏生, Effect);
AddExecutor(ExecutorType.Activate, CardId.贯通, 贯通Effect);
AddExecutor(ExecutorType.Summon, _CardId.伟大魔兽, 伟大魔兽Sum);
AddExecutor(ExecutorType.Activate, CardId.幻刃复归, 幻刃复归Effect);
AddExecutor(ExecutorType.Activate, CardId.幻刃封锁, 幻刃封锁Effect);
AddExecutor(ExecutorType.Activate, CardId.幻刃急攻, 幻刃急攻Effect);
AddExecutor(ExecutorType.Activate, CardId.透幻乡险峻);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, 圣防Repos);
AddExecutor(ExecutorType.SpellSet, TrapCardSet);
AddExecutor(ExecutorType.SpellSet);
}
......@@ -173,7 +183,7 @@ namespace WindBot.Game.AI.Decks
private bool 镐头龙Summon()
{
if (Bot.HasInMonstersZone(CardId.幻刃破龙) && Bot.HasInHand(CardId.建造龙))
if (Bot.HasInMonstersZone(CardId.幻刃破龙) && Bot.HasInHand(CardId.建造龙) && Bot.HasInHand(CardId.起重龙))
return Discord1Draw1Eff(CardRace.Wyrm, false, true);
return Discord1Draw1Eff(CardRace.Wyrm, false, false);
}
......@@ -330,7 +340,7 @@ namespace WindBot.Game.AI.Decks
}
private bool 镐头龙Effect()
{
if (Bot.HasInMonstersZone(CardId.幻刃破龙) && Bot.HasInHand(CardId.建造龙))
if (Bot.HasInMonstersZone(CardId.幻刃破龙) && Bot.HasInHand(CardId.建造龙) && Bot.HasInHand(CardId.起重龙))
return Discord1Draw1Eff(CardRace.Wyrm, true, true);
return Discord1Draw1Eff(CardRace.Wyrm, true, false);
}
......@@ -514,7 +524,7 @@ namespace WindBot.Game.AI.Decks
{
if (isAISelect)
{
int[] localList = new int[] { CardId.建造龙, CardId.幻龙重骑 };
int[] localList = new int[] { CardId.建造龙, CardId.幻龙重骑, CardId.起重龙 };
if (Bot.HasInMonstersZone(CardId.建造龙) && 建造龙Effect(true, false))
{
if (Bot.HasInGraveyard(localList[0]) || Bot.HasInGraveyard(localList[1]))
......@@ -616,23 +626,6 @@ namespace WindBot.Game.AI.Decks
AI.SelectNextCard(Duel.LastSummonedCards);
return true;
}
private bool 死者苏生Effect()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => card.Level > 6)+
Bot.Graveyard.GetMatchingCardsCount(card => card.Level > 6)>0)
{
IList<ClientCard>
EmList = Enemy.Graveyard.GetMatchingCards(card => card.Level > 6),
BotList = Bot.Graveyard.GetMatchingCards(card => card.Level > 6),
unionList = EmList.Concat(BotList).ToList();
AI.SelectCard(unionList.OrderByDescending(card=>card.Attack).FirstOrDefault());
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
return false;
}
//泛用墓地回收函数,内置AISelectCard, slcNum:回收数量,idList优先回收ID表,keepNums保留数量表,执行成功返回true
private bool GraveReturnSelect(int slcNum ,int[] idList,int[] keepNums)
......@@ -677,14 +670,5 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1 && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(CardId.暗黑释放)) < 3)
{
if (Card.IsAttack() && Card.Level>6 && Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level >= 5) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
}
}
......@@ -23,6 +23,7 @@ namespace WindBot.Game.AI.Decks
public const int 七星道魔术师 = 120105001;
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 侏儒兔 = 120228031;
public const int 神秘庄家 = 120105006;
public const int 光芒巫师 = 120145001;
public const int 暗黑巫师 = 120105005;
......@@ -39,9 +40,11 @@ namespace WindBot.Game.AI.Decks
public MokeyMokeyExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Activate, CardId.七星道法师,七星道法师Effect);
AddExecutor(ExecutorType.Activate, CardId.侏儒兔,侏儒兔Effect);
AddExecutor(ExecutorType.Activate, CardId.七星道法师, 七星道法师Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Eff);
AddExecutor(ExecutorType.SummonOrSet, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
......@@ -53,24 +56,29 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Summon, CardId.侏儒兔, 侏儒兔Summon);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家, draweffect);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放, 圣防Effect);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.Activate, _CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.侏儒兔);
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.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, CardId.青眼白龙, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.破坏之剑士, 圣防Repos);
AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.Activate, CardId.耳语妖精, 耳语妖精Effect);
......@@ -80,6 +88,8 @@ namespace WindBot.Game.AI.Decks
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Repos, CardId.青眼白龙, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.破坏之剑士, 圣防Repos);
}
......@@ -169,23 +179,8 @@ namespace WindBot.Game.AI.Decks
targets.Add(card);
}
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
}
return false;
}
private bool 圣防Effect()
{
if (Util.GetTotalAttackingMonsterAttack(1) > 1900) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
return false;
}
private bool 火星心少女Effect()
{
foreach (ClientCard m in Bot.Hand)
......@@ -194,16 +189,14 @@ namespace WindBot.Game.AI.Decks
AI.SelectYesNo(true);
return true;
}
private bool 死供Effect()
private bool 死供Eff()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
if (Util.IsOneEnemyBetterThanValue(2600, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
......@@ -213,23 +206,28 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 死供Eff()
private bool 侏儒兔Summon()
{
if (Util.IsOneEnemyBetterThanValue(2600, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
else if (mon.Level >= 5)
AI.SelectNextCard(mon);
if (Bot.HasInHandOrHasInMonstersZone(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return true;
}
return false;
}
private bool 侏儒兔Effect()
{
AI.SelectYesNo(false);
return true;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
......@@ -246,7 +244,7 @@ namespace WindBot.Game.AI.Decks
return false;
}
else
AI.SelectCard(CardId.七星道法师, CardId.火星心少女, CardId.耳语妖精, CardId.神秘庄家, CardId.光芒巫师, CardId.暗黑巫师);
AI.SelectCard(CardId.七星道法师, CardId.火星心少女, CardId.侏儒兔, CardId.耳语妖精, CardId.神秘庄家, CardId.光芒巫师, CardId.暗黑巫师);
return true;
}
private bool 凤凰龙summon()
......@@ -259,15 +257,6 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1 && !Bot.HasInMonstersZone(CardId.人造人) && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(CardId.暗黑释放)) < 3)
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level >= 5) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
}
......
......@@ -27,6 +27,7 @@ namespace WindBot.Game.AI.Decks
public const int 雅灭鲁拉 = 120120029;
public const int 耳语妖精 = 120120018;
public const int 神秘庄家 = 120105006;
public const int 侏儒兔 = 120228031;
public const int 光芒巫师 = 120145001;
public const int 暗黑巫师 = 120105005;
public const int 火星心少女 = 120145014;
......@@ -45,11 +46,13 @@ namespace WindBot.Game.AI.Decks
public MokeyMokeyKingExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.Activate, _CardId.疾风弹, 疾风弹Effect);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.Activate, CardId.七星道法师, 七星道法师Effect);
AddExecutor(ExecutorType.Activate, CardId.侏儒兔, 侏儒兔Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Eff);
AddExecutor(ExecutorType.SummonOrSet, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.恶魔召唤, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.连击龙, DefaultMonsterSummon);
......@@ -59,33 +62,39 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, CardId.七星道魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.神秘庄家);
AddExecutor(ExecutorType.Summon, CardId.侏儒兔, 侏儒兔Summon);
AddExecutor(ExecutorType.Activate, CardId.神秘庄家, draweffect);
AddExecutor(ExecutorType.SpellSet, CardId.暗黑释放, 圣防Effect);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.Activate, _CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.侏儒兔);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, Monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.七星道法师, Monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.耳语妖精, Monsterset);
AddExecutor(ExecutorType.Summon, CardId.七星道法师);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, CardId.青眼白龙, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.破坏之剑士, 圣防Repos);
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, _CardId.死苏, 死苏Effect);
AddExecutor(ExecutorType.Activate, _CardId.死苏2, 死苏Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SpellSet);
}
......@@ -181,40 +190,28 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
private bool 侏儒兔Summon()
{
if (n.Attack >= 1900) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
}
return false;
}
private bool 圣防Effect()
{
if (Util.GetTotalAttackingMonsterAttack(1) > 1900) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
if (Bot.HasInHandOrHasInMonstersZone(new[] {
CardId.七星道魔术师,
CardId.连击龙,
CardId.青眼白龙,
CardId.人造人,
CardId.恶魔召唤,
CardId.雅灭鲁拉,
CardId.破坏之剑士,
CardId.真红眼黑龙,
CardId.黑魔术师
}))
return true;
return false;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
private bool 侏儒兔Effect()
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
else if (mon.Level >= 5)
AI.SelectNextCard(mon);
AI.SelectYesNo(false);
return true;
}
return false;
}
private bool 死供Eff()
{
if (Util.IsOneEnemyBetterThanValue(2600, false))
......@@ -251,7 +248,7 @@ namespace WindBot.Game.AI.Decks
return false;
}
else
AI.SelectCard(CardId.七星道法师, CardId.火星心少女, CardId.耳语妖精, CardId.神秘庄家, CardId.光芒巫师, CardId.暗黑巫师);
AI.SelectCard(CardId.七星道法师, CardId.火星心少女,CardId.侏儒兔, CardId.耳语妖精, CardId.神秘庄家, CardId.光芒巫师, CardId.暗黑巫师);
return true;
}
private bool 凤凰龙summon()
......@@ -264,15 +261,6 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1 && !Bot.HasInMonstersZone(CardId.人造人) && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(CardId.暗黑释放)) < 3)
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level >= 5) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -468,13 +468,13 @@ namespace WindBot.Game.AI.Decks
IList<ClientCard> material_list = new List<ClientCard>();
if(Bot.HasInExtra(CardId.BorreloadDragon))
{
AI.SelectCard(
AI.SelectMaterials(new[] {
CardId.TopologicBomberDragon,
CardId.TopologicTrisbaena,
CardId.KnightmareGryphon,
CardId.SummonSorceress,
CardId.BorreloadDragon
);
}, HintMsg.Remove);
}
else
{
......@@ -483,6 +483,7 @@ namespace WindBot.Game.AI.Decks
if (material_list.Count == 5) break;
material_list.Add(m);
}
AI.SelectMaterials(material_list, HintMsg.Remove);
}
return true;
}
......
......@@ -21,6 +21,7 @@ namespace WindBot.Game.AI.Decks
public const int 社员 = 120183002;
public const int 成金恐龙王 = 120151010;
public const int 捕鸟蛛 = 120224010;
public const int 突击坦克 = 120183031;
public const int 工匠无人机 = 120183030;
public const int 双角兽 = 120181011;
......@@ -29,6 +30,7 @@ namespace WindBot.Game.AI.Decks
public const int 世纪末兽机界 = 120130039;
public const int 铁之重击 = 120183054;
public const int 对死者的供奉 = 120151023;
public const int 七抽 = 120199052;
public const int 兽之拳 = 120155060;
public const int 减俸 = 120183062;
......@@ -40,28 +42,33 @@ namespace WindBot.Game.AI.Decks
public SaikyoBattleFlagExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.铁之重击);
AddExecutor(ExecutorType.Activate, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, CardId.捕鸟蛛);
AddExecutor(ExecutorType.Activate, CardId.恶德, 恶德Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Eff);
AddExecutor(ExecutorType.Activate, CardId.最强战旗, 最强战旗Eff);
AddExecutor(ExecutorType.Activate, CardId.突击坦克, 突击坦克Effect);
AddExecutor(ExecutorType.Activate, CardId.瞄准鹰, 瞄准鹰Effect);
AddExecutor(ExecutorType.Activate, CardId.双角兽, 双角兽Effect);
AddExecutor(ExecutorType.Activate, _CardId.手枪龙, 手枪龙Effect);
AddExecutor(ExecutorType.Repos, CardId.双角兽, 双角兽summon);
AddExecutor(ExecutorType.Repos, CardId.瞄准鹰, 瞄准鹰summon);
AddExecutor(ExecutorType.Repos, CardId.最强战旗, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.钢机神, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, _CardId.手枪龙, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.恶德, DefaultMonsterRepos);
AddExecutor(ExecutorType.Summon, CardId.最强战旗, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon, CardId.钢机神, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon, CardId.恶德, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon, _CardId.手枪龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.最强战旗, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.钢机神, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.恶德, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.双角兽, 双角兽summon);
AddExecutor(ExecutorType.Summon, CardId.捕鸟蛛, 捕鸟蛛summon);
AddExecutor(ExecutorType.Summon, CardId.成金恐龙王, 成金恐龙王Summon);
AddExecutor(ExecutorType.Summon, CardId.瞄准鹰, 瞄准鹰summon);
AddExecutor(ExecutorType.Summon, CardId.瞄准鹰, 瞄准鹰summon2);
......@@ -74,13 +81,14 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor(ExecutorType.Activate, CardId.最强战旗, 最强战旗Effect);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.Activate, CardId.钢机神, 钢机神1Effect);
AddExecutor(ExecutorType.Activate, CardId.钢机神, 钢机神Effect);
//AddExecutor(ExecutorType.Activate, CardId.钢机神, 钢机神1Effect);
AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, CardId.工匠无人机,无人机Effect);
AddExecutor(ExecutorType.MonsterSet, CardId.工匠无人机);
AddExecutor(ExecutorType.MonsterSet, CardId.突击坦克);
AddExecutor(ExecutorType.MonsterSet, CardId.捕鸟蛛);
AddExecutor(ExecutorType.Summon, CardId.工匠无人机, 无人机summon);
AddExecutor(ExecutorType.Summon, CardId.突击坦克, 突击坦克summon);
AddExecutor(ExecutorType.MonsterSet, CardId.旗兽);
......@@ -93,18 +101,20 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.减俸);
AddExecutor(ExecutorType.Activate, CardId.左迁,左迁2Effect);
AddExecutor(ExecutorType.Activate, CardId.冻结,冻结Effect);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, _CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.Activate, _CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Repos, CardId.最强战旗, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.钢机神, 圣防Repos);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Activate, CardId.七抽, 七抽Effect);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
AddExecutor(ExecutorType.SpellSet, CardId.铁之重击);
AddExecutor(ExecutorType.SpellSet, CardId.死苏);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.Activate, CardId.世纪末兽机界, DefaultField2);
AddExecutor(ExecutorType.Repos, CardId.最强战旗, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.钢机神, 圣防Repos);
}
......@@ -225,16 +235,16 @@ namespace WindBot.Game.AI.Decks
}
else
//if (Enemy.HasAttackingMonster() || Enemy.GetMonsterCount() < 1)
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.突击坦克, CardId.工匠无人机, CardId.社员, CardId.双角兽, CardId.瞄准鹰);
AI.SelectCard(_CardId.手枪龙, CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.捕鸟蛛, CardId.突击坦克, CardId.工匠无人机, CardId.社员, CardId.双角兽, CardId.瞄准鹰);
//else AI.SelectCard(Bot.Graveyard.GetHighestLevelMonster());
return true;
}
private bool 钢机神1Effect()
{
if (Enemy.HasDefendingMonster() && Enemy.GetMonsterCount() >= 1 && Duel.Turn > 1)
AI.SelectCard(Bot.Graveyard.GetMonsters());
/*{
if (Enemy.HasDefendingMonster() && Enemy.GetMonsterCount() >= 1)
// AI.SelectCard(Bot.Graveyard.GetMonsters());
{
List<ClientCard> cards = new List<ClientCard>(Bot.Graveyard.GetMatchingCards(card => (card.Race & (int)CardRace.Machine) > 0));
cards.Sort(CardContainer.CompareCardLevel); ClientCard selectedCard = null;
for (int i = cards.Count - 1; i >= 0; --i)
......@@ -251,7 +261,7 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(selectedCard);
return true;
}
}*/
}
return true;
}
private bool 恶德Effect()
......@@ -315,42 +325,6 @@ namespace WindBot.Game.AI.Decks
if (Enemy.GetHandCount() < 1) return true;
return false;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
else if (mon.Level >= 5)
AI.SelectNextCard(mon);
return true;
}
return false;
}
private bool 死供Eff()
{
if (Util.IsOneEnemyBetterThanValue(2600, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
else if (mon.Level >= 5)
AI.SelectNextCard(mon);
return true;
}
return false;
}
private bool 突击坦克Effect()
{
foreach (ClientCard mon in Enemy.GetMonsters())
......@@ -373,7 +347,12 @@ namespace WindBot.Game.AI.Decks
if (Bot.MonsterZone.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Machine) > 0) == 2 || Util.GetOneEnemyBetterThanMyBest(true, true) == null) return true;
return false;
}
private bool 捕鸟蛛summon()
{
if (Bot.HasInGraveyard(new[] { CardId.旗兽, CardId.社员 }))
return true;
return false;
}
private bool 双角兽summon()
{
if (Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Machine) > 0) >= 3 && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
......@@ -384,7 +363,7 @@ namespace WindBot.Game.AI.Decks
{
if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }) && !Bot.HasInMonstersZone(new[] { CardId.最强战旗, CardId.钢机神 }))
{
AI.SelectCard(CardId.瞄准鹰, CardId.双角兽, CardId.工匠无人机, CardId.突击坦克, CardId.社员, CardId.旗兽, CardId.恶德, CardId.钢机神, CardId.最强战旗);
AI.SelectCard(CardId.瞄准鹰, CardId.捕鸟蛛, CardId.双角兽, CardId.工匠无人机, CardId.突击坦克, CardId.社员, CardId.旗兽, CardId.恶德, CardId.钢机神, CardId.最强战旗);
DoubleTribute = true;
return true;
}
......@@ -420,7 +399,7 @@ namespace WindBot.Game.AI.Decks
private bool 瞄准鹰summon2()
{
if (Bot.GetCountCardInZone(Bot.Hand, CardId.瞄准鹰) >= 2 )
if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Bot.HasInHand(new[] { _CardId.手枪龙, CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Enemy.MonsterZone.GetMatchingCardsCount(card => card.Level >= 7) > 0)
return true;
return false;
......@@ -428,7 +407,7 @@ namespace WindBot.Game.AI.Decks
private bool 瞄准鹰summon3()
{
if (Bot.HasInHand(CardId.双角兽) || Bot.HasInHand(CardId.突击坦克) || Bot.HasInHand(CardId.成金恐龙王))
if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Bot.HasInHand(new[] { _CardId.手枪龙, CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Enemy.MonsterZone.GetMatchingCardsCount(card => card.Level >= 7) > 0)
return true;
return false;
......@@ -436,25 +415,52 @@ namespace WindBot.Game.AI.Decks
private bool 瞄准鹰Effect()
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level <= 4 && card.IsFaceup()) >= 2 && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员 }))
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level <= 4 && card.IsFaceup()) >= 2 && Bot.HasInHand(new[] { _CardId.手枪龙, CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员 }))
{
AI.SelectCard(CardId.瞄准鹰,CardId.突击坦克, CardId.成金恐龙王, CardId.社员, CardId.旗兽);
AI.SelectNextCard(CardId.瞄准鹰, CardId.突击坦克, CardId.成金恐龙王, CardId.社员, CardId.旗兽);
AI.SelectThirdCard(CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员);
AI.SelectThirdCard(_CardId.手枪龙, CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员);
return true;
}
return false;
}
private bool 七抽Effect()
{
if (Bot.HasInHand(CardId.恶德))
{
AI.SelectCard(CardId.恶德);
return true;
}
else if (Bot.HasInHand(CardId.钢机神))
{
AI.SelectCard(CardId.钢机神);
return true;
}
else if (Bot.HasInHand(CardId.最强战旗))
{
AI.SelectCard(CardId.最强战旗);
return true;
}
else if (Bot.HasInHand(_CardId.手枪龙))
{
AI.SelectCard(_CardId.手枪龙);
return true;
}
else
{
return false;
}
}
private bool 无人机Effect()
{
if ((Bot.MonsterZone.GetMatchingCardsCount(card => card.Level < 5)+ Bot.Hand.GetMatchingCardsCount(card => card.Level < 5)) <= 2 )
{
if (Bot.Hand.GetMatchingCardsCount(card => card.Level > 5) > 2)
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德);
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德, _CardId.手枪龙);
else if (Bot.Hand.GetMatchingCardsCount(card => card.Level > 5) == 1 && (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level < 5) + Bot.Hand.GetMatchingCardsCount(card => card.Level < 5)) == 1)
{
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德);
AI.SelectCard(CardId.最强战旗, CardId.钢机神, _CardId.手枪龙, CardId.恶德);
return true;
}
return false;
......@@ -515,15 +521,6 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1 && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(CardId.暗黑释放)) < 3)
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level >= 5) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
}
}
......
......@@ -20,7 +20,9 @@ namespace WindBot.Game.AI.Decks
public const int 千年盾 = 120194001;
public const int 血腥魔兽人 = 120194002;
public const int 圣精灵 = 120194003;
public const int 小手枪龙 = 120223101;
public const int 狼人 = 120214001;
public const int 海龙骑士 = 120199032;
public const int 成金恐龙王 = 120151010;
public const int 机器栗子 = 120120017;
public const int 斗牛士 = 120170035;
......@@ -28,6 +30,9 @@ namespace WindBot.Game.AI.Decks
public const int 死苏 = 120194004;
public const int 成金哥布林 = 120151018;
public const int 强欲之壶 = 120181003;
public const int 贪欲之壶 = 120217100;
public const int 工厂 = 120214003;
public const int 古之规则 = 120214010;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 圣防 = 120198003;
......@@ -38,28 +43,45 @@ namespace WindBot.Game.AI.Decks
public TheLegendExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, _CardId.HMD, HMDEffect);
AddExecutor(ExecutorType.Activate, _CardId.手枪龙, 手枪龙Effect);
AddExecutor(ExecutorType.Activate, _CardId.黑洞, 黑洞Effect);
AddExecutor(ExecutorType.Activate, _CardId.疾风弹, 疾风弹Effect);
AddExecutor(ExecutorType.Activate, CardId.小手枪龙, 小手枪龙Effect);
AddExecutor(ExecutorType.Activate, CardId.海龙骑士,海龙骑士Effect);
//AddExecutor(ExecutorType.Activate, CardId.小手枪龙, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, CardId.强欲之壶);
AddExecutor(ExecutorType.Activate, CardId.成金哥布林);
AddExecutor(ExecutorType.Activate, CardId.贪欲之壶);
AddExecutor(ExecutorType.Activate, CardId.成金恐龙王, 成金恐龙王Effect);
AddExecutor(ExecutorType.Activate, CardId.机器栗子);
AddExecutor(ExecutorType.Repos, CardId.机器栗子, 栗子summon2);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, CardId.斗牛士, DefaultMonsterRepos);
AddExecutor(ExecutorType.SummonOrSet, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, CardId.小手枪龙, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.狼人, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.海龙骑士, DefaultMonsterRepos);
AddExecutor(ExecutorType.Summon, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, _CardId.手枪龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, _CardId.黑魔术师, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.人造人, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.机器栗子,栗子summon);
AddExecutor(ExecutorType.Repos, CardId.机器栗子, 栗子summon2);
//AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect2);
AddExecutor(ExecutorType.Activate, CardId.古之规则, 古之规则Effect);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏Effect);
AddExecutor(ExecutorType.Activate, CardId.工厂, 工厂Effect);
AddExecutor(ExecutorType.MonsterSet, CardId.斗牛士, Monsterset);
AddExecutor(ExecutorType.Summon, CardId.海龙骑士);
AddExecutor(ExecutorType.Summon, CardId.斗牛士);
AddExecutor(ExecutorType.Summon, CardId.小手枪龙);
AddExecutor(ExecutorType.Summon, CardId.狼人);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.Repos, CardId.青眼白龙, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, _CardId.手枪龙, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.破坏之剑士, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.连击龙, DefaultMonsterRepos);
AddExecutor(ExecutorType.Repos, CardId.人造人, DefaultMonsterRepos);
......@@ -73,14 +95,15 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Activate, _CardId.魔法筒, 魔法筒Effect);
AddExecutor(ExecutorType.Activate, _CardId.激流葬, 激流葬Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.圣精灵);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.机器栗子);
AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, CardId.古之规则);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Repos, CardId.青眼白龙, 圣防Repos);
AddExecutor(ExecutorType.Repos, CardId.破坏之剑士, 圣防Repos);
......@@ -158,6 +181,8 @@ namespace WindBot.Game.AI.Decks
CardId.连击龙,
CardId.青眼白龙,
_CardId.黑魔术师,
_CardId.手枪龙,
CardId.人造人,
CardId.破坏之剑士,
......@@ -165,84 +190,34 @@ namespace WindBot.Game.AI.Decks
return false;
return true;
}
private bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900)
return true;
}
return false;
}
private bool 圣防Effect()
private bool 成金恐龙王Effect()
{
if (Util.GetTotalAttackingMonsterAttack(1) > 1900)
AI.SelectCard(CardId.成金哥布林);
return true;
return false;
}
private bool 炸甲Effect()
{
if (Enemy.BattlingMonster.Attack > 1500) return true;
if (Bot.LifePoints <= Enemy.BattlingMonster.Attack) return true;
if (!Util.IsOneEnemyBetterThanValue(1500, true) && Bot.GetSpellCountWithoutField() == 3) return true;
return false;
}
private bool 死苏effect()
{
IList<int> targets = new[] {
CardId.青眼白龙,
CardId.破坏之剑士,
CardId.连击龙,
CardId.人造人,
};
if (!Bot.HasInGraveyard(targets) && !Enemy.HasInGraveyard(targets))
private bool 古之规则Effect()
{
return false;
}
AI.SelectCard(targets);
if (Bot.HasInHandOrInSpellZone(_CardId.HMD))
AI.SelectCard(_CardId.黑魔术师);
else if (Bot.HasInHand(CardId.青眼白龙))
AI.SelectCard(CardId.青眼白龙);
else
AI.SelectCard(_CardId.黑魔术师);
return true;
}
private bool 死苏effect2()
private bool 工厂Effect()
{
List<ClientCard> cards = new List<ClientCard>(Bot.Graveyard.GetMatchingCards(card => card.IsCanRevive()));
cards.Sort(CardContainer.CompareCardAttack);
ClientCard selectedCard = null;
for (int i = cards.Count - 1; i >= 0; --i)
{
ClientCard card = cards[i];
if (card.Attack < 2000)
break;
if (card.IsMonster())
{
selectedCard = card;
break;
}
}
cards = new List<ClientCard>(Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()));
cards.Sort(CardContainer.CompareCardAttack);
for (int i = cards.Count - 1; i >= 0; --i)
{
ClientCard card = cards[i];
if (card.Attack < 2000)
break;
if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack))
{
selectedCard = card;
break;
if (Bot.HasInGraveyard(CardId.青眼白龙) && Bot.HasInHandOrInSpellZone(_CardId.疾风弹))
{ AI.SelectCard(CardId.青眼白龙);
AI.SelectNextCard(CardId.血腥魔兽人, CardId.圣精灵, _CardId.黑魔术师, CardId.青眼白龙);
}
else if (Bot.HasInGraveyard(_CardId.黑魔术师) && Bot.HasInHandOrInSpellZone(_CardId.HMD))
{ AI.SelectCard(_CardId.黑魔术师);
AI.SelectNextCard(CardId.血腥魔兽人, CardId.圣精灵, CardId.青眼白龙,_CardId.黑魔术师);
}
if (selectedCard != null)
{
AI.SelectCard(selectedCard);
return true;
}
return false;
}
private bool 成金恐龙王Effect()
{
AI.SelectCard(CardId.成金哥布林);
else
AI.SelectCard(CardId.血腥魔兽人, CardId.圣精灵);
AI.SelectNextCard(CardId.血腥魔兽人, CardId.圣精灵, CardId.青眼白龙, _CardId.黑魔术师);
return true;
}
private bool 成金恐龙王Summon()
......@@ -272,22 +247,79 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 死供Effect()
private bool 海龙骑士Effect()
{
List<ClientCard> spells = Enemy.GetSpells();
ClientCard selected = spells.FirstOrDefault(card => card.IsFacedown());
AI.SelectCard(_CardId.手枪龙, CardId.海龙骑士, CardId.青眼白龙,CardId.狼人, _CardId.黑魔术师, CardId.圣精灵, CardId.小手枪龙, CardId.血腥魔兽人, CardId.机器栗子);
AI.SelectNextCard(selected);
return true;
}
public void RandomSort(List<ClientCard> list)
{
int n = list.Count;
while (n-- > 1)
{
int index = Program.Rand.Next(n + 1);
ClientCard temp = list[index];
list[index] = list[n];
list[n] = temp;
}
}
public ClientCard GetBestEnemyCard_random()
{
// monsters
ClientCard card = Util.GetProblematicEnemyMonster(0, true);
if (card != null)
return card;
if (Util.GetOneEnemyBetterThanMyBest() != null)
{
card = Enemy.MonsterZone.GetHighestAttackMonster(true);
if (card != null)
return card;
}
// spells
List<ClientCard> enemy_spells = Enemy.GetSpells();
RandomSort(enemy_spells);
foreach (ClientCard sp in enemy_spells)
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
if (sp.IsFaceup() && !sp.IsDisabled()) return sp;
}
if (enemy_spells.Count > 0) return enemy_spells[0];
List<ClientCard> monsters = Enemy.GetMonsters();
if (monsters.Count > 0)
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
RandomSort(monsters);
return monsters[0];
}
return null;
}
private bool 小手枪龙Effect()
{
ClientCard target = Util.GetOneEnemyBetterThanMyBest(true, true);
if (target != null)
{
AI.SelectCard(target);
return true;
}
return false;
List<ClientCard> targets = Enemy.GetSpells();
RandomSort(targets);
if (targets.Count > 0)
{
AI.SelectCard(targets[0]);
return true;
}
target = GetBestEnemyCard_random();
if (target != null)
{
AI.SelectCard(target);
return true;
}
return true;
}
private bool 斗牛士Effect()
{
......@@ -302,16 +334,6 @@ namespace WindBot.Game.AI.Decks
}
// return false;
}
private bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1 && !Bot.HasInMonstersZone(CardId.人造人) && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(CardId.暗黑释放)) < 3)
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level >= 5 ) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -709,7 +709,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(e_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......@@ -719,7 +719,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(s_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......
......@@ -12,6 +12,35 @@ namespace WindBot.Game.AI
{
protected class _CardId
{
public const int 暗黑释放 = 120105013;
public const int 死苏 = 120194004;
public const int 死苏2 = 120195004;
public const int 死供 = 120151023;
public const int 强欲之壶 = 120181003;
public const int 黑洞 = 120231069;
public const int 大风暴 = 120229003;
public const int 魔法筒 = 120232005;
public const int 圣防 = 120198003;
public const int 激流葬 = 1202223105;
public const int 炸甲 = 120194005;
public const int 落穴 = 120150019;
public const int 疾风弹 = 120203028;
public const int HMD = 120130041;
public const int 人造人 = 120155000;
public const int 狼人 = 120214004;
public const int 幻影之龙 = 120223102;
public const int 手枪龙 = 120208000;
public const int 伟大魔兽 = 120238019;
public const int 青眼白龙 = 120120000;
public const int 黑魔术师 = 120130000;
public const int 破坏之剑士 = 120170000;
public const int 连击龙 = 120110001;
public const int 千年盾 = 120194001;
public const int 血腥魔兽人 = 120194002;
public const int 圣精灵 = 120194003;
public const int 结界像 = 120226013;
public const int 终焰魔神 = 120231008;
public const int JizukirutheStarDestroyingKaiju = 63941210;
public const int ThunderKingtheLightningstrikeKaiju = 48770333;
public const int DogorantheMadFlameKaiju = 93332803;
......@@ -63,6 +92,7 @@ namespace WindBot.Game.AI
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
public const int TorrentialTribute = 53582587;
public const int EvenlyMatched = 15693423;
public const int HeavyStorm = 19613556;
public const int HammerShot = 26412047;
public const int DarkHole = 53129443;
......@@ -106,6 +136,7 @@ namespace WindBot.Game.AI
public const int MacroCosmos = 30241314;
public const int UpstartGoblin = 70368879;
public const int CyberEmergency = 60600126;
public const int TheAgentOfCreationVenus = 64734921;
public const int EaterOfMillions = 63845230;
......@@ -310,7 +341,115 @@ namespace WindBot.Game.AI
{
return card.Level <= 4 && Bot.GetMonsters().Count(m => m.IsFaceup()) == 0 && Util.IsAllEnemyBetterThanValue(card.Attack, true);
}
protected bool 手枪龙Effect()
{
ClientCard target = Util.GetBestEnemyMonster(true, true);
{
if (target != null)
AI.SelectCard(target);
}
return true;
}
protected bool 圣防Repos()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.SpellCaster) > 0) >= 4 && Enemy.GetSpellCountWithoutField() >= 1
&& !Bot.HasInMonstersZone(new[]{_CardId.人造人, _CardId.狼人, _CardId.幻影之龙}) && Enemy.Graveyard.GetMatchingCardsCount(card => card.IsCode(_CardId.暗黑释放)) < 3)
{
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsAttack() && card.Level > 5) >= 2 && !Bot.HasDefendingMonster())
return true;
}
return false;
}
protected bool 死苏Effect()
{
if (Enemy.Graveyard.GetMatchingCardsCount(card => card.Level > 6) +
Bot.Graveyard.GetMatchingCardsCount(card => card.Level > 6) > 0)
{
IList<ClientCard>
EmList = Enemy.Graveyard.GetMatchingCards(card => card.Level > 6),
BotList = Bot.Graveyard.GetMatchingCards(card => card.Level > 6),
unionList = EmList.Concat(BotList).ToList();
AI.SelectCard(unionList.OrderByDescending(card => card.Attack).FirstOrDefault());
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
return false;
}
protected bool 大风暴Effect()
{
return Enemy.GetSpellCount() - Bot.GetSpellCount() >= 2;
}
protected bool HMDEffect()
{
return Enemy.GetSpellCount() >= 2;
}
protected bool 黑洞Effect()
{
return Util.IsOneEnemyBetter() && Util.GetTotalAttackingMonsterAttack(1) >= 3400 && !Enemy.HasInMonstersZone(_CardId.终焰魔神);
}
protected bool 疾风弹Effect()
{
return Util.GetTotalAttackingMonsterAttack(1) >= 3400 && !Enemy.HasInMonstersZone(_CardId.终焰魔神);
}
protected bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
else if (mon.Level >= 5)
AI.SelectNextCard(mon);
return true;
}
return false;
}
protected bool 魔法筒Effect()
{
if (Bot.LifePoints <= Enemy.BattlingMonster.Attack)
return DefaultUniqueTrap();
if (Enemy.LifePoints <= Enemy.BattlingMonster.Attack)
return DefaultUniqueTrap();
if (Enemy.BattlingMonster.Attack > 1800)
return DefaultUniqueTrap();
else
return false;
}
protected bool 圣防Effect()
{
if (Util.GetTotalAttackingMonsterAttack(1) > 1900 && !Enemy.BattlingMonster.IsMonsterImmuneTrap()) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
return false;
}
protected bool 落穴Effect()
{
foreach (ClientCard n in Duel.LastSummonedCards)
{
if (n.Attack >= 1900) return true;
if (Util.GetTotalAttackingMonsterAttack(1) - Util.GetTotalAttackingMonsterAttack(0) > Bot.LifePoints && !Bot.HasDefendingMonster()) return true;
}
return false;
}
protected bool 激流葬Effect()
{
return !Util.HasChainedTrap(0) && Util.IsAllEnemyBetter(true);
}
protected bool 炸甲Effect()
{
if (Enemy.BattlingMonster.Attack > 2000 && !Enemy.BattlingMonster.IsMonsterImmuneTrap()) return true;
if (Bot.LifePoints <= Enemy.BattlingMonster.Attack) return true;
if (!Util.IsOneEnemyBetterThanValue(1500, true) && Bot.GetSpellCountWithoutField() == 3) return true;
return false;
}
/// <summary>
/// Destroy face-down cards first, in our turn.
/// </summary>
......@@ -469,7 +608,8 @@ namespace WindBot.Game.AI
int[] ignoreList = {
_CardId.MacroCosmos,
_CardId.UpstartGoblin,
_CardId.CyberEmergency
_CardId.CyberEmergency,
_CardId.TheAgentOfCreationVenus
};
if (Util.GetLastChainCard().IsCode(ignoreList))
return false;
......@@ -498,8 +638,9 @@ namespace WindBot.Game.AI
/// </summary>
protected bool DefaultEffectVeiler()
{
if (Util.GetLastChainCard() != null && Util.GetLastChainCard().IsCode(_CardId.GalaxySoldier) && Enemy.Hand.Count >= 3) return false;
if (Util.ChainContainsCard(_CardId.EffectVeiler))
ClientCard LastChainCard = Util.GetLastChainCard();
if (LastChainCard != null && (LastChainCard.IsCode(_CardId.GalaxySoldier) && Enemy.Hand.Count >= 3
|| LastChainCard.IsCode(_CardId.EffectVeiler, _CardId.InfiniteImpermanence)))
return false;
return DefaultBreakthroughSkill();
}
......@@ -537,7 +678,9 @@ namespace WindBot.Game.AI
protected bool DefaultInfiniteImpermanence()
{
// TODO: disable s & t
if (!DefaultUniqueTrap())
ClientCard LastChainCard = Util.GetLastChainCard();
if (LastChainCard != null && (LastChainCard.IsCode(_CardId.GalaxySoldier) && Enemy.Hand.Count >= 3
|| LastChainCard.IsCode(_CardId.EffectVeiler, _CardId.InfiniteImpermanence)))
return false;
return DefaultDisableMonster();
}
......@@ -686,7 +829,7 @@ namespace WindBot.Game.AI
/// </summary>
protected bool DefaultSpellSet()
{
return (Card.IsTrap() || Card.HasType(CardType.QuickPlay) || DefaultSpellMustSetFirst()) && Bot.GetSpellCountWithoutField() < 4;
return (Card.IsTrap() || Card.HasType(CardType.QuickPlay) || DefaultSpellMustSetFirst()|| Bot.GetSpellCountWithoutField() < 3) && Bot.GetSpellCountWithoutField() < 4;
}
/// <summary>
......@@ -704,12 +847,23 @@ namespace WindBot.Game.AI
{
ClientCard tributeCard = Bot.MonsterZone[j];
if (tributeCard == null) continue;
if (tributeCard.GetDefensePower() < Card.Attack && tributeCard.Level<=4)
if (tributeCard.GetDefensePower() < Card.Attack && tributeCard.Level <= 4)
tributecount--;
}
return tributecount <= 0;
}
protected bool 伟大魔兽Sum()
{
int tributecount = 1;
for (int k = 0; k < 7; ++k)
{
ClientCard tributeCard2 = Bot.MonsterZone[k];
if (tributeCard2 == null) continue;
if (tributeCard2.GetDefensePower() > Card.Attack && tributeCard2.Attack > 1500)
tributecount--;
}
return tributecount <= 0;
}
/// <summary>
/// Activate when we have no field.
/// </summary>
......@@ -786,16 +940,17 @@ namespace WindBot.Game.AI
_CardId.EvilswarmExcitonKnight,
_CardId.BlackRoseDragon,
_CardId.JudgmentDragon,
_CardId.TopologicTrisbaena
_CardId.TopologicTrisbaena,
_CardId.EvenlyMatched
};
int[] destroyAllOpponentList =
int[] destroyAllOpponentSpellList =
{
_CardId.HarpiesFeatherDuster,
_CardId.DarkMagicAttack
};
if (Util.ChainContainsCard(destroyAllList)) return true;
if (Enemy.HasInSpellZone(destroyAllOpponentList, true)) return true;
if (Enemy.HasInSpellZone(destroyAllOpponentSpellList, true) && Card.Location == CardLocation.SpellZone) return true;
// TODO: ChainContainsCard(id, player)
return false;
}
......@@ -1175,5 +1330,6 @@ namespace WindBot.Game.AI
return Util.IsTurn1OrMain2();
}
}
}
......@@ -25,4 +25,21 @@
Heart_eartHDragon = 97403510,
DaigustoSphreeze = 29552709,
}
public enum ImmuneTrapMonster
{
幻龙重骑 = 120155022,
天帝龙树 = 120150011,
大连击龙 = 120210002,
超魔机神 = 120150002,
超魔机神2 = 120231005,
超魔辉兽 = 120217002,
灰霸炎神 = 120170015,
大恐龙驾 = 120151007,
终焰魔神 = 120231007,
焰魔神 = 120231011,
三日月之剑豪将军 = 120196033,
新种掠夺萝卜 = 120228035,
武枪 = 120231052,
极乐鹰巨人 = 120227001,
}
}
......@@ -10,6 +10,8 @@
z5 = 0x20,
z6 = 0x40,
FieldZone = 0x20,
MonsterZones = 0x7f,
MainMonsterZones = 0x1f,
ExtraMonsterZones = 0x60,
......
......@@ -248,6 +248,11 @@ namespace WindBot.Game
return HasInHand(cardId) || HasInGraveyard(cardId);
}
public bool HasInGraveyardOrInBanished(int cardId)
{
return HasInBanished(cardId) || HasInGraveyard(cardId);
}
public bool HasInMonstersZoneOrInGraveyard(int cardId)
{
return HasInMonstersZone(cardId) || HasInGraveyard(cardId);
......
......@@ -88,7 +88,7 @@ namespace WindBot.Game
ClientCard card = cards[seq];
if (card == null || subSeq >= card.Overlays.Count)
return null;
return null; // TODO card.Overlays[subSeq]
return new ClientCard(card.Overlays[subSeq], CardLocation.Overlay, 0, 0);
}
return cards[seq];
......
......@@ -98,6 +98,7 @@ namespace WindBot.Game
m_position.Clear();
m_selector_pointer = -1;
m_materialSelector = null;
m_materialSelectorHint = 0;
m_option = -1;
m_yesno = -1;
m_announce = 0;
......@@ -266,10 +267,18 @@ namespace WindBot.Game
}
}
else
{
if (m_materialSelector != null && hint == m_materialSelectorHint)
{
//Logger.DebugWriteLine("m_materialSelector hint match");
selector = m_materialSelector;
}
else
{
// Update the next selector.
selector = GetSelectedCards();
}
}
// If we selected a card, use this card.
if (selector != null)
......@@ -464,13 +473,13 @@ namespace WindBot.Game
/// <returns>Index of the selected option.</returns>
public int OnSelectOption(IList<int> options)
{
if (m_option != -1 && m_option < options.Count)
return m_option;
int result = Executor.OnSelectOption(options);
if (result != -1)
return result;
if (m_option != -1 && m_option < options.Count)
return m_option;
return 0; // Always select the first option.
}
......@@ -745,6 +754,7 @@ namespace WindBot.Game
private CardSelector m_materialSelector;
private int m_materialSelectorHint;
private int m_place;
private int m_option;
private int m_number;
......@@ -912,34 +922,40 @@ namespace WindBot.Game
m_selector.Insert(m_selector_pointer, new CardSelector(loc));
}
public void SelectMaterials(ClientCard card)
public void SelectMaterials(ClientCard card, int hint = 0)
{
m_materialSelector = new CardSelector(card);
m_materialSelectorHint = hint;
}
public void SelectMaterials(IList<ClientCard> cards)
public void SelectMaterials(IList<ClientCard> cards, int hint = 0)
{
m_materialSelector = new CardSelector(cards);
m_materialSelectorHint = hint;
}
public void SelectMaterials(int cardId)
public void SelectMaterials(int cardId, int hint = 0)
{
m_materialSelector = new CardSelector(cardId);
m_materialSelectorHint = hint;
}
public void SelectMaterials(IList<int> ids)
public void SelectMaterials(IList<int> ids, int hint = 0)
{
m_materialSelector = new CardSelector(ids);
m_materialSelectorHint = hint;
}
public void SelectMaterials(CardLocation loc)
public void SelectMaterials(CardLocation loc, int hint = 0)
{
m_materialSelector = new CardSelector(loc);
m_materialSelectorHint = hint;
}
public void CleanSelectMaterials()
{
m_materialSelector = null;
m_materialSelectorHint = 0;
}
public bool HaveSelectedCards()
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using WindBot.Game.AI;
using YGOSharp.Network;
......@@ -93,6 +94,7 @@ namespace WindBot.Game
_messages.Add(GameMessage.ShuffleHand, OnShuffleHand);
_messages.Add(GameMessage.ShuffleExtra, OnShuffleExtra);
_messages.Add(GameMessage.ShuffleSetCard, OnShuffleSetCard);
_messages.Add(GameMessage.SwapGraveDeck, OnSwapGraveDeck);
_messages.Add(GameMessage.TagSwap, OnTagSwap);
_messages.Add(GameMessage.NewTurn, OnNewTurn);
_messages.Add(GameMessage.NewPhase, OnNewPhase);
......@@ -442,6 +444,36 @@ namespace WindBot.Game
}
}
private void OnSwapGraveDeck(BinaryReader packet)
{
int player = GetLocalPlayer(packet.ReadByte());
IList<ClientCard> tmpDeckList = _duel.Fields[player].Deck.ToList();
_duel.Fields[player].Deck.Clear();
int seq = 0;
foreach(var card in _duel.Fields[player].Graveyard)
{
if (card.IsExtraCard())
{
_duel.Fields[player].ExtraDeck.Add(card);
card.Location = CardLocation.Extra;
card.Position = (int)CardPosition.FaceDown;
// TODO: face-up P cards
}
else
{
_duel.Fields[player].Deck.Add(card);
card.Location = CardLocation.Deck;
card.Sequence = seq++;
}
}
_duel.Fields[player].Graveyard.Clear();
foreach (var card in tmpDeckList)
{
_duel.Fields[player].Graveyard.Add(card);
card.Location = CardLocation.Grave;
}
}
private void OnTagSwap(BinaryReader packet)
{
int player = GetLocalPlayer(packet.ReadByte());
......@@ -992,6 +1024,7 @@ namespace WindBot.Game
int seq = packet.ReadByte();
packet.ReadByte(); // pos
}
if (count2 == 0) cancelable = false;
IList<ClientCard> selected = func(cards, (finishable ? 0 : 1), 1, _select_hint, cancelable);
......@@ -1250,6 +1283,12 @@ namespace WindBot.Game
location = CardLocation.SpellZone;
filter = (field >> 8) & Zones.SpellZones;
}
else if ((field & 0x2000) != 0)
{
player = 0;
location = CardLocation.FieldZone;
filter = Zones.FieldZone;
}
else if ((field & 0xc000) != 0)
{
player = 0;
......@@ -1268,6 +1307,12 @@ namespace WindBot.Game
location = CardLocation.SpellZone;
filter = (field >> 24) & Zones.SpellZones;
}
else if ((field & 0x20000000) != 0)
{
player = 1;
location = CardLocation.FieldZone;
filter = Zones.FieldZone;
}
else
{
player = 1;
......@@ -1281,7 +1326,7 @@ namespace WindBot.Game
byte[] resp = new byte[3];
resp[0] = (byte)GetLocalPlayer(player);
if (location != CardLocation.PendulumZone)
if (location != CardLocation.PendulumZone && location != CardLocation.FieldZone)
{
resp[1] = (byte)location;
if ((selected & filter) > 0)
......@@ -1301,8 +1346,9 @@ namespace WindBot.Game
if ((selected & filter) > 0)
filter &= selected;
if ((filter & Zones.z0) != 0) resp[2] = 6;
if ((filter & Zones.z1) != 0) resp[2] = 7;
if ((filter & Zones.FieldZone) != 0) resp[2] = 5;
if ((filter & Zones.z0) != 0) resp[2] = 6; // left pendulum zone
if ((filter & Zones.z1) != 0) resp[2] = 7; // right pendulum zone
}
BinaryWriter reply = GamePacketFactory.Create(CtosMessage.Response);
......
......@@ -52,6 +52,9 @@ namespace WindBot
if (!File.Exists(absolutePath))
// In case windbot is placed in a folder under ygopro folder
absolutePath = Path.GetFullPath("../" + databasePath);
if (!File.Exists(absolutePath))
// In case windbot is placed in a folder under ygopro2 folder
absolutePath = Path.GetFullPath("../cdb/" + databasePath);
if (!File.Exists(absolutePath))
{
Logger.WriteErrorLine("Can't find cards database file.");
......
......@@ -76,6 +76,8 @@ WindBot can run as a "server", provide a http interface to create bot.
* BlueEyesMaxDragon
* Brave
* ChainBurn
* DarkMagician
......@@ -106,6 +108,8 @@ WindBot can run as a "server", provide a http interface to create bot.
* ST1732
* ThunderDragon
* Toadally Awesome
* Trickstar
......
......@@ -24,7 +24,7 @@ namespace WindBot
Host = "127.0.0.1";
Port = 7911;
HostInfo = "";
Version = 0x1353;
Version = 0x1354;
Hand = 0;
Debug = false;
Chat = true;
......
......@@ -18,12 +18,12 @@
},
{
"name": "最强战旗",
"deck": "MathMech",
"deck": "SaikyoBattleFlag",
"dialog": "rd-d"
},
{
"name": "传说子",
"deck": "Dragun",
"deck": "TheLegend",
"dialog": "rd"
},
{
......
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