@@ -42,6 +42,8 @@ export class TerraceGame extends GameBase {
4242 dateAdded : "2023-06-18" ,
4343 // i18next.t("apgames:descriptions.terrace")
4444 description : "apgames:descriptions.terrace" ,
45+ // i18next.t("apgames:notes.terrace")
46+ notes : "apgames:notes.terrace" ,
4547 urls : [
4648 "https://boardgamegeek.com/boardgame/2872/terrace" ,
4749 "https://boardgamegeek.com/boardgame/15676/terrace-6x6" ,
@@ -355,8 +357,8 @@ export class TerraceGame extends GameBase {
355357 else {
356358 // up straight, I must be larger
357359 const capUp = gOrth . neighbours ( piece . location ) . filter ( cell => this . board . has ( cell ) && gOrth . elevation ( cell ) === thisElev + 1 && this . board . get ( cell ) ! . size < piece . size ) ;
358- // same level, I must be at least same size
359- const capSame = g . neighbours ( piece . location ) . filter ( cell => this . board . has ( cell ) && gOrth . elevation ( cell ) === thisElev && this . board . get ( cell ) ! . size <= piece . size ) ;
360+ // same level, I must be at least same size and orthogonally adjacent
361+ const capSame = gOrth . neighbours ( piece . location ) . filter ( cell => this . board . has ( cell ) && gOrth . elevation ( cell ) === thisElev && this . board . get ( cell ) ! . size <= piece . size ) ;
360362 // down diagonal, I must be at least 1 size smaller
361363 const capDown = gDiag . neighbours ( piece . location ) . filter ( cell => this . board . has ( cell ) && gDiag . elevation ( cell ) === thisElev - 1 && this . board . get ( cell ) ! . size > piece . size ) ;
362364 // up straight, my king attacking a largest piece
@@ -574,7 +576,7 @@ export class TerraceGame extends GameBase {
574576 this . board . set ( to , pcFrom ) ;
575577 this . results . push ( { type : "move" , from : fCell , to, what : pcFrom . size . toString ( ) } ) ;
576578 if ( m . includes ( "x" ) || m . includes ( "*" ) ) {
577- this . results . push ( { type : "capture" , where : to , what : pcTo ! . size . toString ( ) , whose : pcTo ! . owner } ) ;
579+ this . results . push ( { type : "capture" , where : to , what : ` ${ m . includes ( "x" ) ? "x" : "*" } ${ pcTo ! . size } ` , whose : pcTo ! . owner } ) ;
578580 }
579581
580582 // update currplayer
@@ -935,7 +937,7 @@ export class TerraceGame extends GameBase {
935937 let resolved = false ;
936938 switch ( r . type ) {
937939 case "capture" :
938- node . push ( i18next . t ( "apresults:CAPTURE.terrace" , { player, where : r . where , what : r . what } ) ) ;
940+ node . push ( i18next . t ( "apresults:CAPTURE.terrace" , { context : r . what ?. startsWith ( "*" ) ? "self" : "other" , player, where : r . where , what : r . what ?. substring ( 1 ) } ) ) ;
939941 resolved = true ;
940942 break ;
941943 case "move" :
0 commit comments