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

重命名

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