mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
IPVGO: Bugfix: Require special opponent to be on the fixed size board (#1170)
This commit is contained in:
parent
d81358c80f
commit
dd4b54406c
@ -23,6 +23,7 @@ export function getNewBoardState(
|
||||
): BoardState {
|
||||
if (ai === GoOpponent.w0r1d_d43m0n) {
|
||||
boardToCopy = resetCoordinates(rotate90Degrees(boardFromSimpleBoard(bitverseBoardShape)));
|
||||
boardSize = 19;
|
||||
}
|
||||
|
||||
const newBoardState: BoardState = {
|
||||
@ -166,12 +167,12 @@ export function updateChains(board: Board, resetChains = true): void {
|
||||
* Modifies the board in place.
|
||||
*/
|
||||
export function updateCaptures(board: Board, playerWhoMoved: GoColor, resetChains = true): void {
|
||||
const boardState = updateChains(board, resetChains);
|
||||
updateChains(board, resetChains);
|
||||
const chains = getAllChains(board);
|
||||
|
||||
const chainsToCapture = findAllCapturedChains(chains, playerWhoMoved);
|
||||
if (!chainsToCapture?.length) {
|
||||
return boardState;
|
||||
return;
|
||||
}
|
||||
|
||||
chainsToCapture?.forEach((chain) => captureChain(chain));
|
||||
|
@ -337,7 +337,7 @@ function logEndGame(logger: (s: string) => void) {
|
||||
* Clears the board, resets winstreak if applicable
|
||||
*/
|
||||
export function resetBoardState(error: (s: string) => void, opponent: GoOpponent, boardSize: number) {
|
||||
if (![5, 7, 9, 13].includes(boardSize)) {
|
||||
if (![5, 7, 9, 13].includes(boardSize) && opponent !== GoOpponent.w0r1d_d43m0n) {
|
||||
error(`Invalid subnet size requested (${boardSize}), size must be 5, 7, 9, or 13`);
|
||||
return;
|
||||
}
|
||||
@ -412,7 +412,7 @@ export async function determineCheatSuccess(
|
||||
* Cheating success rate scales with player's crime success rate, and decreases with prior cheat attempts.
|
||||
*/
|
||||
export function cheatSuccessChance(cheatCount: number) {
|
||||
return Math.min(0.6 * (0.8 ^ cheatCount) * Player.mults.crime_success, 1);
|
||||
return Math.min(0.6 * 0.65 ** cheatCount * Player.mults.crime_success, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user