mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 17:03:25 +00:00
add tests of the [move] skip_sighted_option
This is partially a follow up of previous commit 403af25e9da77dbf7aa295ccd901af3bdcd6f889
This commit is contained in:
parent
94fdab4389
commit
2c486ed699
10
data/test/maps/move_skip_sighted.map
Normal file
10
data/test/maps/move_skip_sighted.map
Normal file
@ -0,0 +1,10 @@
|
||||
Gg, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, 1 Gg^Kov, Gg^Kov, Gg^Kov, 3 Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Kha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Kha^Kov, Gg^Kov, Gg^Kov, 2 Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Cha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Cha^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Gg^Kov
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg
|
||||
Gg^Kov, Gg^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Chs^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Ch^Kov, Gg^Kov, Gg
|
||||
Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg^Kov, Gg, Gg^Kov, Gg^Kov, Gg^Kov, Gg, Gg
|
75
data/test/scenarios/move_skip_sighted.cfg
Normal file
75
data/test/scenarios/move_skip_sighted.cfg
Normal file
@ -0,0 +1,75 @@
|
||||
# This series of tests checks that the skip_sighted option of
|
||||
# [move] is being implemented correctly.
|
||||
|
||||
#define MOVE_SKIP_SIGHTED_SCEN ID STOP_X STOP_Y SKIP_SIGHTED SHARE_VIEW
|
||||
[test]
|
||||
name = "Unit Test {ID}"
|
||||
map_data = "{test/maps/move_skip_sighted.map}"
|
||||
turns = 3
|
||||
id = {ID}
|
||||
random_start_time = no
|
||||
|
||||
{DAWN}
|
||||
|
||||
[side]
|
||||
side=1
|
||||
controller=human
|
||||
name = "Alice"
|
||||
type = Elvish Archer
|
||||
id=alice
|
||||
fog=yes
|
||||
share_view={SHARE_VIEW}
|
||||
[/side]
|
||||
[side]
|
||||
side=2
|
||||
controller=human
|
||||
name = "Bob"
|
||||
type = Orcish Grunt
|
||||
id=bob
|
||||
fog=yes
|
||||
team_name=East
|
||||
share_view={SHARE_VIEW}
|
||||
[/side]
|
||||
[side]
|
||||
side=3
|
||||
controller=human
|
||||
name = "Dave"
|
||||
type = Dwarvish Fighter
|
||||
id=dave
|
||||
fog=yes
|
||||
team_name=East
|
||||
share_view={SHARE_VIEW}
|
||||
[/side]
|
||||
|
||||
[event]
|
||||
name = side 1 turn 1
|
||||
[end_turn]
|
||||
[/end_turn]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name = side 2 turn 1
|
||||
[do_command]
|
||||
[move]
|
||||
x=16,15,14,13,12,11,10
|
||||
y=3,3,3,3,3,3
|
||||
skip_sighted={SKIP_SIGHTED}
|
||||
[/move]
|
||||
[/do_command]
|
||||
{RETURN (
|
||||
[have_unit]
|
||||
id=bob
|
||||
x={STOP_X}
|
||||
y={STOP_Y}
|
||||
[/have_unit])}
|
||||
[/event]
|
||||
[/test]
|
||||
#enddef
|
||||
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_no_sighted_no_share_view 15 3 no no}
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_ally_sighted_no_share_view 12 3 only_ally no}
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_all_sighted_no_share_view 11 3 all no}
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_no_sighted_yes_share_view 11 3 no yes}
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_ally_sighted_yes_share_view 11 3 only_ally yes}
|
||||
{MOVE_SKIP_SIGHTED_SCEN move_skip_all_sighted_yes_share_view 11 3 all yes}
|
||||
|
@ -22,6 +22,12 @@
|
||||
1 sighted_events_fail
|
||||
0 sighted_on_opponents_turn
|
||||
1 sighted_on_opponents_turn_fail
|
||||
0 move_skip_no_sighted_no_share_view
|
||||
0 move_skip_ally_sighted_no_share_view
|
||||
0 move_skip_all_sighted_no_share_view
|
||||
0 move_skip_no_sighted_yes_share_view
|
||||
0 move_skip_ally_sighted_yes_share_view
|
||||
0 move_skip_all_sighted_yes_share_view
|
||||
#
|
||||
# Attack calculations tests
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user