Commit f368dda6 authored by nanahira's avatar nanahira

side of fp

parent 9d138ca0
...@@ -61,3 +61,18 @@ ...@@ -61,3 +61,18 @@
41999284 41999284
41999284 41999284
!side !side
14558127
23434538
12580477
14532163
14532163
14532163
8267140
8267140
24224830
24224830
65681983
65681983
10045474
10045474
10045474
#created by ...
#main
71197066
15397015
15397015
15397015
4376659
4376659
31764354
31887906
40542826
40542826
68881650
68881650
14558127
14558127
36584821
36584821
18144506
35261759
35261759
49238328
49238328
24224830
24224830
73915051
73915051
62256492
62256492
25704359
25704359
30241314
30241314
36975314
36975314
59305593
59305593
61740673
82732705
82732705
40605147
40605147
41420027
41420027
84749824
84749824
#extra
12014404
31833038
85289965
65330383
38342335
2857636
9839945
30674956
48815792
73309655
97661969
75452921
98978921
41999284
41999284
!side
14558127
23434538
23434538
23434538
12580477
14532163
14532163
14532163
8267140
8267140
65681983
65681983
10045474
10045474
10045474
#created by ...
#main
71197066
15397015
15397015
4376659
4376659
31764354
31887906
40542826
40542826
68881650
68881650
14558127
14558127
14558127
36584821
36584821
23434538
23434538
23434538
14532163
14532163
14532163
18144506
35261759
35261759
49238328
49238328
73915051
73915051
62256492
62256492
10045474
10045474
10045474
25704359
25704359
36975314
36975314
61740673
82732705
82732705
40605147
41420027
41420027
#extra
12014404
31833038
85289965
65330383
38342335
2857636
9839945
30674956
48815792
73309655
97661969
75452921
98978921
41999284
41999284
!side
15397015
12580477
8267140
8267140
24224830
24224830
65681983
65681983
30241314
30241314
59305593
59305593
40605147
84749824
84749824
...@@ -17,23 +17,23 @@ namespace WindBot.Game.AI.Decks ...@@ -17,23 +17,23 @@ namespace WindBot.Game.AI.Decks
public const int InspectBoarder = 15397015; public const int InspectBoarder = 15397015;
public const int AshBlossomAndJoyousSpring = 14558127; public const int AshBlossomAndJoyousSpring = 14558127;
public const int GrenMajuDaEizo = 36584821; public const int GrenMajuDaEizo = 36584821;
public const int MaxxC = 23434538; public const int MaxxC = 23434538;
public const int Aussa = 31887906; public const int Aussa = 31887906;
public const int Eria = 68881650; public const int Eria = 68881650;
public const int Wynn = 31764354; public const int Wynn = 31764354;
public const int Hiita = 4376659; public const int Hiita = 4376659;
public const int Lyna = 40542825; public const int Lyna = 40542825;
public const int Awakening = 62256492; public const int Awakening = 62256492;
public const int Unpossessed = 25704359; public const int Unpossessed = 25704359;
public const int NaturalExterio = 99916754; public const int NaturalExterio = 99916754;
public const int NaturalBeast = 33198837; public const int NaturalBeast = 33198837;
public const int SwordsmanLV7 = 37267041; public const int SwordsmanLV7 = 37267041;
public const int RoyalDecreel = 51452091; public const int RoyalDecreel = 51452091;
public const int HarpieFeatherDuster = 18144506; public const int HarpieFeatherDuster = 18144506;
public const int PotOfDesires = 35261759; public const int PotOfDesires = 35261759;
public const int PotofExtravagance = 49238328; public const int PotofExtravagance = 49238328;
public const int Scapegoat = 73915051; public const int Scapegoat = 73915051;
public const int MacroCosmos = 30241314; public const int MacroCosmos = 30241314;
...@@ -41,32 +41,39 @@ namespace WindBot.Game.AI.Decks ...@@ -41,32 +41,39 @@ namespace WindBot.Game.AI.Decks
public const int ImperialOrder = 61740673; public const int ImperialOrder = 61740673;
public const int SolemnWarning = 84749824; public const int SolemnWarning = 84749824;
public const int SolemStrike = 40605147; public const int SolemStrike = 40605147;
public const int SolemnJudgment = 41420027; public const int SolemnJudgment = 41420027;
public const int SkillDrain = 82732705; public const int SkillDrain = 82732705;
public const int Mistake = 59305593; public const int Mistake = 59305593;
public const int BorreloadDragon = 31833038; public const int BorreloadDragon = 31833038;
public const int BirrelswordDragon = 85289965; public const int BirrelswordDragon = 85289965;
public const int KnightmareGryphon = 65330383; public const int KnightmareGryphon = 65330383;
public const int KnightmareUnicorn = 38342335; public const int KnightmareUnicorn = 38342335;
public const int KnightmarePhoenix = 2857636; public const int KnightmarePhoenix = 2857636;
public const int KnightmareCerberus = 75452921; public const int KnightmareCerberus = 75452921;
public const int LinkSpider = 98978921; public const int LinkSpider = 98978921;
public const int Linkuriboh = 41999284; public const int Linkuriboh = 41999284;
public const int GagagaCowboy = 12014404; public const int GagagaCowboy = 12014404;
public const int AussaP = 97661969; public const int AussaP = 97661969;
public const int EriaP = 73309655; public const int EriaP = 73309655;
public const int WynnP = 30674956; public const int WynnP = 30674956;
public const int HiitaP = 48815792; public const int HiitaP = 48815792;
public const int LynaP = 9839945; public const int LynaP = 9839945;
// side
public const int Raigeki = 12580477;
public const int lightningStorm = 14532163;
public const int CosmicCyclone = 8267140;
public const int CalledByTheGrave = 24224830;
public const int CrossoutDesignator = 65681983;
public const int InfiniteImpermanence = 10045474;
} }
public FamiliarPossessedExecutor(GameAI ai, Duel duel) public FamiliarPossessedExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
// do first // do first
AddExecutor(ExecutorType.Activate, CardId.PotofExtravagance, PotofExtravaganceActivate); AddExecutor(ExecutorType.Activate, CardId.PotofExtravagance, PotofExtravaganceActivate);
// burn if enemy's LP is below 800 // burn if enemy's LP is below 800
AddExecutor(ExecutorType.SpSummon, CardId.GagagaCowboy, GagagaCowboySummon); AddExecutor(ExecutorType.SpSummon, CardId.GagagaCowboy, GagagaCowboySummon);
...@@ -74,19 +81,26 @@ namespace WindBot.Game.AI.Decks ...@@ -74,19 +81,26 @@ namespace WindBot.Game.AI.Decks
//Sticker //Sticker
AddExecutor(ExecutorType.Activate, CardId.MacroCosmos, MacroCosmoseff); AddExecutor(ExecutorType.Activate, CardId.MacroCosmos, MacroCosmoseff);
//counter //counter
AddExecutor(ExecutorType.Activate, CardId.CalledByTheGrave, DefaultCalledByTheGrave);
// AddExecutor(ExecutorType.Activate, CardId.CrossoutDesignator, DefaultCalledByTheGrave);
AddExecutor(ExecutorType.Activate, CardId.InfiniteImpermanence, DefaultInfiniteImpermanence);
AddExecutor(ExecutorType.Activate, CardId.AshBlossomAndJoyousSpring, DefaultAshBlossomAndJoyousSpring); AddExecutor(ExecutorType.Activate, CardId.AshBlossomAndJoyousSpring, DefaultAshBlossomAndJoyousSpring);
AddExecutor(ExecutorType.Activate, CardId.MaxxC, DefaultMaxxC); AddExecutor(ExecutorType.Activate, CardId.MaxxC, DefaultMaxxC);
AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning); AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.SolemStrike, DefaultSolemnStrike); AddExecutor(ExecutorType.Activate, CardId.SolemStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrderfirst); AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrderfirst);
AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrdereff); AddExecutor(ExecutorType.Activate, CardId.ImperialOrder, ImperialOrdereff);
AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment); AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, CardId.SkillDrain, SkillDrainEffect); AddExecutor(ExecutorType.Activate, CardId.SkillDrain, SkillDrainEffect);
AddExecutor(ExecutorType.Activate, CardId.Mistake, DefaultUniqueTrap); AddExecutor(ExecutorType.Activate, CardId.Mistake, DefaultUniqueTrap);
AddExecutor(ExecutorType.Activate, CardId.Awakening); AddExecutor(ExecutorType.Activate, CardId.Awakening);
AddExecutor(ExecutorType.Activate, CardId.Unpossessed, UnpossessedEffect); AddExecutor(ExecutorType.Activate, CardId.Unpossessed, UnpossessedEffect);
//first do //first do
AddExecutor(ExecutorType.Activate, CardId.lightningStorm, DefaultLightingStorm);
AddExecutor(ExecutorType.Activate, CardId.HarpieFeatherDuster, DefaultHarpiesFeatherDusterFirst); AddExecutor(ExecutorType.Activate, CardId.HarpieFeatherDuster, DefaultHarpiesFeatherDusterFirst);
AddExecutor(ExecutorType.Activate, CardId.CosmicCyclone, DefaultMysticalSpaceTyphoon);
AddExecutor(ExecutorType.Activate, CardId.Raigeki, DefaultRaigeki);
AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, PotOfDesireseff); AddExecutor(ExecutorType.Activate, CardId.PotOfDesires, PotOfDesireseff);
//sp //sp
AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff); AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
...@@ -94,31 +108,31 @@ namespace WindBot.Game.AI.Decks ...@@ -94,31 +108,31 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, CardId.KnightmareCerberus, Knightmaresp); AddExecutor(ExecutorType.SpSummon, CardId.KnightmareCerberus, Knightmaresp);
AddExecutor(ExecutorType.SpSummon, CardId.KnightmarePhoenix, Knightmaresp); AddExecutor(ExecutorType.SpSummon, CardId.KnightmarePhoenix, Knightmaresp);
AddExecutor(ExecutorType.SpSummon, CardId.AussaP, AussaPsp); AddExecutor(ExecutorType.SpSummon, CardId.AussaP, AussaPsp);
AddExecutor(ExecutorType.Activate, CardId.AussaP, AussaPeff); AddExecutor(ExecutorType.Activate, CardId.AussaP, AussaPeff);
AddExecutor(ExecutorType.SpSummon, CardId.EriaP, EriaPsp); AddExecutor(ExecutorType.SpSummon, CardId.EriaP, EriaPsp);
AddExecutor(ExecutorType.Activate, CardId.EriaP, EriaPeff); AddExecutor(ExecutorType.Activate, CardId.EriaP, EriaPeff);
AddExecutor(ExecutorType.SpSummon, CardId.WynnP, WynnPsp); AddExecutor(ExecutorType.SpSummon, CardId.WynnP, WynnPsp);
AddExecutor(ExecutorType.Activate, CardId.WynnP, WynnPeff); AddExecutor(ExecutorType.Activate, CardId.WynnP, WynnPeff);
AddExecutor(ExecutorType.SpSummon, CardId.HiitaP, HiitaPsp); AddExecutor(ExecutorType.SpSummon, CardId.HiitaP, HiitaPsp);
AddExecutor(ExecutorType.Activate, CardId.HiitaP, HiitaPeff); AddExecutor(ExecutorType.Activate, CardId.HiitaP, HiitaPeff);
AddExecutor(ExecutorType.SpSummon, CardId.LynaP, LynaPsp); AddExecutor(ExecutorType.SpSummon, CardId.LynaP, LynaPsp);
AddExecutor(ExecutorType.Activate, CardId.LynaP, LynaPeff); AddExecutor(ExecutorType.Activate, CardId.LynaP, LynaPeff);
AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp); AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh, Linkuribohsp);
AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider); AddExecutor(ExecutorType.SpSummon, CardId.LinkSpider);
AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonsp); AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonsp);
AddExecutor(ExecutorType.Activate, CardId.BorreloadDragon, BorreloadDragoneff); AddExecutor(ExecutorType.Activate, CardId.BorreloadDragon, BorreloadDragoneff);
AddExecutor(ExecutorType.SpSummon, CardId.BirrelswordDragon, BirrelswordDragonsp); AddExecutor(ExecutorType.SpSummon, CardId.BirrelswordDragon, BirrelswordDragonsp);
AddExecutor(ExecutorType.Activate, CardId.BirrelswordDragon, BirrelswordDragoneff); AddExecutor(ExecutorType.Activate, CardId.BirrelswordDragon, BirrelswordDragoneff);
// normal summon // normal summon
AddExecutor(ExecutorType.Summon, CardId.InspectBoarder, InspectBoardersummon); AddExecutor(ExecutorType.Summon, CardId.InspectBoarder, InspectBoardersummon);
AddExecutor(ExecutorType.Summon, CardId.GrenMajuDaEizo, GrenMajuDaEizosummon); AddExecutor(ExecutorType.Summon, CardId.GrenMajuDaEizo, GrenMajuDaEizosummon);
AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonspsecond); AddExecutor(ExecutorType.SpSummon, CardId.BorreloadDragon, BorreloadDragonspsecond);
AddExecutor(ExecutorType.Summon, CardId.Aussa, FamiliarPossessedsummon); AddExecutor(ExecutorType.Summon, CardId.Aussa, FamiliarPossessedsummon);
AddExecutor(ExecutorType.Summon, CardId.Eria, FamiliarPossessedsummon); AddExecutor(ExecutorType.Summon, CardId.Eria, FamiliarPossessedsummon);
AddExecutor(ExecutorType.Summon, CardId.Wynn, FamiliarPossessedsummon); AddExecutor(ExecutorType.Summon, CardId.Wynn, FamiliarPossessedsummon);
AddExecutor(ExecutorType.Summon, CardId.Hiita, FamiliarPossessedsummon); AddExecutor(ExecutorType.Summon, CardId.Hiita, FamiliarPossessedsummon);
AddExecutor(ExecutorType.Summon, CardId.Lyna, FamiliarPossessedsummon); AddExecutor(ExecutorType.Summon, CardId.Lyna, FamiliarPossessedsummon);
AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakesp); AddExecutor(ExecutorType.Activate, CardId.MetalSnake, MetalSnakesp);
...@@ -129,8 +143,8 @@ namespace WindBot.Game.AI.Decks ...@@ -129,8 +143,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
//set //set
AddExecutor(ExecutorType.SpellSet, SpellSet); AddExecutor(ExecutorType.SpellSet, SpellSet);
} }
public void SelectSTPlace(ClientCard card = null, bool avoid_Impermanence = false, List<int> avoid_list = null) public void SelectSTPlace(ClientCard card = null, bool avoid_Impermanence = false, List<int> avoid_list = null)
{ {
List<int> list = new List<int> { 0, 1, 2, 3, 4 }; List<int> list = new List<int> { 0, 1, 2, 3, 4 };
...@@ -154,8 +168,8 @@ namespace WindBot.Game.AI.Decks ...@@ -154,8 +168,8 @@ namespace WindBot.Game.AI.Decks
}; };
} }
AI.SelectPlace(0); AI.SelectPlace(0);
} }
public bool SpellNegatable(bool isCounter = false, ClientCard target = null) public bool SpellNegatable(bool isCounter = false, ClientCard target = null)
{ {
// target default set // target default set
...@@ -180,8 +194,8 @@ namespace WindBot.Game.AI.Decks ...@@ -180,8 +194,8 @@ namespace WindBot.Game.AI.Decks
} }
private bool MacroCosmoseff() private bool MacroCosmoseff()
{ {
return (Duel.LastChainPlayer == 1 || Duel.LastSummonPlayer == 1 || Duel.Player == 0) && UniqueFaceupSpell(); return (Duel.LastChainPlayer == 1 || Duel.LastSummonPlayer == 1 || Duel.Player == 0) && UniqueFaceupSpell();
} }
...@@ -208,7 +222,7 @@ namespace WindBot.Game.AI.Decks ...@@ -208,7 +222,7 @@ namespace WindBot.Game.AI.Decks
} }
private bool PotOfDesireseff() private bool PotOfDesireseff()
{ {
return Bot.Deck.Count > 14 && !DefaultSpellWillBeNegated(); return Bot.Deck.Count > 14 && !DefaultSpellWillBeNegated();
} }
...@@ -227,27 +241,27 @@ namespace WindBot.Game.AI.Decks ...@@ -227,27 +241,27 @@ namespace WindBot.Game.AI.Decks
if (Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack) if (Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack)
AI.SelectCard(Util.GetOneEnemyBetterThanMyBest(true, true)); AI.SelectCard(Util.GetOneEnemyBetterThanMyBest(true, true));
return Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack; return Util.GetOneEnemyBetterThanMyBest(true, true) != null && Bot.UnderAttack;
} }
private bool SkillDrainEffect() private bool SkillDrainEffect()
{ {
return (Bot.LifePoints > 1000) && DefaultUniqueTrap(); return (Bot.LifePoints > 1000) && DefaultUniqueTrap();
} }
private bool UnpossessedEffect() private bool UnpossessedEffect()
{ {
AI.SelectCard(new List<int>() { AI.SelectCard(new List<int>() {
CardId.Lyna, CardId.Lyna,
CardId.Hiita, CardId.Hiita,
CardId.Wynn, CardId.Wynn,
CardId.Eria, CardId.Eria,
CardId.Aussa CardId.Aussa
}); });
return true; return true;
} }
private bool InspectBoardersummon() private bool InspectBoardersummon()
{ {
if (Bot.MonsterZone[0] == null) if (Bot.MonsterZone[0] == null)
AI.SelectPlace(Zones.z0); AI.SelectPlace(Zones.z0);
else else
...@@ -257,17 +271,17 @@ namespace WindBot.Game.AI.Decks ...@@ -257,17 +271,17 @@ namespace WindBot.Game.AI.Decks
private bool GrenMajuDaEizosummon() private bool GrenMajuDaEizosummon()
{ {
if (Duel.Turn == 1) return false; if (Duel.Turn == 1) return false;
if (Bot.HasInSpellZone(CardId.SkillDrain) || Enemy.HasInSpellZone(CardId.SkillDrain)) return false; if (Bot.HasInSpellZone(CardId.SkillDrain) || Enemy.HasInSpellZone(CardId.SkillDrain)) return false;
if (Bot.MonsterZone[0] == null) if (Bot.MonsterZone[0] == null)
AI.SelectPlace(Zones.z0); AI.SelectPlace(Zones.z0);
else else
AI.SelectPlace(Zones.z4); AI.SelectPlace(Zones.z4);
return Bot.Banished.Count >= 6; return Bot.Banished.Count >= 6;
} }
private bool FamiliarPossessedsummon() private bool FamiliarPossessedsummon()
{ {
if (Bot.MonsterZone[0] == null) if (Bot.MonsterZone[0] == null)
AI.SelectPlace(Zones.z0); AI.SelectPlace(Zones.z0);
else else
...@@ -330,8 +344,8 @@ namespace WindBot.Game.AI.Decks ...@@ -330,8 +344,8 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
return false; return false;
} }
private bool BirrelswordDragonsp() private bool BirrelswordDragonsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
...@@ -363,7 +377,7 @@ namespace WindBot.Game.AI.Decks ...@@ -363,7 +377,7 @@ namespace WindBot.Game.AI.Decks
private bool BirrelswordDragoneff() private bool BirrelswordDragoneff()
{ {
if (ActivateDescription == Util.GetStringId(CardId.BirrelswordDragon, 0)) if (ActivateDescription == Util.GetStringId(CardId.BirrelswordDragon, 0))
{ {
if (Util.IsChainTarget(Card) && Util.GetBestEnemyMonster(true, true) != null) if (Util.IsChainTarget(Card) && Util.GetBestEnemyMonster(true, true) != null)
{ {
AI.SelectCard(Util.GetBestEnemyMonster(true, true)); AI.SelectCard(Util.GetBestEnemyMonster(true, true));
...@@ -404,7 +418,7 @@ namespace WindBot.Game.AI.Decks ...@@ -404,7 +418,7 @@ namespace WindBot.Game.AI.Decks
return Bot.Deck.Count >= 12; return Bot.Deck.Count >= 12;
if (Duel.Player == 0 && Duel.Phase >= DuelPhase.Main1) if (Duel.Player == 0 && Duel.Phase >= DuelPhase.Main1)
return Bot.Deck.Count >= 12; return Bot.Deck.Count >= 12;
} }
return false; return false;
} }
...@@ -414,22 +428,22 @@ namespace WindBot.Game.AI.Decks ...@@ -414,22 +428,22 @@ namespace WindBot.Game.AI.Decks
if (ActivateDescription == Util.GetStringId(CardId.MetalSnake, 1) && target != null) if (ActivateDescription == Util.GetStringId(CardId.MetalSnake, 1) && target != null)
{ {
AI.SelectCard(new[] AI.SelectCard(new[]
{ {
CardId.LynaP, CardId.LynaP,
CardId.HiitaP, CardId.HiitaP,
CardId.WynnP, CardId.WynnP,
CardId.EriaP, CardId.EriaP,
CardId.KnightmareGryphon CardId.KnightmareGryphon
}); });
AI.SelectNextCard(target); AI.SelectNextCard(target);
return true; return true;
} }
return false; return false;
} }
private bool AussaPsp() private bool AussaPsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters()) foreach (ClientCard monster in Bot.GetMonsters())
{ {
...@@ -451,10 +465,10 @@ namespace WindBot.Game.AI.Decks ...@@ -451,10 +465,10 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(CardId.MaxxC, CardId.Aussa); AI.SelectCard(CardId.MaxxC, CardId.Aussa);
return true; return true;
} }
private bool EriaPsp() private bool EriaPsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters()) foreach (ClientCard monster in Bot.GetMonsters())
{ {
...@@ -476,10 +490,10 @@ namespace WindBot.Game.AI.Decks ...@@ -476,10 +490,10 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(CardId.Eria); AI.SelectCard(CardId.Eria);
return true; return true;
} }
private bool WynnPsp() private bool WynnPsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters()) foreach (ClientCard monster in Bot.GetMonsters())
{ {
...@@ -501,10 +515,10 @@ namespace WindBot.Game.AI.Decks ...@@ -501,10 +515,10 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(CardId.Wynn); AI.SelectCard(CardId.Wynn);
return true; return true;
} }
private bool HiitaPsp() private bool HiitaPsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters()) foreach (ClientCard monster in Bot.GetMonsters())
{ {
...@@ -526,10 +540,10 @@ namespace WindBot.Game.AI.Decks ...@@ -526,10 +540,10 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(CardId.Hiita); AI.SelectCard(CardId.Hiita);
return true; return true;
} }
private bool LynaPsp() private bool LynaPsp()
{ {
IList<ClientCard> material_list = new List<ClientCard>(); IList<ClientCard> material_list = new List<ClientCard>();
foreach (ClientCard monster in Bot.GetMonsters()) foreach (ClientCard monster in Bot.GetMonsters())
{ {
...@@ -551,13 +565,13 @@ namespace WindBot.Game.AI.Decks ...@@ -551,13 +565,13 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(CardId.Lyna); AI.SelectCard(CardId.Lyna);
return true; return true;
} }
private bool Linkuribohsp() private bool Linkuribohsp()
{ {
foreach (ClientCard c in Bot.GetMonsters()) foreach (ClientCard c in Bot.GetMonsters())
{ {
if (c.Level == 1) if (c.Level == 1)
{ {
AI.SelectMaterials(c); AI.SelectMaterials(c);
...@@ -586,10 +600,10 @@ namespace WindBot.Game.AI.Decks ...@@ -586,10 +600,10 @@ namespace WindBot.Game.AI.Decks
} }
private bool Linkuriboheff() private bool Linkuriboheff()
{ {
if (Duel.LastChainPlayer == 0 && Util.GetLastChainCard().IsCode(CardId.Linkuriboh)) return false; if (Duel.LastChainPlayer == 0 && Util.GetLastChainCard().IsCode(CardId.Linkuriboh)) return false;
return true; return true;
} }
private bool GagagaCowboySummon() private bool GagagaCowboySummon()
{ {
if (Enemy.LifePoints <= 800 || (Bot.GetMonsterCount() >= 4 && Enemy.LifePoints <= 1600)) if (Enemy.LifePoints <= 800 || (Bot.GetMonsterCount() >= 4 && Enemy.LifePoints <= 1600))
...@@ -600,16 +614,16 @@ namespace WindBot.Game.AI.Decks ...@@ -600,16 +614,16 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool SpellSet() private bool SpellSet()
{ {
if (Card.IsCode(CardId.MacroCosmos) && Bot.HasInSpellZone(CardId.MacroCosmos)) return false; if (Card.IsCode(CardId.MacroCosmos) && Bot.HasInSpellZone(CardId.MacroCosmos)) return false;
if (Card.IsCode(CardId.Unpossessed) && Bot.HasInSpellZone(CardId.Unpossessed)) return false; if (Card.IsCode(CardId.Unpossessed) && Bot.HasInSpellZone(CardId.Unpossessed)) return false;
if (Card.IsCode(CardId.Crackdown) && Bot.HasInSpellZone(CardId.Crackdown)) return false; if (Card.IsCode(CardId.Crackdown) && Bot.HasInSpellZone(CardId.Crackdown)) return false;
if (Card.IsCode(CardId.SkillDrain) && Bot.HasInSpellZone(CardId.SkillDrain)) return false; if (Card.IsCode(CardId.SkillDrain) && Bot.HasInSpellZone(CardId.SkillDrain)) return false;
if (Card.IsCode(CardId.Mistake) && Bot.HasInSpellZone(CardId.Mistake)) return false; if (Card.IsCode(CardId.Mistake) && Bot.HasInSpellZone(CardId.Mistake)) return false;
if (Card.IsCode(CardId.Scapegoat)) if (Card.IsCode(CardId.Scapegoat))
return true; return true;
if (Card.HasType(CardType.Trap)) if (Card.HasType(CardType.Trap))
return Bot.GetSpellCountWithoutField() < 4; return Bot.GetSpellCountWithoutField() < 4;
return false; return false;
} }
public override ClientCard OnSelectAttacker(IList<ClientCard> attackers, IList<ClientCard> defenders) public override ClientCard OnSelectAttacker(IList<ClientCard> attackers, IList<ClientCard> defenders)
...@@ -624,6 +638,6 @@ namespace WindBot.Game.AI.Decks ...@@ -624,6 +638,6 @@ namespace WindBot.Game.AI.Decks
public override bool OnSelectHand() public override bool OnSelectHand()
{ {
return true; return true;
} }
} }
} }
\ No newline at end of file
...@@ -101,6 +101,8 @@ namespace WindBot.Game.AI ...@@ -101,6 +101,8 @@ namespace WindBot.Game.AI
public const int ImperialOrder = 61740673; public const int ImperialOrder = 61740673;
public const int NaturiaBeast = 33198837; public const int NaturiaBeast = 33198837;
public const int AntiSpellFragrance = 58921041; public const int AntiSpellFragrance = 58921041;
public const int lightningStorm = 14532163;
} }
int HonestEffectCount = 0; int HonestEffectCount = 0;
...@@ -1116,5 +1118,20 @@ namespace WindBot.Game.AI ...@@ -1116,5 +1118,20 @@ namespace WindBot.Game.AI
return false; return false;
} }
protected bool DefaultLightingStorm()
{
if ((Enemy.MonsterZone.ToList().Count > Enemy.SpellZone.ToList().Count ) && Enemy.MonsterZone.ToList().Count>3)
{
AI.SelectPlace(Zones.MonsterZones);
return true;
}
else
{
AI.SelectPlace(Zones.SpellZones);
return true;
}
}
} }
} }
...@@ -153,7 +153,9 @@ namespace WindBot.Game ...@@ -153,7 +153,9 @@ namespace WindBot.Game
private BinaryWriter buildUpdateDeck(Deck targetDeck) { private BinaryWriter buildUpdateDeck(Deck targetDeck) {
BinaryWriter deck = GamePacketFactory.Create(CtosMessage.UpdateDeck); BinaryWriter deck = GamePacketFactory.Create(CtosMessage.UpdateDeck);
deck.Write(targetDeck.Cards.Count + targetDeck.ExtraCards.Count); deck.Write(targetDeck.Cards.Count + targetDeck.ExtraCards.Count);
//Logger.WriteLine("Main + Extra: " + targetDeck.Cards.Count + targetDeck.ExtraCards.Count);
deck.Write(targetDeck.SideCards.Count); deck.Write(targetDeck.SideCards.Count);
//Logger.WriteLine("Side: " + targetDeck.SideCards.Count);
foreach (NamedCard card in targetDeck.Cards) foreach (NamedCard card in targetDeck.Cards)
deck.Write(card.Id); deck.Write(card.Id);
foreach (NamedCard card in targetDeck.ExtraCards) foreach (NamedCard card in targetDeck.ExtraCards)
...@@ -171,18 +173,21 @@ namespace WindBot.Game ...@@ -171,18 +173,21 @@ namespace WindBot.Game
int duel_rule = packet.ReadByte(); int duel_rule = packet.ReadByte();
_ai.Duel.IsNewRule = (duel_rule >= 4); _ai.Duel.IsNewRule = (duel_rule >= 4);
_ai.Duel.IsNewRule2020 = (duel_rule >= 5); _ai.Duel.IsNewRule2020 = (duel_rule >= 5);
BinaryWriter deck = buildUpdateDeck(Deck); BinaryWriter deck = buildUpdateDeck(pickDeckOnResult());
Connection.Send(deck); Connection.Send(deck);
_ai.OnJoinGame(); _ai.OnJoinGame();
} }
private Deck pickDeckOnResult() { private Deck pickDeckOnResult() {
if(lastDuelResult == 0 && DeckForWin != null) { if(lastDuelResult == 0 && DeckForWin != null) {
//Logger.WriteLine("Using deck for win: " + DeckForWin.SideCards[2].Name);
return DeckForWin; return DeckForWin;
} }
if(lastDuelResult == 1 && DeckForLose != null) { if(lastDuelResult == 1 && DeckForLose != null) {
//Logger.WriteLine("Using deck for lose: " + DeckForLose.SideCards[2].Name);
return DeckForLose; return DeckForLose;
} }
//Logger.WriteLine("Using default deck.");
return Deck; return Deck;
} }
...@@ -306,6 +311,7 @@ namespace WindBot.Game ...@@ -306,6 +311,7 @@ namespace WindBot.Game
private void OnErrorMsg(BinaryReader packet) private void OnErrorMsg(BinaryReader packet)
{ {
int msg = packet.ReadByte(); int msg = packet.ReadByte();
Logger.WriteLine("Got error: " + msg);
// align // align
packet.ReadByte(); packet.ReadByte();
packet.ReadByte(); packet.ReadByte();
......
...@@ -156,6 +156,12 @@ ...@@ -156,6 +156,12 @@
<None Include="Decks\*.ydk"> <None Include="Decks\*.ydk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Decks\Win\*.ydk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Decks\Lose\*.ydk">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Dialogs\*.json"> <None Include="Dialogs\*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -171,4 +177,4 @@ ...@@ -171,4 +177,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
\ No newline at end of file
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