Commit fa96dfae authored by nanahira's avatar nanahira

mg

parents 3b92c1dd 42a2cc6b
#created by ...
#main
75498415
75498415
75498415
81105204
81105204
81105204
58820853
58820853
58820853
49003716
49003716
49003716
85215458
85215458
85215458
2009101
2009101
2009101
22835145
22835145
22835145
46710683
46710683
46710683
53129443
5318639
5318639
5318639
91351370
91351370
91351370
44095762
44095762
44095762
59839761
59839761
59839761
70342110
70342110
70342110
#extra
33236860
33236860
33236860
9012916
9012916
9012916
69031175
69031175
69031175
76913983
76913983
76913983
17377751
17377751
17377751
!side
#created by ...
#main
75498415
75498415
75498415
81105204
81105204
81105204
58820853
58820853
58820853
49003716
49003716
49003716
85215458
85215458
85215458
2009101
2009101
2009101
22835145
22835145
22835145
46710683
46710683
46710683
53129443
5318639
5318639
5318639
91351370
91351370
91351370
44095762
44095762
44095762
59839761
59839761
59839761
70342110
70342110
70342110
#extra
33236860
33236860
33236860
9012916
9012916
9012916
69031175
69031175
69031175
76913983
76913983
76913983
17377751
17377751
17377751
!side
#created by ...
#main
89631139
89631139
89631139
38517737
38517737
38517737
45467446
45467446
71039903
71039903
71039903
79814787
79814787
8240199
8240199
8240199
5133471
5133471
6853254
6853254
6853254
18144506
35261759
35261759
38120068
38120068
38120068
39701395
39701395
39701395
41620959
41620959
48800175
48800175
48800175
54447022
83764718
87025064
87025064
87025064
#extra
63422098
40908371
40908371
40908371
59822133
59822133
59822133
58820923
2530830
39030163
31801517
18963306
63767246
63767246
33909817
!side
#created by ...
#main
89631139
89631139
89631139
38517737
38517737
38517737
45467446
45467446
71039903
71039903
71039903
79814787
79814787
8240199
8240199
8240199
5133471
5133471
6853254
6853254
6853254
18144506
35261759
35261759
38120068
38120068
38120068
39701395
39701395
39701395
41620959
41620959
48800175
48800175
48800175
54447022
83764718
87025064
87025064
87025064
#extra
63422098
40908371
40908371
40908371
59822133
59822133
59822133
58820923
2530830
39030163
31801517
18963306
63767246
63767246
33909817
!side
#created by ...
#main
4162088
68774379
70095154
70095154
70095154
59281922
59281922
59281922
3370104
67159705
26439287
26439287
26439287
76986005
23893227
23893227
23893227
3657444
11961740
11961740
24094653
24094653
37630732
37630732
37630732
52875873
52875873
53129443
66607691
95286165
29401950
29401950
44095762
44095762
91989718
92773018
92773018
97077563
97077563
3819470
#extra
1546123
1546123
1546123
74157028
74157028
74157028
10443957
10443957
10443957
58069384
58069384
58069384
!side
#created by ...
#main
4162088
68774379
70095154
70095154
70095154
59281922
59281922
59281922
3370104
67159705
26439287
26439287
26439287
76986005
23893227
23893227
23893227
3657444
11961740
11961740
24094653
24094653
37630732
37630732
37630732
52875873
52875873
53129443
66607691
95286165
29401950
29401950
44095762
44095762
91989718
92773018
92773018
97077563
97077563
3819470
#extra
1546123
1546123
1546123
74157028
74157028
74157028
10443957
10443957
10443957
58069384
58069384
58069384
!side
#created by ...
#main
77542832
77542832
77542832
40921545
79785958
79785958
79785958
59546797
59546797
72429240
4756629
4756629
4756629
8814959
8814959
8814959
85138716
85138716
85138716
23434538
23434538
911883
1475311
1475311
18144506
32807846
8267140
27541267
27541267
26708437
26708437
5851097
35419032
58921041
58921041
40605147
40605147
40605147
41420027
84749824
#extra
88754763
9272381
56832966
86532744
36757171
93568288
21044178
91279700
46772449
82633039
84013237
76067258
359563
91279700
91279700
!side
8233522
8233522
5318639
8267140
12923641
12923641
12923641
18161786
18161786
11109820
11109820
11109820
94192409
94192409
58921041
#created by ...
#main
77542832
77542832
77542832
40921545
79785958
79785958
79785958
59546797
59546797
72429240
4756629
4756629
4756629
8814959
8814959
8814959
85138716
85138716
85138716
23434538
23434538
911883
1475311
1475311
18144506
32807846
8267140
27541267
27541267
26708437
26708437
5851097
35419032
58921041
58921041
40605147
40605147
40605147
41420027
84749824
#extra
88754763
9272381
56832966
86532744
36757171
93568288
21044178
91279700
46772449
82633039
84013237
76067258
359563
91279700
91279700
!side
8233522
8233522
5318639
8267140
12923641
12923641
12923641
18161786
18161786
11109820
11109820
11109820
94192409
94192409
58921041
#created by ...
#main
25524823
36521459
3825890
62473983
17393207
17393207
17393207
25262697
30213599
30213599
30213599
24317029
24317029
24317029
93023479
93023479
93023479
72405967
72405967
5318639
5318639
5318639
14087893
14087893
70000776
70000776
47355498
47355498
47355498
29401950
29401950
30450531
30450531
53582587
53582587
70342110
70342110
84749824
90434657
90434657
#extra
44508094
!side
#created by ...
#main
25524823
36521459
3825890
62473983
17393207
17393207
17393207
25262697
30213599
30213599
30213599
24317029
24317029
24317029
93023479
93023479
93023479
72405967
72405967
5318639
5318639
5318639
14087893
14087893
70000776
70000776
47355498
47355498
47355498
29401950
29401950
30450531
30450531
53582587
53582587
70342110
70342110
84749824
90434657
90434657
#extra
44508094
!side
#created by ...
#main
20056760
20056760
20056760
29834183
29834183
29834183
93445074
93445074
93445074
66451379
66451379
66451379
23434538
23434538
23434538
97268402
97268402
97268402
18144507
33057951
33057951
33057951
53129443
83764718
98645731
98645731
98645731
2759860
2759860
2759860
58120309
75361204
75361204
49966595
49966595
49966595
82732705
82732705
82732705
41420027
#extra
52687916
80666118
39765958
52145422
52145422
70902743
76774528
44508094
83994433
95040215
98012938
88033975
26593852
98558751
78156759
!side
46565218
46565218
46565218
5318639
5318639
5318639
95561280
95561280
95561280
47475363
47475363
47475363
98643358
98643358
98643358
#created by ...
#main
20056760
20056760
20056760
29834183
29834183
29834183
93445074
93445074
93445074
66451379
66451379
66451379
23434538
23434538
23434538
97268402
97268402
97268402
18144507
33057951
33057951
33057951
53129443
83764718
98645731
98645731
98645731
2759860
2759860
2759860
58120309
75361204
75361204
49966595
49966595
49966595
82732705
82732705
82732705
41420027
#extra
52687916
80666118
39765958
52145422
52145422
70902743
76774528
44508094
83994433
95040215
98012938
88033975
26593852
98558751
78156759
!side
46565218
46565218
46565218
5318639
5318639
5318639
95561280
95561280
95561280
47475363
47475363
47475363
98643358
98643358
98643358
#created by ...
#main
77558536
18144506
57774843
57774843
57774843
58996430
58996430
58996430
59019082
77558536
77558536
22624373
22624373
67696066
67696066
67696066
25259669
25259669
25259669
1833916
1833916
73176465
73176465
37742478
37742478
95503687
95503687
95503687
40164421
21502796
67441435
691925
691925
691925
5133471
32807846
73594093
94886282
94886282
94886282
#extra
52687916
80666118
74586817
4779823
37192109
56832966
84013237
82633039
30100551
30100551
30100551
46772449
83531441
1861629
3987233
!side
#created by ...
#main
77558536
18144506
57774843
57774843
57774843
58996430
58996430
58996430
59019082
77558536
77558536
22624373
22624373
67696066
67696066
67696066
25259669
25259669
25259669
1833916
1833916
73176465
73176465
37742478
37742478
95503687
95503687
95503687
40164421
21502796
67441435
691925
691925
691925
5133471
32807846
73594093
94886282
94886282
94886282
#extra
52687916
80666118
74586817
4779823
37192109
56832966
84013237
82633039
30100551
30100551
30100551
46772449
83531441
1861629
3987233
!side
#created by ...
#main
18940556
18940556
18940556
93332803
93332803
55063751
28674152
41782653
41782653
41782653
3717252
3717252
80280944
48048590
77723643
55623480
30328508
30328508
44335251
77558536
77558536
77558536
95503687
95503687
4939890
4939890
14558127
14558127
59438930
37445295
37445295
23434538
23434538
33420078
67441435
1475311
1475311
1475311
11110587
11110587
11110587
18144506
38179121
38179121
38179121
44394295
44394295
44394295
67169062
81439173
83764718
94886282
94886282
99330325
10045474
10045474
74003290
77505534
4904633
#extra
74822425
20366274
48424886
94977269
50954680
80666118
4779823
33698022
76547525
42566602
98558751
30100551
74997493
50588353
50588353
!side
#created by ...
#main
52738610
52738610
52738610
23401839
23401839
23401839
95492061
95492061
95492061
30312361
90307777
88240999
88240999
52068432
52068432
52068432
74122412
74122412
26674724
89463537
99185129
99185129
99185129
32807846
53129443
96729612
96729612
14735698
14735698
14735698
51124303
51124303
51124303
97211663
5318639
5318639
5318639
51452091
51452091
51452091
#extra
35952884
35952884
41517789
41517789
24696097
24696097
52687916
74586817
37192109
42566602
90953320
79606837
79606837
79606837
46772449
!side
#created by ...
#main
52738610
52738610
52738610
23401839
23401839
23401839
95492061
95492061
95492061
30312361
90307777
88240999
88240999
52068432
52068432
52068432
74122412
74122412
26674724
89463537
99185129
99185129
99185129
32807846
53129443
96729612
96729612
14735698
14735698
14735698
51124303
51124303
51124303
97211663
5318639
5318639
5318639
51452091
51452091
51452091
#extra
35952884
35952884
41517789
41517789
24696097
24696097
52687916
74586817
37192109
42566602
90953320
79606837
79606837
79606837
46772449
!side
#created by ...
#main
18108166
18108166
18108166
74852097
74852097
74852097
81823360
81823360
81823360
75195825
75195825
75195825
87979586
87979586
87979586
33256280
33256280
33256280
85138716
85138716
85138716
911883
911883
911883
18144506
35261759
35261759
35261759
97169186
97169186
97169186
5650082
20522190
29401950
29616929
40838625
44095762
47475363
58120309
75249652
#extra
80666118
18239909
44508094
56832966
37279508
84013237
74294676
82697249
82633039
61344030
22653490
46772449
12014404
359563
6511113
!side
#created by ...
#main
18108166
18108166
18108166
74852097
74852097
74852097
81823360
81823360
81823360
75195825
75195825
75195825
87979586
87979586
87979586
33256280
33256280
33256280
85138716
85138716
85138716
911883
911883
911883
18144506
35261759
35261759
35261759
97169186
97169186
97169186
5650082
20522190
29401950
29616929
40838625
44095762
47475363
58120309
75249652
#extra
80666118
18239909
44508094
56832966
37279508
84013237
74294676
82697249
82633039
61344030
22653490
46772449
12014404
359563
6511113
!side
#created by ...
#main
23950192
23950192
90311614
90311614
90311614
9126351
9126351
9126351
50088247
50088247
50088247
1357146
1357146
1357146
46239604
46239604
46239604
80250319
80250319
80250319
5133471
5133471
5133471
18144506
33057951
33057951
33057951
53129443
72892473
81439173
83764718
84206435
84206435
84206435
96947648
96947648
96947648
29047353
29047353
29047353
#extra
79606837
79606837
79606837
90809975
90809975
90809975
36776089
36776089
36776089
2766877
2766877
2766877
84224627
84224627
84224627
!side
#created by ...
#main
23950192
23950192
90311614
90311614
90311614
9126351
9126351
9126351
50088247
50088247
50088247
1357146
1357146
1357146
46239604
46239604
46239604
80250319
80250319
80250319
5133471
5133471
5133471
18144506
33057951
33057951
33057951
53129443
72892473
81439173
83764718
84206435
84206435
84206435
96947648
96947648
96947648
29047353
29047353
29047353
#extra
79606837
79606837
79606837
90809975
90809975
90809975
36776089
36776089
36776089
2766877
2766877
2766877
84224627
84224627
84224627
!side
......@@ -2,7 +2,6 @@
#main
98169343
98169343
9929398
61283655
61283655
61283655
......@@ -11,20 +10,21 @@
35199656
14558127
14558127
14558127
59438930
59438930
98700941
23434538
23434538
23434538
67441435
94145021
63845230
63845230
63845230
18144506
35261759
35261759
53129443
53129443
53129443
73628505
73915051
73915051
......@@ -42,18 +42,18 @@
84749824
#extra
41999284
3987233
41999284
3987233
2857636
50588353
98558751
74997493
2857636
38342335
99111753
86221741
31833038
3987233
99111753
38342335
50588353
41999284
9753964
41999284
34408491
!side
#created by ...
#main
92246806
92246806
92246806
65247798
65247798
65247798
28630501
28630501
28630501
25244515
25244515
18144507
53129443
59750328
59750328
98645731
98645731
98645731
8267140
8267140
8267140
40838625
40838625
47475363
47475363
47475363
58120309
58120309
58120309
5851097
30241314
30241314
30241314
40605147
40605147
41420027
59344077
59344077
59344077
84749824
#extra
44508094
56832966
86532744
16195942
84013237
94380860
96381979
63746411
82633039
95169481
22653490
46772449
21044178
12014404
12014404
!side
#created by ...
#main
92246806
92246806
92246806
65247798
65247798
65247798
28630501
28630501
28630501
25244515
25244515
18144507
53129443
59750328
59750328
98645731
98645731
98645731
8267140
8267140
8267140
40838625
40838625
47475363
47475363
47475363
58120309
58120309
58120309
5851097
30241314
30241314
30241314
40605147
40605147
41420027
59344077
59344077
59344077
84749824
#extra
44508094
56832966
86532744
16195942
84013237
94380860
96381979
63746411
82633039
95169481
22653490
46772449
21044178
12014404
12014404
!side
{
"welcome": [
"真難得有人發現這個。",
"真沒想到你能跟我對戰呢!決鬥者。不過也就到此為止了,接下來由我V.F.D(非常友善的決鬥者)來做你的對手。"
],
"deckerror": [
"阿,可能BA又把CBD修壞導致{0}消失了。"
],
"duelstart": [
"這只是AI,打贏不要太高興阿。",
"十分致謝233服讓我們有遊戲可以玩,別忘記去拜訪他們。",
"反主流學院請洽NOVA。",
"Wryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy."
],
"newturn": [
"到我的回合了,抽牌!",
"我的回合,抽牌!",
"我抽了一張卡。"
],
"endturn": [
"回合结束。",
"我的回合结束了。",
"這樣算是成功的展開嗎......",
"輪到你了。你的下一句是......我要發動灰流麗對吧!"
],
"directattack": [
"{0},直接攻擊!",
"{0},直接攻擊對手!",
"{0},没有防守的地方,攻擊!",
"{0},攻擊對手的生命值!",
"{0},直接攻擊對手的生命值!",
"{0},通過直接攻擊打倒對手!",
"{0},使用直接攻擊打倒對手!",
"{0},直接攻擊釋放你的力量吧!",
"我的{0}將會粉碎你的生命值!",
"向對手展示你的力量吧,{0}!",
"你已經無法阻止我了。{0},攻擊!"
],
"attack": [
"{0},攻擊這體{1}!",
"{0},消滅這體{1}!",
"{0},打倒{1}!",
"{0},衝向那體{1}!",
"{0},把你的力量释放到{1}上吧!"
],
"ondirectattack": [
"可惡......",
"不過是{0}而已!",
"果然我還是太弱了......"
],
"facedownmonstername": "怪獸",
"activate": [
"我發動{0}。",
"我使用{0}的效果。",
"我使用{0}的力量。"
],
"summon": [
"真是HIGH的最高點!出來吧{0}。",
"出來吧,{0}!",
"出現吧,{0}!",
"我召喚了強大的{0}!",
"我呼喚{0}參加戰鬥!",
"我呼喚出{0}。",
"我召喚{0}。"
],
"setmonster": [
"我放置了一體怪獸。",
"我裡側表示放置了一體怪獸。"
],
"chaining": [
"看這裡!發動{0}!",
"我使用{0}的力量。",
"很不錯的戰術...但是我拒絕!{0}!",
"真不愧是納粹,竟然能識破我的蓋牌......你說你只是單純的決鬥者?{0},發動!",
"看樣子你忘了我的{0}!",
"你考慮過我有{0}嗎?"
]
}
{
"welcome": [
"你找到我了!!!",
"來決鬥吧"
],
"deckerror": [
"阿,可能BA又把CBD修壞導致{0}消失了。"
],
"duelstart": [
"這只是AI,打贏不要太高興阿。",
"十分致謝233服讓我們有遊戲可以玩,別忘記去拜訪他們。",
"反主流學院請洽NOVA。"
],
"newturn": [
"到我的回合了,抽牌!",
"我的回合,抽牌!",
"我抽了一張卡。"
],
"endturn": [
"回合结束。",
"我的回合结束了。",
"這樣算是成功的展開嗎......",
"輪到你了。你的下一句是......我要發動灰流麗對吧!"
],
"directattack": [
"{0},直接攻擊!",
"{0},直接攻擊對手!",
"{0},没有防守的地方,攻擊!",
"{0},攻擊對手的生命值!",
"{0},直接攻擊對手的生命值!",
"{0},通過直接攻擊打倒對手!",
"{0},使用直接攻擊打倒對手!",
"{0},直接攻擊釋放你的力量吧!",
"我的{0}將會粉碎你的生命值!",
"向對手展示你的力量吧,{0}!",
"你已經無法阻止我了。{0},攻擊!"
],
"attack": [
"{0},攻擊這體{1}!",
"{0},消滅這體{1}!",
"{0},打倒{1}!",
"{0},衝向那體{1}!",
"{0},把你的力量释放到{1}上吧!"
],
"ondirectattack": [
"可惡......",
"不過是{0}而已!",
"果然我還是太弱了......"
],
"facedownmonstername": "怪獸",
"activate": [
"我發動{0}。",
"我使用{0}的效果。",
"我使用{0}的力量。"
],
"summon": [
"真是HIGH的最高點!出來吧{0}。",
"出來吧,{0}!",
"出現吧,{0}!",
"我召喚了強大的{0}!",
"我呼喚{0}參加戰鬥!",
"我呼喚出{0}。",
"我召喚{0}。"
],
"setmonster": [
"我放置了一體怪獸。",
"我裡側表示放置了一體怪獸。"
],
"chaining": [
"看這裡!發動{0}!",
"我使用{0}的力量。",
"很不錯的戰術...但是我拒絕!{0}!",
"看樣子你忘了我的{0}!",
"你考慮過我有{0}嗎?"
]
}
......@@ -296,6 +296,44 @@ namespace WindBot.Game.AI
return Duel.ChainTargets.Count == 1 && card.Equals(Duel.ChainTargets[0]);
}
public bool ChainContainsCard(int id)
{
foreach (ClientCard card in Duel.CurrentChain)
{
if (card.Id == id)
return true;
}
return false;
}
public int ChainCountPlayer(int player)
{
int count = 0;
foreach (ClientCard card in Duel.CurrentChain)
{
if (card.Controller == player)
count++;
}
return count;
}
public bool HasChainedTrap(int player)
{
foreach (ClientCard card in Duel.CurrentChain)
{
if (card.Controller == player && card.HasType(CardType.Trap))
return true;
}
return false;
}
public ClientCard GetLastChainCard()
{
if (Duel.CurrentChain.Count > 0)
return Duel.CurrentChain[Duel.CurrentChain.Count - 1];
return null;
}
/// <summary>
/// Select cards listed in preferred.
/// </summary>
......
This diff is collapsed.
This diff is collapsed.
......@@ -90,7 +90,7 @@ namespace WindBot.Game.AI.Decks
private bool SupremacyBerry()
{
return Duel.LifePoints[0] < Duel.LifePoints[1];
return Bot.LifePoints < Enemy.LifePoints;
}
private bool PoisonOfTheOldMan()
......
This diff is collapsed.
......@@ -399,7 +399,7 @@ namespace WindBot.Game.AI.Decks
private bool CrystalWingSynchroDragonEffect()
{
return LastChainPlayer != 0;
return Duel.LastChainPlayer != 0;
}
private bool DragunityPhalanxSummon()
......
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
// NOT FINISHED YET
[Deck("Evilswarm", "AI_Evilswarm", "NotFinished")]
public class EvilswarmExecutor : DefaultExecutor
{
public class CardId
{
public const int DarkHole = 53129443;
public const int CosmicCyclone = 8267140;
public const int InfestationPandemic = 27541267;
public const int SolemnJudgment = 41420027;
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
}
public EvilswarmExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.DarkHole, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, CardId.CosmicCyclone, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.SpellSet, CardId.InfestationPandemic);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Summon);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
// will be added soon...?
}
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
// NOT FINISHED YET
[Deck("Evilswarm", "AI_Evilswarm", "NotFinished")]
public class EvilswarmExecutor : DefaultExecutor
{
public class CardId
{
public const int DarkHole = 53129443;
public const int CosmicCyclone = 8267140;
public const int InfestationPandemic = 27541267;
public const int SolemnJudgment = 41420027;
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
}
public EvilswarmExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.DarkHole, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, CardId.CosmicCyclone, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.SpellSet, CardId.InfestationPandemic);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.Summon);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
// will be added soon...?
}
}
\ No newline at end of file
This diff is collapsed.
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
// NOT FINISHED YET
[Deck("Graydle", "AI_Graydle", "NotFinished")]
public class GraydleExecutor : DefaultExecutor
{
public class CardId
{
public const int DarkHole = 53129443;
public const int CosmicCyclone = 8267140;
public const int SolemnJudgment = 41420027;
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
}
public GraydleExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.DarkHole, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, CardId.CosmicCyclone, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.MonsterSet);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
// will be added soon...?
}
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
// NOT FINISHED YET
[Deck("Graydle", "AI_Graydle", "NotFinished")]
public class GraydleExecutor : DefaultExecutor
{
public class CardId
{
public const int DarkHole = 53129443;
public const int CosmicCyclone = 8267140;
public const int SolemnJudgment = 41420027;
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
}
public GraydleExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.DarkHole, DefaultDarkHole);
AddExecutor(ExecutorType.Activate, CardId.CosmicCyclone, DefaultCosmicCyclone);
AddExecutor(ExecutorType.Activate, CardId.SolemnJudgment, DefaultSolemnJudgment);
AddExecutor(ExecutorType.Activate, CardId.SolemnWarning, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.SolemnStrike, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.MonsterSet);
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
// will be added soon...?
}
}
\ No newline at end of file
......@@ -162,7 +162,7 @@ namespace WindBot.Game.AI.Decks
private bool HorusTheBlackFlameDragonLv8()
{
return LastChainPlayer == 1;
return Duel.LastChainPlayer == 1;
}
private bool DragonsRebirth()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -161,7 +161,7 @@ namespace WindBot.Game.AI.Decks
private bool SkillDrainEffect()
{
return (Duel.LifePoints[0] > 1000) && DefaultUniqueTrap();
return (Bot.LifePoints > 1000) && DefaultUniqueTrap();
}
private bool PotOfDualityEffect()
......@@ -191,7 +191,7 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool TrapSetUnique()
{
foreach (ClientCard card in Bot.GetSpells())
......@@ -315,7 +315,7 @@ namespace WindBot.Game.AI.Decks
{
AI.SelectCard(HighScaleCards);
}
return Duel.LifePoints[0] > 800;
return Bot.LifePoints > 800;
}
private bool StealthEffect()
......
......@@ -107,7 +107,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning, DefaultNumberS39UtopiaTheLightningEffect);
AddExecutor(ExecutorType.SpSummon, CardId.StardustDragon, DefaultStardustDragonSummon);
AddExecutor(ExecutorType.Activate, CardId.StardustDragon, DefaultStardustDragonEffect);
......@@ -267,7 +267,7 @@ namespace WindBot.Game.AI.Decks
private bool GagagaCowboySummon()
{
if (Duel.LifePoints[1] <= 800)
if (Enemy.LifePoints <= 800)
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
......
......@@ -262,9 +262,9 @@ namespace WindBot.Game.AI.Decks
private bool CyberDragonInfinityEffect()
{
if (CurrentChain.Count > 0)
if (Duel.CurrentChain.Count > 0)
{
return LastChainPlayer == 1;
return Duel.LastChainPlayer == 1;
}
else
{
......
......@@ -117,7 +117,7 @@ namespace WindBot.Game.AI.Decks
if (!defender.IsMonsterHasPreventActivationEffectInBattle())
{
if (attacker.Id == CardId.SkyCavalryCentaurea && !attacker.IsDisabled() && attacker.HasXyzMaterial())
attacker.RealPower = Duel.LifePoints[0] + attacker.Attack;
attacker.RealPower = Bot.LifePoints + attacker.Attack;
}
return base.OnPreBattleBetween(attacker, defender);
}
......@@ -302,7 +302,7 @@ namespace WindBot.Game.AI.Decks
private bool ToadallyAwesomeEffect()
{
if (CurrentChain.Count > 0)
if (Duel.CurrentChain.Count > 0)
{
// negate effect, select a cost for it
List<ClientCard> monsters = Bot.GetMonsters();
......@@ -506,7 +506,7 @@ namespace WindBot.Game.AI.Decks
{
defence += monster.GetDefensePower();
}
if (attack - 2000 - defence > Duel.LifePoints[1] && !AI.Utils.IsOneEnemyBetter(true))
if (attack - 2000 - defence > Enemy.LifePoints && !AI.Utils.IsOneEnemyBetter(true))
return true;
}
return false;
......
This diff is collapsed.
......@@ -129,7 +129,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, CardId.NumberS39UtopiaOne);
AddExecutor(ExecutorType.SpSummon, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning, DefaultNumberS39UtopiaTheLightningEffect);
AddExecutor(ExecutorType.Activate, CardId.StardustDragon, DefaultStardustDragonEffect);
......@@ -291,7 +291,7 @@ namespace WindBot.Game.AI.Decks
private bool GagagaCowboySummon()
{
if (Duel.LifePoints[1] <= 800 || (Bot.GetMonsterCount()>=4 && Duel.LifePoints[1] <= 1600))
if (Enemy.LifePoints <= 800 || (Bot.GetMonsterCount()>=4 && Enemy.LifePoints <= 1600))
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
......
......@@ -72,7 +72,7 @@ namespace WindBot.Game.AI.Decks
// XYZ effects
AddExecutor(ExecutorType.Activate, CardId.Number39Utopia, Number39Utopia);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiaOne);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning, NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning, DefaultNumberS39UtopiaTheLightningEffect);
AddExecutor(ExecutorType.Activate, CardId.ZwLionArms, ZwLionArms);
AddExecutor(ExecutorType.Activate, CardId.AdreusKeeperOfArmageddon);
AddExecutor(ExecutorType.Activate, CardId.Number61Volcasaurus);
......@@ -105,7 +105,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.TinGoldfish, GoblindberghEffect);
AddExecutor(ExecutorType.Activate, CardId.Kagetokage);
AddExecutor(ExecutorType.Activate, CardId.SummonerMonk, SummonerMonkEffect);
AddExecutor(ExecutorType.Activate, CardId.Honest, Honest);
AddExecutor(ExecutorType.Activate, CardId.Honest, DefaultHonestEffect);
// Reposition
AddExecutor(ExecutorType.Repos, MonsterRepos);
......@@ -150,7 +150,7 @@ namespace WindBot.Game.AI.Decks
private bool Number39Utopia()
{
if (!HasChainedTrap(0) && Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && Card.HasXyzMaterial(2))
if (!AI.Utils.HasChainedTrap(0) && Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && Card.HasXyzMaterial(2))
return true;
return false;
}
......@@ -184,7 +184,7 @@ namespace WindBot.Game.AI.Decks
private bool InstantFusion()
{
if (Duel.LifePoints[0] <= 1000)
if (Bot.LifePoints <= 1000)
return false;
int count4 = 0;
int count5 = 0;
......@@ -210,17 +210,7 @@ namespace WindBot.Game.AI.Decks
private bool XyzChangeTactics()
{
return Duel.LifePoints[0] > 500;
}
private bool NumberS39UtopiatheLightning()
{
return Card.Attack < 5000;
}
private bool Honest()
{
return Duel.Phase != DuelPhase.Main1 || Duel.Turn == 1;
return Bot.LifePoints > 500;
}
private bool GoblindberghFirst()
......
......@@ -73,7 +73,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, CardId.NumberS39UtopiatheLightning, DefaultNumberS39UtopiaTheLightningEffect);
AddExecutor(ExecutorType.Activate, CardId.InvokedMechaba, DefaultTrap);
......@@ -486,7 +486,7 @@ namespace WindBot.Game.AI.Decks
private bool DridentEffect()
{
if (LastChainPlayer == 0)
if (Duel.LastChainPlayer == 0)
return false;
ClientCard target = AI.Utils.GetBestEnemyCard(true);
if (target == null)
......@@ -571,7 +571,7 @@ namespace WindBot.Game.AI.Decks
private bool ZoodiacComboEffect()
{
if (CurrentChain.Count > 0)
if (Duel.CurrentChain.Count > 0)
return false;
if (Card.Location != CardLocation.Grave)
{
......
This diff is collapsed.
......@@ -14,6 +14,7 @@
MetaionTheTimelord = 74530899,
KamionTheTimelord = 91712985,
LazionTheTimelord = 92435533,
EaterOfMillions = 63845230
}
EaterOfMillions = 63845230,
ElShaddollConstruct = 20366274,
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -36,6 +36,7 @@ namespace WindBot.Game
public bool CanDirectAttack { get; set; }
public bool ShouldDirectAttack { get; set; }
public bool Attacked { get; set; }
public bool IsLastAttacker { get; set; }
public int[] ActionIndex { get; set; }
public IDictionary<int, int> ActionActivateIndex { get; private set; }
......
......@@ -13,6 +13,9 @@ namespace WindBot.Game
public IList<ClientCard> Deck { get; private set; }
public IList<ClientCard> ExtraDeck { get; private set; }
public int LifePoints;
public ClientCard BattlingMonster;
public ClientField()
{
}
......@@ -33,6 +36,15 @@ namespace WindBot.Game
ExtraDeck.Add(new ClientCard(0, CardLocation.Extra));
}
public int GetMonstersExtraZoneCount()
{
int count = 0;
if (MonsterZone[5] != null)
count++;
if (MonsterZone[6] != null)
count++;
return count;
}
public int GetMonsterCount()
{
return GetCount(MonsterZone);
......@@ -58,6 +70,19 @@ namespace WindBot.Game
}
return count;
}
public int GetFieldCount()
{
return GetSpellCount() + GetMonsterCount();
}
public int GetFieldHandCount()
{
return GetSpellCount() + GetMonsterCount() + GetHandCount();
}
public bool IsFieldEmpty()
{
......@@ -68,6 +93,7 @@ namespace WindBot.Game
{
return GetCards(MonsterZone);
}
public List<ClientCard> GetGraveyardMonsters()
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -79,6 +79,7 @@
<Compile Include="Game\AI\Decks\EvilswarmExecutor.cs" />
<Compile Include="Game\AI\Decks\GraydleExecutor.cs" />
<Compile Include="Game\AI\Decks\LightswornExecutor.cs" />
<Compile Include="Game\AI\Decks\LightswornShaddoldinosourExecutor.cs" />
<Compile Include="Game\AI\Decks\QliphortExecutor.cs" />
<Compile Include="Game\AI\Decks\ST1732Executor.cs" />
<Compile Include="Game\AI\Decks\TrickstarExecutor.cs" />
......
This diff is collapsed.
This diff is collapsed.
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