Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f290a86
commit 1b239aa
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{GENERIC_UNIT_TEST "test_role_1" ( | ||
[event] | ||
name=prestart | ||
# create a bunch of units in side 1 recall list | ||
{UNIT 1 Ghost recall recall (id=wrong_0)} | ||
{UNIT 1 Shadow recall recall (id=wrong_1)} | ||
{UNIT 1 Spectre recall recall (id=correct)} | ||
{UNIT 1 Wraith recall recall (id=wrong_2)} | ||
{UNIT 1 Nightgaunt recall recall (id=wrong_3)} | ||
[/event] | ||
|
||
[event] | ||
name=start | ||
|
||
[role] | ||
role=advisor | ||
side=1 | ||
type=Spectre,Nightgaunt,Wraith,Shadow,Ghost | ||
[/role] | ||
|
||
[recall] | ||
role=advisor | ||
[/recall] | ||
|
||
{ASSERT ( | ||
[have_unit] | ||
side=1 | ||
role=advisor | ||
type=Spectre | ||
id=correct | ||
search_recall_list=no | ||
[/have_unit] | ||
)} | ||
|
||
{RETURN ([true][/true])} | ||
[/event] | ||
)} | ||
|
||
{GENERIC_UNIT_TEST "test_role_2" ( | ||
[event] | ||
name=prestart | ||
# create a bunch of units on field for side 2 | ||
{UNIT 2 "Troll Whelp" 13 2 (id=wrong_0)} | ||
{UNIT 2 Troll 12 2 (id=wrong_1)} | ||
{UNIT 2 "Troll Shaman" 14 2 (id=correct)} | ||
{UNIT 2 "Troll Warrior" 12 3 (id=wrong_2)} | ||
{UNIT 2 "Troll Rocklobber" 14 3 (id=wrong_3)} | ||
[/event] | ||
|
||
[event] | ||
name=start | ||
|
||
[role] | ||
role=smart | ||
side=2 | ||
type=Troll Shaman,Troll Warrior,Troll Rocklobber,Troll,Troll Whelp | ||
[/role] | ||
|
||
{ASSERT ( | ||
[have_unit] | ||
side=2 | ||
role=smart | ||
type=Troll Shaman | ||
id=correct | ||
search_recall_list=no | ||
[/have_unit] | ||
)} | ||
|
||
{RETURN ([true][/true])} | ||
[/event] | ||
)} | ||
|
||
{GENERIC_UNIT_TEST "test_role_3" ( | ||
[event] | ||
name=start | ||
|
||
[role] | ||
role=dummy | ||
side=3 | ||
[/role] | ||
|
||
{ASSERT ( | ||
[have_unit] | ||
role=dummy | ||
count=0 | ||
search_recall_list=yes | ||
[/have_unit] | ||
)} | ||
|
||
{RETURN ([true][/true])} | ||
[/event] | ||
)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,9 @@ | |
0 xp_mod_1 | ||
0 xp_mod_2 | ||
0 xp_mod_3 | ||
0 test_role_1 | ||
0 test_role_2 | ||
0 test_role_3 | ||
# | ||
# LUA | ||
# | ||
|