Skip to content

Commit 690fc6a

Browse files
Hatteredo9300
andauthored
Add 2 Rush AIs (#31)
* Add 2 Rush AIs - Psychic (Romin) deck - Imaginary Actor (Yuo) deck also made OnSelectTribute go through OnSelectCard first to handle tributing via SelectUnselect (check if hint is release) * Update bots.json * Add decks to libWindbot project Co-authored-by: Edoardo Lolletti <[email protected]>
1 parent bfd6ea9 commit 690fc6a

File tree

8 files changed

+3270
-54
lines changed

8 files changed

+3270
-54
lines changed

Decks/AI_[HealingJAM].ydk

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#created by Hatter
2+
#main
3+
160005002
4+
160005002
5+
160005002
6+
160201035
7+
160201035
8+
160201035
9+
160306003
10+
160001028
11+
160001028
12+
160001028
13+
160007014
14+
160007014
15+
160007014
16+
160204031
17+
160204031
18+
160204031
19+
160004017
20+
160004017
21+
160004017
22+
160201031
23+
160201031
24+
160201031
25+
160002044
26+
160002044
27+
160002044
28+
160006041
29+
160006041
30+
160204032
31+
160204032
32+
160204032
33+
160204045
34+
160204045
35+
160204045
36+
160204049
37+
160204050
38+
160204050
39+
160204050
40+
160007056
41+
160007056
42+
160007056
43+
#extra
44+
160007035
45+
160007035
46+
160007035
47+
160204030
48+
160204030
49+
160204030
50+
160204029
51+
160204029
52+
160204029
53+
!side

Decks/AI_[ImaginaryArk].ydk

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#created by Hatter
2+
#main
3+
160204007
4+
160204007
5+
160204007
6+
160204008
7+
160204008
8+
160204008
9+
160204009
10+
160204009
11+
160204009
12+
160204010
13+
160204010
14+
160204010
15+
160204006
16+
160204006
17+
160204006
18+
160007001
19+
160007001
20+
160007001
21+
160001029
22+
160001029
23+
160001029
24+
160004039
25+
160004039
26+
160004039
27+
160204011
28+
160204011
29+
160204011
30+
160204045
31+
160204045
32+
160204045
33+
160204049
34+
160204050
35+
160204050
36+
160204050
37+
160204012
38+
160204012
39+
160204012
40+
160204014
41+
160204014
42+
160204014
43+
#extra
44+
160007036
45+
160007036
46+
160007036
47+
160204001
48+
160204001
49+
160204001
50+
160204002
51+
160204002
52+
160204002
53+
160204003
54+
160204003
55+
160204003
56+
160204004
57+
160204004
58+
160204004
59+
!side
60+
160204026
61+
160204026
62+
160204026
63+
160302001
64+
160302001
65+
160302001
66+
160303019
67+
160303019
68+
160303019
69+
160204022
70+
160204022
71+
160204022

ExecutorBase/Game/GameAI.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public MainPhaseAction OnSelectIdleCmd(MainPhase main)
394394
Executor.SetMain(main);
395395
foreach (CardExecutor exec in Executor.Executors)
396396
{
397-
if (exec.Type == ExecutorType.GoToEndPhase && main.CanEndPhase && exec.Func()) // check if should enter end phase directly
397+
if (exec.Type == ExecutorType.GoToEndPhase && main.CanEndPhase && exec.Func()) // check if should enter end phase directly
398398
{
399399
_dialogs.SendEndTurn();
400400
return new MainPhaseAction(MainPhaseAction.MainAction.ToEndPhase);
@@ -700,12 +700,18 @@ public IList<ClientCard> OnSelectSum(IList<ClientCard> cards, int sum, int min,
700700
/// <returns>A new list containing the tributed cards.</returns>
701701
public IList<ClientCard> OnSelectTribute(IList<ClientCard> cards, int min, int max, long hint, bool cancelable)
702702
{
703+
IList<ClientCard> selected = Executor.OnSelectCard(cards, min, max, hint, cancelable);
704+
if (selected != null)
705+
{
706+
return selected;
707+
}
708+
703709
// Always choose the minimum and lowest atk.
704710
List<ClientCard> sorted = new List<ClientCard>();
705711
sorted.AddRange(cards);
706712
sorted.Sort(CardContainer.CompareCardAttack);
707713

708-
IList<ClientCard> selected = new List<ClientCard>();
714+
selected = new List<ClientCard>();
709715

710716
for (int i = 0; i < min && i < sorted.Count; ++i)
711717
selected.Add(sorted[i]);

0 commit comments

Comments
 (0)