Commit ed0dbcac authored by nanahira's avatar nanahira

Merge branch 'master' into tricky

parents 97608d27 66f2396a
Pipeline #6003 passed with stage
in 1 minute and 36 seconds
...@@ -26,7 +26,7 @@ SUPPORT_MASTER_RULE_2020 ...@@ -26,7 +26,7 @@ SUPPORT_MASTER_RULE_2020
!P2-自选卡组 !P2-自选卡组
Name=P2 Deck=Lucky Dialog=gugugu.zh-CN Name=P2 Deck=Lucky Dialog=gugugu.zh-CN
人机卡组由你选择。随缘出牌。可将你的卡组文件(.ydk)复制到WindBot的对应文件夹。 人机卡组由你选择。随缘出牌。
SELECT_DECKFILE SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 SELECT_DECKFILE SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!谜之剑士LV4-龙骑星爆 !谜之剑士LV4-龙骑星爆
...@@ -209,7 +209,7 @@ Name=朱露咲浅羽 Deck=Salamangreat Dialog=nlch.zh-CN ...@@ -209,7 +209,7 @@ Name=朱露咲浅羽 Deck=Salamangreat Dialog=nlch.zh-CN
浅羽的香喷喷曲奇。 浅羽的香喷喷曲奇。
AI_LV3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 AI_LV3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!朱露咲浅羽-真红眼 !朱露咲浅羽-真红眼龙骑士
Name=朱露咲浅羽 Deck=Dragun Dialog=nlch.zh-CN Name=朱露咲浅羽 Deck=Dragun Dialog=nlch.zh-CN
超魔导真红眼龙骑士卡组。 超魔导真红眼龙骑士卡组。
AI_LV3 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 AI_LV3 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
...@@ -232,4 +232,4 @@ AI_LV2 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 ...@@ -232,4 +232,4 @@ AI_LV2 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!濑名歌铃 !濑名歌铃
Name=濑名歌铃 Deck=Brave Dialog=wof-Sena-Karin Name=濑名歌铃 Deck=Brave Dialog=wof-Sena-Karin
????? 卡组。 ????? 卡组。
AI_LV2 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 AI_LV3 SUPPORT_MASTER_RULE_2020
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"接下来就是我的舞台" "接下来就是我的舞台"
], ],
"endturn": [ "endturn": [
"我的回合结束,试试来击溃我吧" "每个人的目的不同,我更注重强度,我只想赢。"
], ],
"directattack": [ "directattack": [
"老子上了,要你的命" "老子上了,要你的命"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"directattack": [ "directattack": [
"{0},直接攻击!", "{0},直接攻击!",
"不过如此嘛,直接攻击!", "不过如此嘛,直接攻击!",
"快走开,我要回去睡觉了。", "快走开,我要回去睡觉了。"
], ],
"attack": [ "attack": [
"{0},攻击{1}!", "{0},攻击{1}!",
......
...@@ -53,6 +53,7 @@ namespace WindBot.Game.AI.Decks ...@@ -53,6 +53,7 @@ namespace WindBot.Game.AI.Decks
public const int BraveToken = 3285552; public const int BraveToken = 3285552;
public const int MechaPhantomBeastToken = 31533705; public const int MechaPhantomBeastToken = 31533705;
public const int PrimalBeingToken = 27204312;
} }
public BraveExecutor(GameAI ai, Duel duel) public BraveExecutor(GameAI ai, Duel duel)
...@@ -146,7 +147,7 @@ namespace WindBot.Game.AI.Decks ...@@ -146,7 +147,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, CardId.NemesesCorridor, SummonForMaterial); AddExecutor(ExecutorType.Summon, CardId.NemesesCorridor, SummonForMaterial);
AddExecutor(ExecutorType.Summon, CardId.DestinyHeroCelestial, SummonForMaterial); AddExecutor(ExecutorType.Summon, CardId.DestinyHeroCelestial, SummonForMaterial);
AddExecutor(ExecutorType.Activate, CardId.DestinyHeroDasher); AddExecutor(ExecutorType.Activate, CardId.DestinyHeroDasher, DestinyHeroDasherEffect);
AddExecutor(ExecutorType.Activate, CardId.DestinyHeroCelestial, DestinyHeroCelestialEffect); AddExecutor(ExecutorType.Activate, CardId.DestinyHeroCelestial, DestinyHeroCelestialEffect);
AddExecutor(ExecutorType.Repos, MonsterRepos); AddExecutor(ExecutorType.Repos, MonsterRepos);
...@@ -163,6 +164,8 @@ namespace WindBot.Game.AI.Decks ...@@ -163,6 +164,8 @@ namespace WindBot.Game.AI.Decks
private bool JetSynchronUsed = false; private bool JetSynchronUsed = false;
private bool FusionDestinyUsed = false; private bool FusionDestinyUsed = false;
private bool BaronessDeFleurUsed = false; private bool BaronessDeFleurUsed = false;
private ClientCard PhoenixTarget = null;
private int PhoenixSelectingTarget = 0;
public override bool OnSelectHand() public override bool OnSelectHand()
{ {
...@@ -175,6 +178,8 @@ namespace WindBot.Game.AI.Decks ...@@ -175,6 +178,8 @@ namespace WindBot.Game.AI.Decks
BeastOLionUsed = false; BeastOLionUsed = false;
JetSynchronUsed = false; JetSynchronUsed = false;
FusionDestinyUsed = false; FusionDestinyUsed = false;
PhoenixTarget = null;
PhoenixSelectingTarget = 0;
} }
public override CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions) public override CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions)
...@@ -184,6 +189,8 @@ namespace WindBot.Game.AI.Decks ...@@ -184,6 +189,8 @@ namespace WindBot.Game.AI.Decks
{ {
if (cardData.Attack <= 1000) if (cardData.Attack <= 1000)
return CardPosition.FaceUpDefence; return CardPosition.FaceUpDefence;
if (Util.IsTurn1OrMain2() && cardData.Attack <= 2500)
return CardPosition.FaceUpDefence;
} }
return 0; return 0;
} }
...@@ -207,6 +214,9 @@ namespace WindBot.Game.AI.Decks ...@@ -207,6 +214,9 @@ namespace WindBot.Game.AI.Decks
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable) 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) if (hint == HintMsg.AddToHand && max == 1)
{ {
foreach (ClientCard card in cards) foreach (ClientCard card in cards)
...@@ -234,6 +244,23 @@ namespace WindBot.Game.AI.Decks ...@@ -234,6 +244,23 @@ namespace WindBot.Game.AI.Decks
return new List<ClientCard>(new[] { card }); 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); return base.OnSelectCard(cards, min, max, hint, cancelable);
} }
...@@ -341,6 +368,7 @@ namespace WindBot.Game.AI.Decks ...@@ -341,6 +368,7 @@ namespace WindBot.Game.AI.Decks
|| (Duel.Player == 0 && Util.IsTurn1OrMain2()) || (Duel.Player == 0 && Util.IsTurn1OrMain2())
|| (Duel.Player == 1 && Enemy.GetMonsterCount() >= 2)) || (Duel.Player == 1 && Enemy.GetMonsterCount() >= 2))
{ {
PhoenixTarget = target;
AI.SelectCard(CardId.DestinyHeroDestroyPhoenixEnforcer); AI.SelectCard(CardId.DestinyHeroDestroyPhoenixEnforcer);
AI.SelectNextCard(target); AI.SelectNextCard(target);
return true; return true;
...@@ -432,10 +460,19 @@ namespace WindBot.Game.AI.Decks ...@@ -432,10 +460,19 @@ namespace WindBot.Game.AI.Decks
else else
{ {
// search rider or aquamancer // search rider or aquamancer
if (Bot.GetRemainingCount(CardId.WanderingGryphonRider, 1) == 0 && Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.AquamancerOfTheSanctuary)) if (Bot.GetRemainingCount(CardId.WanderingGryphonRider, 1) == 0 || Bot.GetHandCount() == 0 || !Bot.HasInMonstersZone(CardId.BraveToken))
return false; {
AI.SelectCard(CardId.WanderingGryphonRider); AI.SelectCard(CardId.AquamancerOfTheSanctuary);
AI.SelectNextCard(GetHandCost()); if (Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.AquamancerOfTheSanctuary))
AI.SelectNextCard(CardId.AquamancerOfTheSanctuary);
else
AI.SelectNextCard(GetHandCost());
}
else
{
AI.SelectCard(CardId.WanderingGryphonRider);
AI.SelectNextCard(GetHandCost());
}
return true; return true;
} }
} }
...@@ -494,6 +531,7 @@ namespace WindBot.Game.AI.Decks ...@@ -494,6 +531,7 @@ namespace WindBot.Game.AI.Decks
return false; return false;
List<int> materials = new List<int>{ List<int> materials = new List<int>{
CardId.Sangan, CardId.Sangan,
_CardId.GamecieltheSeaTurtleKaiju,
CardId.PredaplantVerteAnaconda, CardId.PredaplantVerteAnaconda,
CardId.SalamangreatAlmiraj, CardId.SalamangreatAlmiraj,
CardId.LinkSpider, CardId.LinkSpider,
...@@ -647,8 +685,9 @@ namespace WindBot.Game.AI.Decks ...@@ -647,8 +685,9 @@ namespace WindBot.Game.AI.Decks
private bool SalamangreatAlmirajSummon() private bool SalamangreatAlmirajSummon()
{ {
if (PhoenixNotAvail())
return false;
int[] materials = new[] { int[] materials = new[] {
CardId.Sangan,
CardId.MechaPhantomBeastOLion, CardId.MechaPhantomBeastOLion,
CardId.JetSynchron CardId.JetSynchron
}; };
...@@ -669,6 +708,10 @@ namespace WindBot.Game.AI.Decks ...@@ -669,6 +708,10 @@ namespace WindBot.Game.AI.Decks
{ {
materials.Add(CardId.BraveToken); 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) if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) == 0)
return false; return false;
AI.SelectMaterials(materials); AI.SelectMaterials(materials);
...@@ -700,7 +743,7 @@ namespace WindBot.Game.AI.Decks ...@@ -700,7 +743,7 @@ namespace WindBot.Game.AI.Decks
private bool PhoenixNotAvail() private bool PhoenixNotAvail()
{ {
return Bot.GetRemainingCount(CardId.FusionDestiny, 3) == 0 || Bot.HasInHand(CardId.FusionDestiny) return Bot.LifePoints <= 2000 || Bot.GetRemainingCount(CardId.FusionDestiny, 3) == 0 || Bot.HasInHand(CardId.FusionDestiny)
|| !Bot.HasInExtra(CardId.PredaplantVerteAnaconda) || !Bot.HasInExtra(CardId.DestinyHeroDestroyPhoenixEnforcer) || !Bot.HasInExtra(CardId.PredaplantVerteAnaconda) || !Bot.HasInExtra(CardId.DestinyHeroDestroyPhoenixEnforcer)
|| (Bot.GetRemainingCount(CardId.DestinyHeroCelestial, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroCelestial)) || (Bot.GetRemainingCount(CardId.DestinyHeroCelestial, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroCelestial))
|| (Bot.GetRemainingCount(CardId.DestinyHeroDasher, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroDasher)); || (Bot.GetRemainingCount(CardId.DestinyHeroDasher, 1) == 0 && !Bot.HasInHand(CardId.DestinyHeroDasher));
...@@ -712,6 +755,7 @@ namespace WindBot.Game.AI.Decks ...@@ -712,6 +755,7 @@ namespace WindBot.Game.AI.Decks
return false; return false;
List<int> materials = new List<int>{ List<int> materials = new List<int>{
_CardId.GamecieltheSeaTurtleKaiju,
CardId.AquamancerOfTheSanctuary, CardId.AquamancerOfTheSanctuary,
CardId.Sangan, CardId.Sangan,
CardId.SalamangreatAlmiraj, CardId.SalamangreatAlmiraj,
...@@ -807,6 +851,11 @@ namespace WindBot.Game.AI.Decks ...@@ -807,6 +851,11 @@ namespace WindBot.Game.AI.Decks
} }
} }
private bool DestinyHeroDasherEffect()
{
return Bot.Hand.Count(card => card.IsMonster()) > 1;
}
private bool DestinyHeroCelestialEffect() private bool DestinyHeroCelestialEffect()
{ {
if (!Bot.HasInGraveyard(CardId.DestinyHeroDasher)) if (!Bot.HasInGraveyard(CardId.DestinyHeroDasher))
...@@ -860,6 +909,10 @@ namespace WindBot.Game.AI.Decks ...@@ -860,6 +909,10 @@ namespace WindBot.Game.AI.Decks
private bool BaronessDeFleurEffect() private bool BaronessDeFleurEffect()
{ {
if (Duel.LastChainPlayer == 0)
{
return false;
}
if (Duel.LastChainPlayer == 1) if (Duel.LastChainPlayer == 1)
{ {
BaronessDeFleurUsed = true; BaronessDeFleurUsed = true;
...@@ -886,6 +939,9 @@ namespace WindBot.Game.AI.Decks ...@@ -886,6 +939,9 @@ namespace WindBot.Game.AI.Decks
private bool VirtualWorldKyubiShenshenSummon() private bool VirtualWorldKyubiShenshenSummon()
{ {
if (Bot.HasInMonstersZone(CardId.DestinyHeroDestroyPhoenixEnforcer))
return false;
int[] materials = new[] { int[] materials = new[] {
CardId.CoralDragon, CardId.CoralDragon,
......
...@@ -106,6 +106,7 @@ namespace WindBot.Game.AI ...@@ -106,6 +106,7 @@ namespace WindBot.Game.AI
public const int MacroCosmos = 30241314; public const int MacroCosmos = 30241314;
public const int UpstartGoblin = 70368879; public const int UpstartGoblin = 70368879;
public const int CyberEmergency = 60600126; public const int CyberEmergency = 60600126;
public const int TheAgentOfCreationVenus = 64734921;
public const int EaterOfMillions = 63845230; public const int EaterOfMillions = 63845230;
...@@ -471,7 +472,8 @@ namespace WindBot.Game.AI ...@@ -471,7 +472,8 @@ namespace WindBot.Game.AI
int[] ignoreList = { int[] ignoreList = {
_CardId.MacroCosmos, _CardId.MacroCosmos,
_CardId.UpstartGoblin, _CardId.UpstartGoblin,
_CardId.CyberEmergency _CardId.CyberEmergency,
_CardId.TheAgentOfCreationVenus
}; };
if (Util.GetLastChainCard().IsCode(ignoreList)) if (Util.GetLastChainCard().IsCode(ignoreList))
return false; return false;
...@@ -793,14 +795,14 @@ namespace WindBot.Game.AI ...@@ -793,14 +795,14 @@ namespace WindBot.Game.AI
_CardId.JudgmentDragon, _CardId.JudgmentDragon,
_CardId.TopologicTrisbaena _CardId.TopologicTrisbaena
}; };
int[] destroyAllOpponentList = int[] destroyAllOpponentSpellList =
{ {
_CardId.HarpiesFeatherDuster, _CardId.HarpiesFeatherDuster,
_CardId.DarkMagicAttack _CardId.DarkMagicAttack
}; };
if (Util.ChainContainsCard(destroyAllList)) return true; 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) // TODO: ChainContainsCard(id, player)
return false; return false;
} }
......
...@@ -1041,6 +1041,7 @@ namespace WindBot.Game ...@@ -1041,6 +1041,7 @@ namespace WindBot.Game
int seq = packet.ReadByte(); int seq = packet.ReadByte();
packet.ReadByte(); // pos packet.ReadByte(); // pos
} }
if (count2 == 0) cancelable = false;
IList<ClientCard> selected = func(cards, (finishable ? 0 : 1), 1, _select_hint, cancelable); IList<ClientCard> selected = func(cards, (finishable ? 0 : 1), 1, _select_hint, cancelable);
......
...@@ -79,6 +79,8 @@ WindBot can run as a "server", provide a http interface to create bot. ...@@ -79,6 +79,8 @@ WindBot can run as a "server", provide a http interface to create bot.
* BlueEyesMaxDragon * BlueEyesMaxDragon
* Brave
* ChainBurn * ChainBurn
* DarkMagician * DarkMagician
......
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