Commit 8db3de36 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:IceYGO/windbot

parents 2967e5b2 c82c7038
#created by ...
#main
71197066
71197066
15397015
15397015
15397015
71564252
71564252
71564252
14558127
14558127
36584821
36584821
36584821
23434538
23434538
63845230
63845230
63845230
18144506
35261759
35261759
35261759
59750328
59750328
70368879
98645731
98645731
98645731
......@@ -30,48 +27,47 @@
10045474
10045474
10813327
15693423
23924608
47475363
47475363
30241314
30241314
36975314
36975314
58921041
58921041
61740673
61936647
69452756
40605147
40605147
77538567
41420027
41420027
77538567
#extra
86221741
31833038
85289965
5043010
30194529
38342335
2857636
24094258
75452921
50588353
3987233
3987233
63288573
98978921
41999284
41999284
41999284
!side
10000080
86937530
71564252
14558127
62015408
23434538
9742784
70368879
19508728
10045474
15693423
24207889
30241314
61740673
61936647
69452756
23002292
41420027
41420027
77538567
......@@ -811,6 +811,8 @@ namespace WindBot.Game.AI.Decks
public bool Hand_act_eff()
{
if (Card.IsCode(CardId.AB_JS) && Util.GetLastChainCard().HasSetcode(0x11e) && Util.GetLastChainCard().Location == CardLocation.Hand) // Danger! archtype hand effect
return false;
if (Card.IsCode(CardId.GO_SR) && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.GO_SR)) return false;
return (Duel.LastChainPlayer == 1);
}
......
......@@ -367,18 +367,19 @@ namespace WindBot.Game.AI.Decks
private bool WindwitchSnowBellsp()
{
if (maxxc_used) return false;
if (Bot.HasInMonstersZone(CardId.WindwitchIceBell) &&
Bot.HasInMonstersZone(CardId.WindwitchGlassBell))
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
}
return false;
}
private bool WindwitchWinterBellsp()
{
if (maxxc_used) return false;
if (Bot.HasInMonstersZone(CardId.WindwitchIceBell) &&
Bot.HasInMonstersZone(CardId.WindwitchGlassBell) &&
Bot.HasInMonstersZone(CardId.WindwitchSnowBell))
......@@ -1622,7 +1623,8 @@ namespace WindBot.Game.AI.Decks
if (Bot.SpellZone[i] != null)
Logger.DebugWriteLine("++++++++SpellZone[" + i + "]= " + Bot.SpellZone[i].Id);
}*/
if (Util.ChainContainsCard(CardId.MaxxC))
maxxc_used = true;
if ((Duel.CurrentChain.Count >= 1 && Util.GetLastChainCard().Id == 0) ||
(Duel.CurrentChain.Count == 2 && !Util.ChainContainPlayer(0) && Duel.CurrentChain[0].Id == 0))
{
......@@ -1638,7 +1640,7 @@ namespace WindBot.Game.AI.Decks
{
Logger.DebugWriteLine("************************last chain card= " + Util.GetLastChainCard().Id);
maxxc_used = true;
}
}
int lockbird_count = 0;
foreach (ClientCard check in Enemy.Graveyard)
{
......
......@@ -11,6 +11,7 @@ namespace WindBot.Game.AI.Decks
{
public class CardId
{
public const int MetalSnake = 71197066;
public const int InspectBoarder = 15397015;
public const int ThunderKingRaiOh = 71564252;
public const int AshBlossomAndJoyousSpring =14558127;
......@@ -32,6 +33,7 @@ namespace WindBot.Game.AI.Decks
public const int HeavyStormDuster = 23924608;
public const int DrowningMirrorForce = 47475363;
public const int MacroCosmos = 30241314;
public const int Crackdown = 36975314;
public const int AntiSpellFragrance = 58921041;
public const int ImperialOrder = 61740673;
public const int PhatomKnightsSword = 61936647;
......@@ -89,9 +91,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, PotOfDesireseff);
AddExecutor(ExecutorType.Activate, CardId.CardOfDemise, CardOfDemiseeff);
//sp
AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp);
AddExecutor(ExecutorType.SpSummon, CardId.KnightmareCerberus,Knightmaresp);
AddExecutor(ExecutorType.SpSummon, CardId.KnightmarePhoenix, Knightmaresp);
AddExecutor(ExecutorType.SpSummon, CardId.MissusRadiant, MissusRadiantsp);
AddExecutor(ExecutorType.Activate, CardId.MissusRadiant, MissusRadianteff);
AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp);
AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider);
AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonsp);
......@@ -104,7 +110,11 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, CardId.ThunderKingRaiOh, ThunderKingRaiOhsummon);
AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonspsecond);
AddExecutor(ExecutorType.SpSummon, CardId.EaterOfMillions, EaterOfMillionssp);
//spell
AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakesp);
AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakeeff);
//spell
AddExecutor(ExecutorType.Activate, CardId.Crackdown, Crackdowneff);
AddExecutor(ExecutorType.Activate, CardId.MoonMirrorShield, MoonMirrorShieldeff);
AddExecutor(ExecutorType.Activate, CardId.Scapegoat, DefaultScapegoat);
AddExecutor(ExecutorType.Activate, CardId.PhatomKnightsSword, PhatomKnightsSwordeff);
......@@ -360,6 +370,13 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool Crackdowneff()
{
if (Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack)
AI.SelectCard(Util.GetOneEnemyBetterThanMyBest(true, true));
return Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack;
}
private bool MoonMirrorShieldeff()
{
if(Card.Location==CardLocation.Hand)
......@@ -430,15 +447,15 @@ namespace WindBot.Game.AI.Decks
private bool BorreloadDragonsp()
{
if (!Bot.HasInMonstersZone(CardId.MissusRadiant)) return false;
if (!(Bot.HasInMonstersZone(CardId.MissusRadiant) || Bot.HasInMonstersZone(new[] { CardId.KnightmareCerberus, CardId.KnightmarePhoenix }))) return false;
IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters())
{
if (monster.IsCode(CardId.MissusRadiant, CardId.LinkSpider, CardId.Linkuriboh))
if (monster.IsCode(CardId.MissusRadiant, CardId.KnightmareCerberus, CardId.KnightmarePhoenix, CardId.LinkSpider, CardId.Linkuriboh))
material_list.Add(monster);
if (material_list.Count == 3) break;
}
if(material_list.Count>=3)
if (material_list.Count >= 3)
{
AI.SelectMaterials(material_list);
return true;
......@@ -447,11 +464,11 @@ namespace WindBot.Game.AI.Decks
}
private bool BorreloadDragonspsecond()
{
if (!Bot.HasInMonstersZone(CardId.MissusRadiant)) return false;
if (!(Bot.HasInMonstersZone(CardId.MissusRadiant) || Bot.HasInMonstersZone(new[] { CardId.KnightmareCerberus,CardId.KnightmarePhoenix }))) return false;
IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters())
{
if (monster.IsCode(CardId.MissusRadiant, CardId.LinkSpider, CardId.Linkuriboh))
if (monster.IsCode(CardId.MissusRadiant, CardId.KnightmareCerberus, CardId.KnightmarePhoenix, CardId.LinkSpider, CardId.Linkuriboh))
material_list.Add(monster);
if (material_list.Count == 3) break;
}
......@@ -548,6 +565,37 @@ namespace WindBot.Game.AI.Decks
return true;
}
private bool MetalSnakesp()
{
if (ActivateDescription == Util.GetStringId(CardId.MetalSnake, 0) && !Bot.HasInMonstersZone(CardId.MetalSnake))
{
if(Duel.Player == 1 && Duel.Phase >= DuelPhase.BattleStart )
return Bot.Deck.Count >= 12;
if(Duel.Player == 0 && Duel.Phase >= DuelPhase.Main1)
return Bot.Deck.Count >= 12;
}
return false;
}
private bool MetalSnakeeff()
{
ClientCard target = Util.GetOneEnemyBetterThanMyBest(true, true);
if (ActivateDescription == Util.GetStringId(CardId.MetalSnake, 1) && target != null)
{
AI.SelectCard(new[]
{
CardId.HeavymetalfoesElectrumite,
CardId.BrandishMaidenKagari,
CardId.CrystronNeedlefiber,
CardId.RaidraptorUltimateFalcon,
CardId.NingirsuTheWorldChaliceWarrior
});
AI.SelectNextCard(target);
return true;
}
return false;
}
private bool MissusRadiantsp()
{
IList<ClientCard> material_list = new List<ClientCard>();
......@@ -574,9 +622,10 @@ namespace WindBot.Game.AI.Decks
}
private bool Linkuribohsp()
{
{
foreach (ClientCard c in Bot.GetMonsters())
{
{
if (!c.IsCode(CardId.EaterOfMillions, CardId.Linkuriboh) && c.Level==1)
{
AI.SelectMaterials(c);
......@@ -586,6 +635,23 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool Knightmaresp()
{
int[] firstMats = new[] {
CardId.KnightmareCerberus,
CardId.KnightmarePhoenix
};
if (Bot.MonsterZone.GetMatchingCardsCount(card => card.IsCode(firstMats)) >= 1)return false;
foreach (ClientCard c in Bot.GetMonsters())
{
if (!c.IsCode(CardId.EaterOfMillions) && c.Level == 1)
{
AI.SelectMaterials(c);
return true;
}
}
return false;
}
private bool Linkuriboheff()
{
if (Duel.LastChainPlayer == 0 && Util.GetLastChainCard().IsCode(CardId.Linkuriboh)) return false;
......
......@@ -642,6 +642,8 @@ namespace WindBot.Game.AI.Decks
public bool Hand_act_eff()
{
if (GraveCall_count > 0 && GraveCall_id == Card.Id) return false;
if (Card.IsCode(CardId.Urara) && Util.GetLastChainCard().HasSetcode(0x11e) && Util.GetLastChainCard().Location == CardLocation.Hand) // Danger! archtype hand effect
return false;
if (Card.IsCode(CardId.Urara) && Bot.HasInHand(CardId.LockBird) && Bot.HasInSpellZone(CardId.Re)) return false;
if (Card.IsCode(CardId.Ghost) && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.Ghost)) return false;
return (Duel.LastChainPlayer == 1);
......
......@@ -402,6 +402,8 @@ namespace WindBot.Game.AI
};
if (Util.GetLastChainCard().IsCode(ignoreList))
return false;
if (Util.GetLastChainCard().HasSetcode(0x11e) && Util.GetLastChainCard().Location == CardLocation.Hand) // Danger! archtype hand effect
return false;
return Duel.LastChainPlayer == 1;
}
/// <summary>
......
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