diff --git a/development/code/logic/PieceLogic.ts b/development/code/logic/PieceLogic.ts index 7e8493cb..b8ba8369 100644 --- a/development/code/logic/PieceLogic.ts +++ b/development/code/logic/PieceLogic.ts @@ -86,7 +86,7 @@ function revertPieceMoveOnBoard(piece: Piece) { export function onPieceFellOffTheBoard(draggedPiece: Piece) { draggedPiece.position.boardId = VOID_BOARD_ID; - killPieceByGame(draggedPiece, 'gravity'); + killPieceByGame(draggedPiece, 'the void'); game.setFellOffTheBoardPiece(draggedPiece); game.endMove(false); } @@ -282,6 +282,7 @@ export function permanentlyKillPiece(targetPiece: Piece) { game.increaseDeathCounter(); game.setIsPieceKilled(true); + targetPiece.position.boardId = VOID_BOARD_ID; game.setPieces(game.getPieces().filter((piece) => piece !== targetPiece)); if (targetPiece instanceof King) endGame(); diff --git a/development/code/ui/logs/Log.ts b/development/code/ui/logs/Log.ts index 695cea95..a0f27566 100644 --- a/development/code/ui/logs/Log.ts +++ b/development/code/ui/logs/Log.ts @@ -1,4 +1,8 @@ -import { NOTATIONS_LETTERS, NOTATIONS_NUMBERS } from '../../Constants'; +import { + NOTATIONS_LETTERS, + NOTATIONS_NUMBERS, + VOID_BOARD_ID, +} from '../../Constants'; import { Piece } from '../../logic/pieces/Piece'; import { Position } from '../../logic/pieces/PiecesUtilities'; import { Logger } from './Logger'; @@ -59,7 +63,13 @@ export class KillLog extends Log { name: killedPieceName, } = killedPiece; - let message = `${killedPieceIcon} ${killedPieceColor} ${killedPieceName} was killed by `; + let message = `${killedPieceIcon} ${killedPieceColor} ${killedPieceName} was `; + + if (killedPiece.position.boardId === VOID_BOARD_ID) { + message += 'permanently '; + } + message += 'killed by '; + if (cause instanceof Piece) { const { pieceIcon: killerPieceIcon,