Skip to content

Commit

Permalink
Merge pull request #16 from IceYGO/master
Browse files Browse the repository at this point in the history
8-21
  • Loading branch information
OhnkytaBlabdey authored Aug 21, 2018
2 parents 8f4fe58 + 54bfe97 commit 4e71025
Show file tree
Hide file tree
Showing 19 changed files with 5,261 additions and 12 deletions.
61 changes: 61 additions & 0 deletions Decks/AI_Altergeist.ydk
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#created by ...
#main
52927340
53143898
53143898
53143898
42790071
42790071
42790071
14558127
14558127
59438930
62015408
62015408
89538537
89538537
23434538
23434538
23434538
25533642
25533642
25533642
2295440
18144506
35261759
68462976
68462976
10045474
10045474
10045474
10813327
23924608
35146019
35146019
27541563
27541563
53936268
53936268
53936268
61740673
40605147
40605147
41420027
41420027
#extra
99916754
86221741
85289965
5043010
49725936
24094258
59934749
1508649
1508649
1508649
50588353
63288573
90673288
41999284
94259633
!side
73 changes: 73 additions & 0 deletions Decks/AI_BlueEyesMaxDragon.ydk
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#created by ...
#main
89631139
55410871
89631139
80701178
31036355
38517737
80701178
80701178
95492061
95492061
95492061
53303460
53303460
53303460
14558127
14558127
23434538
55410871
55410871
31036355
31036355
48800175
48800175
48800175
70368879
70368879
70368879
21082832
46052429
46052429
46052429
24224830
24224830
24224830
73915051
10045474
10045474
37576645
37576645
37576645
#extra
31833038
85289965
74997493
5043010
65330383
38342335
2857636
28776350
75452921
3987233
3987233
99111753
98978921
41999284
41999284
!side
75732622
15397015
15397015
73642296
23434538
5821478
77058170
3679218
25774450
43898403
23002292
23002292
84749824
84749824
80 changes: 80 additions & 0 deletions Decks/AI_GrenMajuThunderBoarder.ydk
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#created by ...
#main
15397015
15397015
15397015
71564252
71564252
71564252
36584821
36584821
36584821
23434538
23434538
63845230
63845230
63845230
18144506
35261759
35261759
35261759
59750328
59750328
70368879
70368879
70368879
98645731
98645731
98645731
73915051
73915051
10045474
10045474
10045474
10813327
15693423
23924608
30241314
30241314
58921041
58921041
61740673
69452756
40605147
40605147
77538567
77538567
84749824
84749824
#extra
86221741
31833038
85289965
5043010
30194529
38342335
2857636
24094258
50588353
3987233
3987233
63288573
98978921
41999284
41999284
!side
10000080
86937530
14558127
62015408
9742784
67441435
72529749
43898403
19508728
15693423
24207889
69452756
23002292
41420027
41420027
65 changes: 65 additions & 0 deletions Decks/AI_Phantasm.ydk
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#created by ...
#main
81823360
81823360
81823360
14558127
14558127
63845230
18144506
35261759
35261759
47325505
47325505
59750328
59750328
59750328
73628505
98645731
98645731
98645731
73915051
73915051
2819435
2819435
2819435
10045474
34302287
34302287
34302287
47475363
58120309
61397885
61397885
89208725
89208725
19089195
19089195
19089195
53334471
53334471
82732705
99188141
#extra
44508094
5821478
31833038
85289965
65330383
72529749
61665245
38342335
2857636
75452921
50588353
3987233
98978921
41999284
41999284
!side
24094258
47475363
61397885
30241314
30241314
82732705
13 changes: 13 additions & 0 deletions Game/AI/AIFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ public static int CompareDefensePower(ClientCard cardA, ClientCard cardB)
return 1;
}

/// <summary>
/// Get the total ATK Monster of the player.
/// </summary>
public int GetTotalAttackingMonsterAttack(int player)
{
int atk = 0;
foreach (ClientCard m in Duel.Fields[player].GetMonsters())
{
if (m.IsAttack())
atk += m.Attack;
}
return atk;
}
/// <summary>
/// Get the best ATK or DEF power of the field.
/// </summary>
Expand Down
10 changes: 10 additions & 0 deletions Game/AI/CardContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ public static ClientCard GetFloodgate(this IEnumerable<ClientCard> cards, bool c
return null;
}

public static ClientCard GetShouldBeDisabledBeforeItUseEffectMonster(this IEnumerable<ClientCard> cards)
{
foreach (ClientCard card in cards)
{
if (card != null && card.IsMonsterShouldBeDisabledBeforeItUseEffect() && card.IsFaceup())
return card;
}
return null;
}

public static IEnumerable<IEnumerable<T>> GetCombinations<T>(this IEnumerable<T> elements, int k)
{
return k == 0 ? new[] { new T[0] } :
Expand Down
Loading

0 comments on commit 4e71025

Please sign in to comment.