Commit 03f3161a authored by 苍蓝's avatar 苍蓝

重命名

parent 1eb0cb01
Pipeline #6133 passed with stage
in 37 seconds
#created by ... #created by ...
#main #main
46986414 120120000
46986414 120120000
74677422 120120000
74677422 120170000
67300516 120170000
10802915 120110001
10802915 120110001
26202165 120183000
91646304 120194002
14558127 120194002
14558127 120194002
72291078 120194003
72291078 120194003
72291078 120194003
23434538 120151010
23434538 120151010
23434538 120151010
97631303 120110009
97631303 120110009
97631303 120110009
1845204 120170035
1845204 120170035
6172122 120120017
6172122 120120017
6172122 120120017
11827244 120151023
11827244 120151023
18144506 120151023
81439173 120181003
83764718 120181003
92353449 120181003
92353449 120151018
24224830 120151018
24224830 120151018
24224830 120194004
10045474 120194005
10045474 120194005
10045474 120150019
40605147 120150019
40605147 120150019
#extra #extra
37818794
37818794
37818794
96334243
63519819
50588353
70369116
70369116
98978921
98978921
31226177
31226177
60303245
60303245
60303245
!side !side
#created by ... #created by ...
#main #main
8567955 120181011
8567955 120181011
8567955 120181011
89743495 120181001
89743495 120181001
27182739 120181001
27182739 120155015
27182739 120155015
53577438 120155015
53577438 120193002
53577438 120193002
16360142 120193002
16360142 120183002
16360142 120183002
80965043 120183024
80965043 120183024
80965043 120183030
52354896 120183030
52354896 120183030
12580477 120151010
14025912 120151010
14532163 120183031
14532163 120183031
35261759 120193003
35261759 120193003
35261759 120193003
57160136 120130039
57160136 120130039
57160136 120183054
70368879 120183054
70368879 120183054
70368879 120151023
81439173 120155060
93104632 120155060
93104632 120183062
8267140 120183062
41410651 120183063
36361633 120183063
36361633 120170061
36361633 120183064
#extra #extra
42632209
42632209
42632209
15248594
15248594
15248594
61399402
61399402
61399402
85692042
85692042
85692042
88021907
88021907
88021907
!side !side
...@@ -2,34 +2,31 @@ ...@@ -2,34 +2,31 @@
#main #main
120183024 120183024
120183054
120193002
120181011 120181011
120181011 120181011
120181011 120181011
120183054
120183054
120181001 120181001
120193002
120193002
120193002
120183002
120183002
120183054
120181001 120181001
120181001 120181001
120155015 120155015
120155015 120155015
120155015 120155015
120193002
120193002
120183002
120183002
120183024 120183024
120183030 120183030
120183030 120183030
120183030 120183030
120151010 120151010
120151010
120183031 120183031
120183031 120183031
120183031
120193003 120193003
120193003 120193003
......
using System; using YGOSharp.OCGWrapper.Enums;
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
using WindBot.Game.AI; using WindBot.Game.AI;
using System.Linq; using System;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("Dragun", "AI_Dragun")] [Deck("Dragun", "AI_Dragun")]
class DragunExecutor : DefaultExecutor public class DragunExecutor : DefaultExecutor
{ {
public class CardId public class CardId
{ {
public const int DarkMagician = 46986414; public const int 青眼白龙 = 120120000;
public const int RedEyesBDragon = 74677422; public const int 破坏之剑士 = 120170000;
public const int RedEyesWyvern = 67300516; public const int 连击龙 = 120110001;
public const int TourGuideFromTheUnderworld = 10802915; public const int 电子科技翼龙 = 120183000;
public const int Sangan = 26202165; public const int 血腥魔兽人 = 120194002;
public const int CrusadiaArboria = 91646304; public const int 圣精灵 = 120194003;
public const int AshBlossomJoyousSpring = 14558127;
public const int MechaPhantomBeastOLion = 72291078; public const int 成金恐龙王 = 120151010;
public const int MechaPhantomBeastOLionToken = 72291079; public const int 机器栗子 = 120120017;
public const int MaxxC = 23434538; public const int 斗牛士 = 120170035;
public const int MagiciansSouls = 97631303; public const int 凤凰龙 = 120110009;
public const int 死苏 = 120194004;
public const int InstantFusion = 1845204; public const int 成金哥布林 = 120151018;
public const int RedEyesFusion = 6172122; public const int 强欲之壶 = 120181003;
public const int MagicalizedFusion = 11827244; public const int 对死者的供奉 = 120151023;
public const int HarpiesFeatherDuster = 18144506; public const int 落穴 = 120150019;
public const int FoolishBurial = 81439173; public const int 圣防 = 120198003;
public const int MonsterReborn = 83764718; public const int 炸甲 = 120194005;
public const int RedEyesInsight = 92353449;
public const int CalledbyTheGrave = 24224830;
public const int InfiniteImpermanence = 10045474;
public const int SolemnStrike = 40605147;
public const int DragunofRedEyes = 37818794;
public const int SeaMonsterofTheseus = 96334243;
public const int ThousandEyesRestrict = 63519819;
public const int CrystronHalqifibrax = 50588353;
public const int PredaplantVerteAnaconda = 70369116;
public const int LinkSpider = 98978921;
public const int ImdukTheWorldChaliceDragon = 31226177;
public const int SalamangreatAlmiraj = 60303245;
} }
public DragunExecutor(GameAI ai, Duel duel) public DragunExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
// counter AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.AshBlossomJoyousSpring, DefaultAshBlossomAndJoyousSpring); AddExecutor(ExecutorType.Activate, CardId.强欲之壶);
AddExecutor(ExecutorType.Activate, CardId.CalledbyTheGrave, DefaultCalledByTheGrave); AddExecutor(ExecutorType.Activate, CardId.成金哥布林);
AddExecutor(ExecutorType.Activate, CardId.InfiniteImpermanence, DefaultInfiniteImpermanence); AddExecutor(ExecutorType.Activate, CardId.成金恐龙王, 成金恐龙王Effect);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike); AddExecutor(ExecutorType.Activate, CardId.机器栗子);
AddExecutor(ExecutorType.Activate, CardId.DragunofRedEyes, DragunofRedEyesCounter); AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.Activate, CardId.MaxxC, DefaultMaxxC);
AddExecutor(ExecutorType.Activate, CardId.HarpiesFeatherDuster);
AddExecutor(ExecutorType.Activate, CardId.DragunofRedEyes, DragunofRedEyesDestroy);
AddExecutor(ExecutorType.Activate, CardId.ThousandEyesRestrict, ThousandEyesRestrictEffect);
AddExecutor(ExecutorType.Activate, CardId.RedEyesInsight, RedEyesInsightEffect);
AddExecutor(ExecutorType.Activate, CardId.RedEyesFusion, RedEyesFusionEffect);
AddExecutor(ExecutorType.Repos, MonsterRepos);
AddExecutor(ExecutorType.Summon, CardId.TourGuideFromTheUnderworld, TourGuideFromTheUnderworldSummon);
AddExecutor(ExecutorType.Activate, CardId.TourGuideFromTheUnderworld, TourGuideFromTheUnderworldEffect);
AddExecutor(ExecutorType.Summon, CardId.Sangan, SanganSummon);
AddExecutor(ExecutorType.Activate, CardId.Sangan, SanganEffect);
AddExecutor(ExecutorType.Summon, CardId.MechaPhantomBeastOLion);
AddExecutor(ExecutorType.Activate, CardId.MechaPhantomBeastOLion, MechaPhantomBeastOLionEffect);
AddExecutor(ExecutorType.SpSummon, CardId.SalamangreatAlmiraj, SalamangreatAlmirajSummon); AddExecutor(ExecutorType.SummonOrSet, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.SpSummon, CardId.ImdukTheWorldChaliceDragon, ImdukTheWorldChaliceDragonSummon); AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider, LinkSpiderSummon); AddExecutor(ExecutorType.SummonOrSet, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.电子科技翼龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.机器栗子,栗子summon);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect2);
AddExecutor(ExecutorType.MonsterSet, CardId.斗牛士, Monsterset);
AddExecutor(ExecutorType.Summon, CardId.斗牛士);
AddExecutor(ExecutorType.SpSummon, CardId.CrusadiaArboria); AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.Activate, CardId.InstantFusion, InstantFusionEffect); AddExecutor(ExecutorType.SummonOrSet, CardId.成金恐龙王, 成金恐龙王Summon);
AddExecutor(ExecutorType.SummonOrSet, CardId.血腥魔兽人);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.SpellSet, CardId.圣防);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.Summon, CardId.RedEyesWyvern); AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.Summon, CardId.CrusadiaArboria, SummonForMaterial); AddExecutor(ExecutorType.MonsterSet, CardId.圣精灵);
AddExecutor(ExecutorType.Summon, CardId.AshBlossomJoyousSpring, SummonForMaterial); AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.Summon, CardId.MaxxC, SummonForMaterial);
AddExecutor(ExecutorType.Activate, CardId.FoolishBurial, FoolishBurialEffect); AddExecutor(ExecutorType.MonsterSet, CardId.机器栗子);
AddExecutor(ExecutorType.Activate, CardId.MonsterReborn, MonsterRebornEffect); AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, CardId.MagiciansSouls, MagiciansSoulsEffect); AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Summon, CardId.MagiciansSouls, SummonForMaterial);
AddExecutor(ExecutorType.SpSummon, CardId.CrystronHalqifibrax, CrystronNeedlefiberSummon); AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Activate, CardId.CrystronHalqifibrax, CrystronNeedlefiberEffect); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor(ExecutorType.SpSummon, CardId.PredaplantVerteAnaconda, PredaplantVerteAnacondaSummon);
AddExecutor(ExecutorType.Activate, CardId.MagicalizedFusion, MagicalizedFusionEffect);
AddExecutor(ExecutorType.Activate, CardId.PredaplantVerteAnaconda, PredaplantVerteAnacondaEffect);
AddExecutor(ExecutorType.SpellSet, CardId.InfiniteImpermanence, TrapSet);
AddExecutor(ExecutorType.SpellSet, CardId.SolemnStrike, TrapSet);
AddExecutor(ExecutorType.MonsterSet, CardId.Sangan);
} }
private bool BeastOLionUsed = false;
private bool RedEyesFusionUsed = false;
public override bool OnSelectHand()
{
// go first
return true;
}
public override void OnNewTurn()
{
BeastOLionUsed = false;
RedEyesFusionUsed = false;
}
public override CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions) private List<int> HintMsgForEnemy = new List<int>
{ {
YGOSharp.OCGWrapper.NamedCard cardData = YGOSharp.OCGWrapper.NamedCard.Get(cardId); HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
if (cardData != null) HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
};
private List<int> HintMsgForMaxSelect = new List<int>
{ {
if (cardData.Attack <= 1000) HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
return CardPosition.FaceUpDefence; };
}
return 0;
}
public override int OnSelectPlace(int cardId, int player, CardLocation location, int available) public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{ {
if (location == CardLocation.MonsterZone) if (Duel.Phase == DuelPhase.BattleStart)
{ return null;
return available & ~Bot.GetLinkedZones(); if (AI.HaveSelectedCards())
} return null;
return 0;
}
private bool DragunofRedEyesCounter() IList<ClientCard> selected = new List<ClientCard>();
{ IList<ClientCard> cards = new List<ClientCard>(_cards);
if (ActivateDescription != -1 && ActivateDescription != Util.GetStringId(CardId.DragunofRedEyes, 1)) if (max > cards.Count)
return false; max = cards.Count;
if (Duel.LastChainPlayer != 1)
return false;
AI.SelectCard(new[] {
CardId.RedEyesWyvern,
CardId.MechaPhantomBeastOLion
});
return true;
}
private bool DragunofRedEyesDestroy() if (HintMsgForEnemy.Contains(hint))
{ {
if (ActivateDescription == -1 || ActivateDescription == Util.GetStringId(CardId.DragunofRedEyes, 1)) IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
return false;
AI.SelectCard(Util.GetBestEnemyMonster());
return true;
}
private bool ThousandEyesRestrictEffect() // select enemy's card first
while (enemyCards.Count > 0 && selected.Count < max)
{ {
AI.SelectCard(Util.GetBestEnemyMonster()); ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
return true; selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
} }
private bool RedEyesInsightEffect()
{
if (Bot.HasInHand(CardId.RedEyesFusion))
return false;
if (Bot.GetRemainingCount(CardId.RedEyesWyvern, 1) == 0 && Bot.GetRemainingCount(CardId.RedEyesBDragon, 2) == 1 && !Bot.HasInHand(CardId.RedEyesBDragon))
return false;
AI.SelectCard(CardId.RedEyesWyvern);
return true;
} }
private bool RedEyesFusionEffect() if (HintMsgForMaxSelect.Contains(hint))
{ {
if (Bot.HasInMonstersZone(new[] { CardId.DragunofRedEyes, CardId.RedEyesBDragon })) // select max cards
{ // you don't want to use DragunofRedEyes which is treated as RedEyesBDragon as fusion material while (selected.Count < max)
if (Util.GetBotAvailZonesFromExtraDeck() == 0) {
return false; ClientCard card = cards[Program.Rand.Next(cards.Count)];
if (Bot.GetRemainingCount(CardId.RedEyesBDragon, 2) == 0 && !Bot.HasInHand(CardId.RedEyesBDragon)) selected.Add(card);
return false; cards.Remove(card);
} }
AI.SelectMaterials(CardLocation.Deck);
RedEyesFusionUsed = true;
return true;
} }
private bool TourGuideFromTheUnderworldSummon() return selected;
{
if (Bot.GetRemainingCount(CardId.TourGuideFromTheUnderworld, 2) == 0 && Bot.GetRemainingCount(CardId.Sangan, 2) == 0)
return false;
return true;
} }
public override bool OnSelectHand()
private bool TourGuideFromTheUnderworldEffect()
{ {
AI.SelectCard(CardId.Sangan); // go first
return true; return true;
} }
public bool Monsterset()
private bool SanganSummon()
{ {
return true; if (Duel.Turn == 1)
}
private bool SanganEffect()
{ {
if (Bot.HasInMonstersZone(CardId.SalamangreatAlmiraj) && !Bot.HasInHand(CardId.CrusadiaArboria))
AI.SelectCard(CardId.CrusadiaArboria);
else if (!Bot.HasInHand(CardId.MaxxC))
AI.SelectCard(CardId.MaxxC);
else if (!Bot.HasInHand(CardId.AshBlossomJoyousSpring))
AI.SelectCard(CardId.AshBlossomJoyousSpring);
else if (!Bot.HasInHand(CardId.MagiciansSouls))
AI.SelectCard(CardId.MagiciansSouls);
else if (!Bot.HasInHand(CardId.CrusadiaArboria))
AI.SelectCard(CardId.CrusadiaArboria);
else
AI.SelectCard(new[] {
CardId.AshBlossomJoyousSpring,
CardId.MaxxC,
CardId.CrusadiaArboria
});
return true; return true;
} }
else if (Bot.HasInHand(new[] {
private bool SalamangreatAlmirajSummon() CardId.连击龙,
{ CardId.青眼白龙,
int[] materials = new[] { CardId.电子科技翼龙,
CardId.Sangan, CardId.破坏之剑士,
CardId.MechaPhantomBeastOLion
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials) && !card.IsSpecialSummoned) == 0)
return false;
AI.SelectMaterials(materials);
return true;
}
private bool ImdukTheWorldChaliceDragonSummon() }))
{
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true) || !Bot.HasInExtra(CardId.PredaplantVerteAnaconda))
return false;
if (Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Dragon) > 0) >= 0)
return false;
if (Bot.GetMonsterCount() == 1 && Bot.Hand.GetMatchingCardsCount(card => card.Level <= 4) == 0 && !Util.IsTurn1OrMain2())
return false;
if (Bot.GetMonsterCount() >= 2 && Bot.MonsterZone.GetMatchingCardsCount(card => card.Level >= 8) > 0)
return false; return false;
return true; return true;
} }
private bool LinkSpiderSummon() private bool 落穴Effect()
{ {
if (!Bot.HasInMonstersZone(CardId.MechaPhantomBeastOLionToken)) foreach (ClientCard n in Duel.LastSummonedCards)
return false;
AI.SelectMaterials(CardId.MechaPhantomBeastOLionToken);
return true;
}
private bool NeedMonster()
{ {
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true) || !Bot.HasInExtra(CardId.PredaplantVerteAnaconda)) if (n.Attack >= 1900)
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; return true;
} }
private bool InstantFusionEffect()
{
if (!NeedMonster())
return false; return false;
if (Enemy.GetMonsterCount() > 0)
AI.SelectCard(CardId.ThousandEyesRestrict);
else
AI.SelectCard(CardId.SeaMonsterofTheseus);
return true;
} }
private bool 圣防Effect()
private bool SummonForMaterial()
{ {
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true) || !Bot.HasInExtra(CardId.PredaplantVerteAnaconda)) if (Util.GetTotalAttackingMonsterAttack(1) > 1900)
return false;
if (Bot.MonsterZone.GetMatchingCardsCount(card => (card.HasType(CardType.Effect) || card.IsTuner()) && card.Level < 8) == 1)
return true;
if (Bot.HasInHand(CardId.MagiciansSouls))
return true; return true;
return false; return false;
} }
private bool 炸甲Effect()
private bool MagiciansSoulsEffect()
{ {
if (Card.Location == CardLocation.Hand) if (Enemy.BattlingMonster.Attack > 1500)
{
if (RedEyesFusionUsed)
return false;
if (Bot.GetMonsterCount() >= 2)
return false;
AI.SelectOption(1);
AI.SelectYesNo(true);
return true; return true;
return false;
} }
else private bool 死苏effect()
{ {
int[] costs = new[] { IList<int> targets = new[] {
CardId.RedEyesInsight, CardId.青眼白龙,
CardId.RedEyesFusion CardId.破坏之剑士,
CardId.连击龙,
CardId.电子科技翼龙,
}; };
if (Bot.HasInHand(costs)) if (!Bot.HasInGraveyard(targets) || !Enemy.HasInGraveyard(targets))
{ {
AI.SelectCard(costs); AI.SelectCard(targets);
return true; return true;
} }
return false; return false;
} }
} private bool 死苏effect2()
private bool PredaplantVerteAnacondaSummon()
{ {
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true)) if (!Util.IsAllEnemyBetter(true))
return false; return false;
ClientCard selected = Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()).OrderByDescending(card => card.Attack).FirstOrDefault();
int[] materials = new[] { if (selected.Attack >=2400)
CardId.ImdukTheWorldChaliceDragon,
CardId.Sangan,
CardId.TourGuideFromTheUnderworld,
CardId.CrusadiaArboria,
CardId.MechaPhantomBeastOLion,
CardId.MagiciansSouls,
CardId.SalamangreatAlmiraj,
CardId.LinkSpider,
CardId.ThousandEyesRestrict,
CardId.AshBlossomJoyousSpring,
CardId.MaxxC,
CardId.RedEyesWyvern,
CardId.CrystronHalqifibrax
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(materials)) >= 2)
{ {
AI.SelectMaterials(materials); AI.SelectCard(selected);
return true; return true;
} }
return false; return false;
} }
private bool 成金恐龙王Effect()
private bool MagicalizedFusionEffect()
{ {
if (Bot.HasInMonstersZone(new[] { CardId.DragunofRedEyes, CardId.RedEyesBDragon })) AI.SelectCard(CardId.成金哥布林);
{ // you don't want to use DragunofRedEyes which is treated as RedEyesBDragon as fusion material
if (Util.GetBotAvailZonesFromExtraDeck() == 0)
return false;
if (Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Dragon) > 0) == 0)
return false;
}
AI.SelectMaterials(CardLocation.Grave);
return true; return true;
} }
private bool 成金恐龙王Summon()
private bool PredaplantVerteAnacondaEffect()
{ {
if (ActivateDescription == Util.GetStringId(CardId.PredaplantVerteAnaconda, 0)) if (Enemy.GetHandCount() < 1) return true;
return false; return false;
AI.SelectCard(CardId.RedEyesFusion);
AI.SelectMaterials(CardLocation.Deck);
return true;
} }
private bool 栗子summon()
private bool FoolishBurialEffect()
{
if (RedEyesFusionUsed)
return false;
if (Bot.HasInHand(CardId.MagicalizedFusion))
{ {
if (Bot.HasInGraveyard(CardId.DarkMagician) && Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Dragon) > 0) == 0) if (Bot.HasInHand(CardId.机器栗子) && (Bot.GetMonstersInMainZone().Count == 0))
{
AI.SelectCard(new[]
{
CardId.RedEyesWyvern,
CardId.RedEyesBDragon
});
return true; return true;
return false;
} }
if (!Bot.HasInGraveyard(CardId.DarkMagician) && Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Dragon) > 0) > 0) private bool 凤凰龙summon()
{ {
AI.SelectCard(CardId.DarkMagician); if (Bot.HasInGraveyard(new[] { CardId.连击龙, CardId.青眼白龙 }))
return true; return true;
}
}
if (!NeedMonster())
return false; return false;
AI.SelectCard(new[] {
CardId.MechaPhantomBeastOLion
});
return true;
} }
private bool MonsterRebornEffect() private bool 死供Effect()
{ {
if (Bot.HasInGraveyard(CardId.DragunofRedEyes)) if (Util.IsOneEnemyBetterThanValue(1900, false))
{ {
AI.SelectCard(CardId.DragunofRedEyes); 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);
return true; return true;
} }
else
{
if (!NeedMonster())
return false; return false;
AI.SelectCard(new[] {
CardId.PredaplantVerteAnaconda,
CardId.Sangan,
CardId.ThousandEyesRestrict,
CardId.MechaPhantomBeastOLion,
CardId.CrusadiaArboria,
CardId.AshBlossomJoyousSpring
});
return true;
} }
} private bool 斗牛士Effect()
private bool MechaPhantomBeastOLionEffect()
{ {
if (ActivateDescription == -1)
//if (Util.IsOneEnemyBetterThanValue(1900, false))
{ {
BeastOLionUsed = true; foreach (ClientCard o in Bot.Graveyard)
AI.SelectCard(o);
if (Enemy.GetMonsters().GetHighestAttackMonster() == null)
AI.SelectNextCard(Enemy.MonsterZone.GetHighestAttackMonster());
return true; return true;
} }
return !BeastOLionUsed; // return false;
} }
private bool CrystronNeedlefiberSummon()
{
if (Bot.HasInMonstersZone(CardId.PredaplantVerteAnaconda, true))
return false;
int[] materials = new[] {
CardId.CrusadiaArboria,
CardId.MechaPhantomBeastOLion,
CardId.AshBlossomJoyousSpring,
CardId.SeaMonsterofTheseus,
CardId.MechaPhantomBeastOLionToken,
CardId.DarkMagician,
CardId.ImdukTheWorldChaliceDragon,
CardId.Sangan,
CardId.TourGuideFromTheUnderworld,
CardId.MagiciansSouls,
CardId.SalamangreatAlmiraj,
CardId.LinkSpider,
CardId.ThousandEyesRestrict,
CardId.SeaMonsterofTheseus,
CardId.MaxxC,
CardId.RedEyesWyvern
};
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.MechaPhantomBeastOLion);
return true;
}
else
{
return true;
}
}
private bool TrapSet()
{
if (Bot.HasInMonstersZone(new[] { CardId.DragunofRedEyes, CardId.RedEyesBDragon }) && Bot.GetHandCount() == 1)
return false;
AI.SelectPlace(Zones.z0 + Zones.z1 + Zones.z3 + Zones.z4);
return true;
}
private bool MonsterRepos()
{
if (Card.IsFacedown())
return true;
return DefaultMonsterRepos();
}
}
}
using System; using YGOSharp.OCGWrapper.Enums;
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Linq;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
using WindBot.Game.AI; using WindBot.Game.AI;
using System.Linq; using System;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("MathMech", "AI_Mathmech")] [Deck("MathMech", "AI_Mathmech")]
public class MathmechExecutor : DefaultExecutor public class MathMechExecutor : DefaultExecutor
{ {
public class CardId public class CardId
{ {
public const int MathmechNebla = 53577438; public const int 最强战旗 = 120181001;
public const int MathmechSigma = 27182739; public const int 钢机神 = 120155015;
public const int MathmechDivision = 89743495; public const int 连击龙 = 120110001;
public const int MathmechAddition = 80965043; public const int 恶德 = 120183024;
public const int MathmechSubtra = 16360142; public const int 旗兽 = 120193002;
public const int Mathmechdouble = 52354896; public const int 社员 = 120183002;
public const int MathmechFinalSigma = 42632209;
public const int Mathmechalem = 85692042; public const int 成金恐龙王 = 120151010;
public const int MathmechMagma = 15248594; public const int 突击坦克 = 120183031;
public const int BalancerLord = 08567955; public const int 工匠无人机 = 120183030;
public const int LightDragon = 61399402; public const int 双角兽 = 120181011;
public const int 瞄准鹰 = 120193003;
// spells public const int 死苏 = 120194004;
public const int upstartGoblin = 70368879; public const int 世纪末兽机界 = 120130039;
public const int raigeki = 12580477; public const int 铁之重击 = 120183054;
public const int cynetmining = 57160136; public const int 对死者的供奉 = 120151023;
public const int PotOfDesires= 35261759;
public const int lightningStorm = 14532163; public const int 兽之拳 = 120155060;
public const int cosmicCyclone = 08267140; public const int 减俸 = 120183062;
public const int foolishBurial = 81439173; public const int 左迁 = 120183063;
public const int OneTimePasscode = 93104632; public const int 冻结 = 120183064;
public const int mathmechEquation = 14025912; }
//traps
public const int threanteningRoar = 36361633; public MathMechExecutor(GameAI ai, Duel duel)
//tokens
public const int securitytoken = 93104633;
}
public MathmechExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.Activate, CardId.raigeki ,when_raigeki); AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.upstartGoblin); AddExecutor(ExecutorType.Activate, CardId.铁之重击);
AddExecutor(ExecutorType.Activate, CardId.OneTimePasscode); AddExecutor(ExecutorType.Activate, CardId.成金恐龙王);
AddExecutor(ExecutorType.SpellSet, CardId.threanteningRoar); AddExecutor(ExecutorType.Activate, CardId.恶德, 恶德Effect);
AddExecutor(ExecutorType.Activate,CardId.cosmicCyclone , when_cosmic); AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Eff);
AddExecutor(ExecutorType.Activate,CardId.lightningStorm ,lightstorm_target); AddExecutor(ExecutorType.Activate, CardId.最强战旗, 最强战旗Eff);
AddExecutor(ExecutorType.Activate,CardId.foolishBurial,foolish_burial_target); AddExecutor(ExecutorType.Activate, CardId.突击坦克, 突击坦克Effect);
AddExecutor(ExecutorType.Activate,CardId.mathmechEquation,mathmech_equation_target); AddExecutor(ExecutorType.Activate, CardId.瞄准鹰, 瞄准鹰Effect);
AddExecutor(ExecutorType.Activate,CardId.PotOfDesires); AddExecutor(ExecutorType.Activate, CardId.双角兽, 双角兽Effect);
AddExecutor(ExecutorType.Summon, CardId.最强战旗, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon, CardId.钢机神, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon, CardId.MathmechNebla); AddExecutor(ExecutorType.Summon, CardId.恶德, DefaultDoubleSummon);
AddExecutor(ExecutorType.Summon,CardId.BalancerLord ); AddExecutor(ExecutorType.Summon, CardId.最强战旗, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.Mathmechdouble); AddExecutor(ExecutorType.Summon, CardId.钢机神, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.MathmechSubtra); AddExecutor(ExecutorType.Summon, CardId.恶德, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.MathmechAddition);
AddExecutor(ExecutorType.Summon, CardId.MathmechDivision); AddExecutor(ExecutorType.Summon, CardId.双角兽, 双角兽summon);
AddExecutor(ExecutorType.Summon, CardId.MathmechDivision); AddExecutor(ExecutorType.Summon, CardId.成金恐龙王, 成金恐龙王Summon);
AddExecutor(ExecutorType.Activate, CardId.MathmechSigma); AddExecutor(ExecutorType.Summon, CardId.瞄准鹰, 瞄准鹰summon);
AddExecutor(ExecutorType.Activate,CardId.threanteningRoar); AddExecutor(ExecutorType.Summon, CardId.瞄准鹰, 瞄准鹰summon2);
AddExecutor(ExecutorType.Summon, CardId.瞄准鹰, 瞄准鹰summon3);
//xyz summons AddExecutor(ExecutorType.Summon, CardId.双角兽, 瞄准鹰双角兽summon);
AddExecutor(ExecutorType.SpSummon, CardId.Mathmechalem, when_Mathmechalem); AddExecutor(ExecutorType.Summon, CardId.成金恐龙王, 瞄准鹰成金恐龙王summon);
//xyz effects AddExecutor(ExecutorType.Summon, CardId.突击坦克, 瞄准鹰坦克summon);
AddExecutor(ExecutorType.Activate, CardId.Mathmechalem, mathchalenEffect); AddExecutor(ExecutorType.Activate, CardId.最强战旗, 最强战旗Effect);
//Synchro AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SpSummon, CardId.MathmechFinalSigma , FinalSigmaSummon); AddExecutor(ExecutorType.Activate, CardId.钢机神, 钢机神Effect);
AddExecutor(ExecutorType.Activate, CardId.钢机神, 钢机神1Effect);
AddExecutor(ExecutorType.Activate, CardId.Mathmechdouble, doubleEffect); AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, CardId.工匠无人机,无人机Effect);
//normal effects AddExecutor(ExecutorType.Summon, CardId.工匠无人机);
AddExecutor(ExecutorType.Activate, CardId.MathmechNebla, NeblaEffect); AddExecutor(ExecutorType.Summon, CardId.突击坦克, 突击坦克summon);
AddExecutor(ExecutorType.Activate,CardId.MathmechDivision , divisionEffect); AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor(ExecutorType.Activate,CardId.BalancerLord , active_balancer);
AddExecutor(ExecutorType.Activate, CardId.MathmechSubtra , whom_subtra); AddExecutor(ExecutorType.SummonOrSet, CardId.旗兽, DefaultMonsterSummon);
AddExecutor(ExecutorType.Activate, CardId.MathmechAddition , whom_addition); AddExecutor(ExecutorType.SummonOrSet, CardId.社员, DefaultMonsterSummon);
//spell effects AddExecutor(ExecutorType.MonsterSet, CardId.工匠无人机);
AddExecutor(ExecutorType.Activate, CardId.cynetmining , how_to_cynet_mine); AddExecutor(ExecutorType.MonsterSet, CardId.突击坦克);
AddExecutor(ExecutorType.SpSummon, CardId.MathmechMagma, MagmaSummon); AddExecutor(ExecutorType.MonsterSet, CardId.瞄准鹰);
AddExecutor(ExecutorType.Activate,CardId.MathmechFinalSigma); AddExecutor(ExecutorType.MonsterSet, CardId.双角兽);
AddExecutor(ExecutorType.Activate,CardId.MathmechMagma); AddExecutor(ExecutorType.Activate, CardId.世纪末兽机界, DefaultField);
AddExecutor(ExecutorType.Activate, CardId.兽之拳,兽之拳Effect);
AddExecutor(ExecutorType.Activate, CardId.左迁, 左迁1Effect);
//function AddExecutor(ExecutorType.Activate, CardId.减俸);
AddExecutor(ExecutorType.Activate, CardId.左迁,左迁2Effect);
} AddExecutor(ExecutorType.Activate, CardId.冻结,冻结Effect);
AddExecutor(ExecutorType.Activate, CardId.兽之拳);
public override bool OnSelectHand()
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
AddExecutor(ExecutorType.SpellSet, CardId.铁之重击);
AddExecutor(ExecutorType.SpellSet, CardId.死苏);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
}
private List<int> HintMsgForEnemy = new List<int>
{
HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave, HintMsg.ReturnToHand, HintMsg.ToDeck,
HintMsg.FusionMaterial, HintMsg.SynchroMaterial, HintMsg.XyzMaterial, HintMsg.LinkMaterial, HintMsg.Disable
};
private List<int> HintMsgForMaxSelect = new List<int>
{ {
return false; HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.ToDeck, HintMsg.Destroy
} };
private bool when_cosmic()
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{ {
if (Duel.Phase == DuelPhase.BattleStart)
return null;
if (AI.HaveSelectedCards())
return null;
if (Enemy.GetSpellCount() > 1) IList<ClientCard> selected = new List<ClientCard>();
IList<ClientCard> cards = new List<ClientCard>(_cards);
if (max > cards.Count)
max = cards.Count;
if (HintMsgForEnemy.Contains(hint))
{ {
AI.SelectCard(Util.GetBestEnemySpell()); IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
return true;
} // select enemy's card first
else while (enemyCards.Count > 0 && selected.Count < max)
{ {
return false; ClientCard card = enemyCards[Program.Rand.Next(enemyCards.Count)];
selected.Add(card);
enemyCards.Remove(card);
cards.Remove(card);
} }
} }
private bool divisionEffect()
if (HintMsgForMaxSelect.Contains(hint))
{ {
if (Enemy.GetMonsterCount() > 0) //select max cards
while (selected.Count < max)
{ {
AI.SelectCard(Util.GetBestEnemyMonster(canBeTarget:true,onlyFaceup:true)); ClientCard card = cards[Program.Rand.Next(cards.Count)];
return true; selected.Add(card);
cards.Remove(card);
} }
else
{
return false;
} }
return selected;
} }
private bool when_raigeki() public override bool OnSelectHand()
{
if (Enemy.GetMonsterCount() > 3)
{ {
// go first
return true; return true;
} }
else
bool DoubleTribute = false;
public override void OnNewTurn()
{ {
return false; DoubleTribute = false;
} }
} private bool DefaultDoubleSummon()
private bool whom_addition()
{ {
AI.SelectCard(Util.GetBestBotMonster(onlyATK:true)); if (!DoubleTribute) return false;
else
AI.SelectCard(CardId.双角兽);
DoubleTribute = false;
return true; return true;
} }
private bool 左迁1Effect()
private bool whom_subtra()
{ {
try
if (Enemy.BattlingMonster.Attack > 2000)
{ {
AI.SelectCard(Util.GetBestEnemyMonster(onlyFaceup: true, canBeTarget: true)); AI.SelectCard(Enemy.BattlingMonster);
return true; return true;
} }
catch (Exception e) return false;
}
private bool 左迁2Effect()
{ {
ClientCard target = Util.GetBestEnemyMonster(true, true);
if (target != null)
AI.SelectCard(target);
return true; return true;
} }
} private bool 冻结Effect()
{
private bool active_balancer() foreach (ClientCard monster in Bot.GetMonsters())
{ {
if (Bot.HasInHand(CardId.MathmechNebla)) if (monster.IsFacedown())
{ {
AI.SelectCard(CardId.MathmechNebla); AI.SelectCard(monster);
return true; return true;
} }
else else if (monster.IsDefense())
{ {
AI.SelectCard(monster);
return true; return true;
} }
} }
private bool lightstorm_target() AI.SelectCard(Bot.MonsterZone.GetLowestAttackMonster());
{
if ((Enemy.MonsterZone.ToList().Count > Enemy.SpellZone.ToList().Count ) && Enemy.MonsterZone.ToList().Count>3)
{
AI.SelectPlace(Zones.MonsterZones);
return true; return true;
} }
else private bool 钢机神Effect()
{ {
AI.SelectPlace(Zones.SpellZones); if (Duel.Turn == 1) return false;
else if (Enemy.HasAttackingMonster() || Enemy.GetMonsterCount() < 1)
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.突击坦克, CardId.工匠无人机, CardId.社员, CardId.双角兽, CardId.瞄准鹰);
return true; return true;
} }
private bool 钢机神1Effect()
}
private bool mathmech_equation_target()
{
if (Bot.HasInGraveyard(CardId.MathmechNebla))
{ {
AI.SelectCard(CardId.MathmechNebla); if (!Enemy.HasAttackingMonster() && Enemy.GetMonsterCount() >= 1)
return true;
}
else
{ {
AI.SelectCard((Util.GetBestBotMonster(onlyATK: true))); AI.SelectCard(Bot.Graveyard.GetHighestLevelMonster());
return true; return true;
} }
return false;
} }
private bool 恶德Effect()
private bool foolish_burial_target()
{ {
AI.SelectCard(CardId.MathmechNebla); foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
AI.SelectNextCard(CardId.左迁, CardId.减俸);
AI.SelectNextCard(CardId.左迁, CardId.减俸);
return true; return true;
} }
private bool how_to_cynet_mine() private bool 兽之拳Effect()
{ {
AI.SelectCard(Util.GetWorstBotMonster()); if (Enemy.BattlingMonster.Race == (int)CardRace.Dragon)
if (!Bot.HasInHandOrInMonstersZoneOrInGraveyard(CardId.MathmechSigma))
{
AI.SelectNextCard(CardId.MathmechSigma);
return true; return true;
} if (Enemy.BattlingMonster.Race == (int)CardRace.Fairy)
return true; return true;
if (Enemy.BattlingMonster.Race == (int)CardRace.SpellCaster)
return true;
return false;
} }
private bool when_Mathmechalem()
private bool 死苏effect()
{ {
if (Bot.HasInMonstersZone(CardId.MathmechNebla)){ if (!Util.IsAllEnemyBetter(true))
return false; return false;
} ClientCard selected = Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()).OrderByDescending(card => card.Attack).FirstOrDefault();
else if(Bot.HasInMonstersZone(CardId.MathmechSigma) && Bot.HasInMonstersZone(CardId.Mathmechdouble)) if (selected.Attack >=2400)
{ {
AI.SelectCard(selected);
return true;
}
return false; return false;
} }
else if (Bot.HasInMonstersZone(CardId.Mathmechalem)) private bool 成金恐龙王Summon()
{ {
if (Enemy.GetHandCount() < 1) return true;
return false; return false;
} }
else 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 true;
} }
return false;
} }
private bool FinalSigmaSummon() private bool 死供Eff()
{ {
if (Duel.Turn < 1) 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; return false;
} }
if ((Bot.HasInMonstersZone(CardId.Mathmechdouble) && (( Bot.HasInMonstersZone(CardId.MathmechSigma)) || Bot.HasInMonstersZone(CardId.MathmechNebla)))) private bool 突击坦克Effect()
{ {
AI.SelectPosition(CardPosition.Attack); foreach (ClientCard mon in Enemy.GetMonsters())
try { AI.SelectPlace(Zones.ExtraMonsterZones); } if (mon.Level >= 9)
catch { } AI.SelectCard(mon);
else if (mon.Level >= 8)
AI.SelectCard(mon);
else if (mon.Level >= 6)
AI.SelectCard(mon);
else if (mon.Level >= 4)
AI.SelectCard(mon);
else if (mon.Level >= 2)
AI.SelectCard(mon);
else if (mon.Level >= 1)
AI.SelectCard(mon);
return true; return true;
} }
else private bool 突击坦克summon()
{ {
return true; if (Bot.MonsterZone.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Machine) > 0) == 2) return true;
return false;
} }
} private bool 双角兽summon()
private bool NeblaEffect()
{
bool a = Bot.HasInMonstersZone(CardId.MathmechSubtra) || Bot.HasInMonstersZone(CardId.securitytoken) || Bot.HasInMonstersZone(CardId.MathmechSigma) || Bot.HasInMonstersZone(CardId.MathmechAddition) || Bot.HasInMonstersZone(CardId.Mathmechalem) || Bot.HasInMonstersZone(CardId.MathmechDivision);
if (a)
{
List<int> cards = new List<int>();
cards.Add(CardId.MathmechSigma);
cards.Add(CardId.MathmechSubtra);
cards.Add(CardId.MathmechAddition);
cards.Add(item:CardId.MathmechDivision);
cards.Add(item:CardId.Mathmechalem);
cards.Add(CardId.securitytoken);
int u = 0;
List<ClientCard> monsters = Bot.GetMonstersInMainZone();
for (int i = 0; i < monsters.Count; i++)
{
if (cards.Contains(monsters[i].Id))
{ {
u = monsters[i].Id; if (Bot.Graveyard.GetMatchingCardsCount(card => (card.Race & (int)CardRace.Machine) > 0) >= 3 && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
break; return true;
return false;
} }
else private bool 双角兽Effect()
{ {
u = CardId.securitytoken;
}
}
AI.SelectCard(CardId.securitytoken);
AI.SelectNextCard(CardId.Mathmechdouble);
return true;
if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
}
if (Card.Location == CardLocation.Grave)
{ {
AI.SelectCard(CardId.瞄准鹰, CardId.双角兽, CardId.工匠无人机, CardId.突击坦克, CardId.社员, CardId.旗兽, CardId.恶德, CardId.钢机神, CardId.最强战旗);
DoubleTribute = true;
return true; return true;
} }
else
{
return false; return false;
} }
} private bool 瞄准鹰双角兽summon()
private bool doubleEffect()
{
if (Bot.HasInMonstersZone(CardId.MathmechNebla) || Bot.HasInMonstersZone(CardId.MathmechSigma))
{
return true;
};
if (Card.Location == CardLocation.Grave )
{ {
if (Bot.HasInMonstersZone(CardId.瞄准鹰) && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
return true; return true;
return false;
} }
else private bool 瞄准鹰坦克summon()
{ {
if (Bot.HasInMonstersZone(CardId.瞄准鹰) && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
return true;
return false; return false;
} }
} private bool 瞄准鹰成金恐龙王summon()
private bool mathchalenEffect()
{
if (Duel.Turn < 1)
{ {
if (Bot.HasInMonstersZone(CardId.瞄准鹰) && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
return true;
return false; return false;
} }
if ( (Bot.HasInHandOrInGraveyard(CardId.MathmechNebla) && !Bot.HasInMonstersZone(CardId.MathmechNebla)) && (Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0)) ) private bool 瞄准鹰summon()
{ {
AI.SelectCard(CardId.Mathmechalem); foreach (ClientCard m in Bot.GetMonsters())
AI.SelectNextCard(CardId.MathmechNebla); if (m.HasAttribute(CardAttribute.Light) && m.Level <= 4 && m.IsFaceup())
if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Enemy.MonsterZone.GetMatchingCardsCount(card => card.Level >= 7) > 0)
return true; return true;
return false;
} }
private bool 瞄准鹰summon2()
if (Bot.HasInHandOrInGraveyard(CardId.Mathmechdouble) &&
(Bot.HasInMonstersZone(CardId.MathmechNebla) || Bot.HasInMonstersZone(CardId.MathmechSigma)) &&
Card.Location == CardLocation.FieldZone && Card.HasXyzMaterial(0))
{ {
AI.SelectCard(CardId.Mathmechalem); if (Bot.GetCountCardInZone(Bot.Hand, CardId.瞄准鹰) >= 2 )
AI.SelectNextCard(CardId.Mathmechdouble); if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Enemy.MonsterZone.GetMatchingCardsCount(card => card.Level >= 7) > 0)
return true; return true;
return false;
} }
if (!Bot.HasInHandOrInGraveyard(CardId.MathmechNebla) && Card.HasXyzMaterial(2)) private bool 瞄准鹰summon3()
{ {
AI.SelectCard(CardId.MathmechNebla); if (Bot.HasInHand(CardId.双角兽) || Bot.HasInHand(CardId.突击坦克) || Bot.HasInHand(CardId.成金恐龙王))
AI.SelectThirdCard(CardId.MathmechNebla); if (Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德 }))
if (Enemy.MonsterZone.GetMatchingCardsCount(card => card.Level >= 7) > 0)
return true; return true;
return false;
} }
private bool 瞄准鹰Effect()
{
if (!Bot.HasInHandOrInGraveyard(CardId.MathmechSigma) && Card.HasXyzMaterial(2)) if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level <= 4 && card.IsFaceup()) >= 2 && Bot.HasInHand(new[] { CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员 }))
{ {
AI.SelectCard(CardId.MathmechSigma); AI.SelectCard(CardId.瞄准鹰,CardId.突击坦克, CardId.成金恐龙王, CardId.社员, CardId.旗兽);
AI.SelectThirdCard(CardId.MathmechSigma); AI.SelectNextCard(CardId.瞄准鹰, CardId.突击坦克, CardId.成金恐龙王, CardId.社员, CardId.旗兽);
AI.SelectThirdCard(CardId.最强战旗, CardId.钢机神, CardId.恶德, CardId.旗兽, CardId.社员);
return true; return true;
} }
else
{
return false; return false;
};
} }
private bool 无人机Effect()
{
private bool MagmaSummon() if ((Bot.MonsterZone.GetMatchingCardsCount(card => card.Level < 5)+ Bot.Hand.GetMatchingCardsCount(card => card.Level < 5)) <= 2 )
{ {
if (Bot.HasInMonstersZone(CardId.MathmechNebla)) if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level > 5) > 2)
AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德);
else if (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level > 5) == 1 && (Bot.MonsterZone.GetMatchingCardsCount(card => card.Level < 5) + Bot.Hand.GetMatchingCardsCount(card => card.Level < 5)) == 1)
{ {
return false; AI.SelectCard(CardId.最强战旗, CardId.钢机神, CardId.恶德);
return true;
} }
if (Bot.HasInMonstersZone(CardId.MathmechSigma) && Bot.HasInMonstersZone(CardId.Mathmechdouble))
{
return false; return false;
} }
else else
{ AI.SelectCard(CardId.瞄准鹰, CardId.突击坦克, CardId.工匠无人机, CardId.社员, CardId.旗兽);
return true;
}
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 true;
} }
return false;
} }
private bool 最强战旗Eff()
public override int OnSelectPlace(int cardId, int player, CardLocation location, int available) {
{ if (Util.IsOneEnemyBetterThanValue(2500, false))
if (cardId == CardId.MathmechFinalSigma) {
{ foreach (ClientCard m in Bot.Hand)
if ((Zones.z5 & available) > 0) return Zones.z5; AI.SelectCard(m);
if ((Zones.z6 & available) > 0) return Zones.z6; 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 base.OnSelectPlace(cardId, player, location, available); return false;
} }
} }
} }
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
}, },
{ {
"name": "最强战旗", "name": "最强战旗",
"deck": "SaikyoBattleFlag", "deck": "MathMech",
"dialog": "rd-d", "dialog": "rd-d",
"hidden": true "hidden": true
}, },
{ {
"name": "传说子", "name": "传说子",
"deck": "TheLegend", "deck": "Dragun",
"dialog": "rd", "dialog": "rd",
"hidden": true "hidden": true
} }
......
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