]> git.pond.sub.org Git - empserver/blobdiff - tests/retreat/01-retreat-1
retreat: Rewrite automatic retreat code to fix its many bugs
[empserver] / tests / retreat / 01-retreat-1
index a7e90389691e37d83b1c13ed84c70db22c4f29ba..bf596b0dbf55ed062ede9cfc4e318f82f4605461 100644 (file)
@@ -13,9 +13,11 @@ retr 2/3 bgyujnbgyujnbgyujn itshbdu
 retr 3 h c
 | group retreat order
 retr a ?uid=4 b h
+fleet a 7
+__cmd added 1 0 0
 | show retreat orders
 retr
-0/1/2/3/4
+0/1/2/3/4/7
 || lretreat command
 | garbage path
 lret 0 garbage i
@@ -30,38 +32,46 @@ lret 2/3 yujnbgyujnbgyujnbg ihb
 lret 3 h c
 | group retreat order
 lret a ?uid=4 b h
+army a 7
+__cmd added 1 0 0
 | show retreat orders
 lret
-0/1/2/3/4
+0/1/2/3/4/7
 ||| Ships
 || ships failing to retreat
 | sunk
+| as group (fleet c): 30 sinks, 32 crewless, 35 no mobility, 36 on sale
 fire se -2,2 30
-| sailing
+__cmd added -2 -2 0
+| in canal 4,0
 fire se -2,2 31
-| crewless
-fire se -2,2 32
-| construction zone
+__cmd added 1 1 0
+| in construction zone 2,2
 fire se -2,2 33
-| landlocked
+| landlocked in 3,1
 fire se -2,2 34
-| no mobility
-fire se -2,2 35
+__cmd added -1 -1 0
+| as group (fleet c): 30 sinks, 31 on sale, 32 crewless, 35 no mobility,
 || ships having difficulties during retreat
 | out of mobility after n
 fire se -2,2 40
-| into non-navigable sector after n
+| into construction zone 2,2 after n
 fire se -2,2 41
-| into unfriendly sector right away
+| into unfriendly -3,1 right away
 fire se -2,2 42
-| gg with 43, sweeping and hitting mines
+| into minefield -6,4, sweep and hit mines, stop
+| as group (fleet m): 44/43
 fire se -2,2 44
+| into canal
+| as group (fleet n): 46 can't, 47 can
+fire se -2,2 46
+__cmd added 1 1 0
 || ships retreating fully
 | nh
 fire se -2,2 10
 | h
 fire se -2,2 10
-| nj into friendly harbor
+| nj into friendly harbor 4,4
 fire se -2,2 10
 || own ship stays put
 fire se -2,2 2
@@ -71,6 +81,12 @@ fire se -2,2 2
 fire se -2,2 11
 | not helpless
 fire se -2,-2 20
+| crazy group retreat
+| as group (fleet g): 25 unremarkable, 24 foreign, 26 group retreat off,
+| 27 different path, 28 different triggers, 29 is elsewhere
+fire se -2,2 25
+| odd: 26/27/28/29 retreat
+__cmd added 1 1 0
 || ships retreating from depth charges
 | depth-charged
 fire sh 5 50
@@ -82,7 +98,7 @@ navi 5 gyuh
 fire sh 5 53
 || ships retreating from bombs
 | injured
-bomb 0/1/2/3/4 . p -2,2 jh
+bomb 0/1/2/3/4 . p -2,2 ggh
 s
 60
 61
@@ -90,7 +106,7 @@ s
 63
 64
 | bombed
-bomb 0/1/2/3/4 . p -2,2 jh
+bomb 0/1/2/3/4 . p -2,2 ggh
 s
 65
 66
@@ -117,7 +133,7 @@ torp 6 104
 | injured is not implemented
 | helpless is not implemented
 || ships retreating from sonar pings
-| naval sonar
+| naval sonar, 120 detects
 navi 5 bsh
 | retreat on plane sonar is not implemented
 || ships retreating from unsuccessful boarding
@@ -125,54 +141,61 @@ navi 5 nh
 board 130 5
 1
 ||| Land units
-| only retreat on p-bombing is implemented
 | BUG: condition b triggers only on hit
 || land units failing to retreat
 | these bombing runs must hit; if they don't, use __cmd to make them
 | destroyed
-bomb 30 . p -2,2 ujh
+| as group (army c): 30 dies, 31 loaded on ship, 32 crewless,
+| 34 loaded on train, 35 no mobility, 36 on sale
+bomb 30 . p -2,2 jh
 l
 30
-| loaded, but there's no way to trigger a retreat then
-| crewless
-__cmd added -1 0 0
-bomb 30 . p -2,2 ujh
-l
-32
-| BUG: retreats anyway
-| kidnapped
+__cmd added -1 -2 0
+| kidnapped in -1,1
 bomb 30 . p -2,2 uh
 l
 33
 | BUG: retreats anyway
-| no mobility
+| no rail in 1,1
 bomb 30 . p -2,2 ujh
 l
-35
+37
 || land units having difficulties during retreat
 | these bombing runs must hit; if they don't, use __cmd to make them
 | out of mobility after n
-__cmd added -1 0 0
 bomb 30 . p -2,2 ujh
 l
 40
-| into mountain after j
+| into mountain 2,0 after j
+| not actually having difficulties; such a retreat is permitted now
+__cmd added -1 0 0
 bomb 30 . p -2,2 ujh
 l
 41
-| into foreign sector right away
-__cmd added -1 0 0
+| into foreign -1,1 right away
 bomb 30 . p -2,2 ujh
 l
 42
-| yu with 43, sweeping and hitting mines
+| into minefield 0,0, sweep and hit mines, stop
+| as group (army m): 44/43
 __cmd added -1 0 0
 bomb 30 . p -2,2 ujh
 l
 44
-| BUG: sweeps silently
+| rail ends after n
+| as group (army t): 45 train, 46 not
+bomb 31 . p -2,2 uyuuh
+l
+45
+| into foreign, 47 can't, 48 can
+__cmd added -1 0 0
+bomb 31 . p -2,2 uuuh
+l
+47
+__cmd added 2 4 0
 || land units retreating fully
 | jh
+__cmd added -1 0 0
 bomb 30 . p -2,2 ujh
 l
 10
@@ -181,16 +204,26 @@ __cmd added -1 0 0
 bomb 30 . p -2,2 ujjh
 l
 10
-| uy into allied sector
+| uy into allied 3,-1
 __cmd added -1 0 0
 bomb 30 . p -2,2 ujjh
 l
 10
-| BUG: can't enter allied sector
 | own land unit stays put
 bomb 30 . p -3,1 h
 l
 2
+| crazy group retreat
+| as group (army g): 25 unremarkable, 24 foreign, 26 group retreat off,
+| 27 different path, 28 different triggers, 29 is elsewhere
+bomb 30 . p -2,2 ujjh
+l
+25
+| odd: 26/27/28/29 retreat
+__cmd added 1 2 0
+|| land units retreating from bombs
+| only retreat on p-bombing is implemented
+| bombed covered above
 | injured
 bomb 20/21/22/23/24 . p -2,2 uuh
 l